A wireless data transmission method and system based on adaptive switching of communication protocols

By dynamically determining the data packet size and transmission time interval, and adaptively selecting the communication protocol, the working requirements of wireless sensors under different distances and bandwidth conditions are solved, achieving efficient seamless switching and improved energy utilization efficiency.

CN119584201BActive Publication Date: 2026-07-21IDQ SCIENCE & TECHNOLOGY DEVELOPMENT (GUANGDONG HENGQIN) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
IDQ SCIENCE & TECHNOLOGY DEVELOPMENT (GUANGDONG HENGQIN) CO LTD
Filing Date
2024-12-02
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing wireless sensors can only use a single communication protocol, which cannot meet the actual needs of working under different distances and bandwidths, resulting in low energy efficiency.

Method used

By acquiring signal acquisition commands, the clock system of the wireless sensor network is automatically calibrated, the data packet size and transmission time interval are dynamically determined, and the communication protocol is adaptively selected to realize the acquisition and transmission of sensor data.

Benefits of technology

It enables seamless switching between different communication protocols in sensor networks, supports long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission, reduces unnecessary power consumption, extends the working time of sensor nodes, and improves energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119584201B_ABST
    Figure CN119584201B_ABST
Patent Text Reader

Abstract

The application provides a wireless data transmission method and system based on adaptive switching of communication protocols, and relates to the technical field of data transmission.The method comprises the following steps: obtaining a signal acquisition instruction; obtaining the time when the signal acquisition instruction is received, and automatically calibrating the clock system of the wireless sensor network; dynamically determining the data packet size and the transmission time interval according to the current sensor network state; adaptively forming the corresponding communication protocol according to the set data packet size and transmission time interval; collecting sensor data according to the communication protocol; and transmitting the sensor data according to the communication protocol.The application can enable the sensor network to seamlessly switch between different communication protocols, support both long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission requirements, meet the needs of a wide range of practical applications, reduce unnecessary power consumption, and improve the energy utilization efficiency of the sensor in use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and in particular to a wireless data transmission method and system based on adaptive switching of communication protocols. Background Technology

[0002] Existing wireless sensors can acquire data through two communication protocol modes: one for low-bandwidth long-distance transmission (LoRa, ZigBee, etc.), and the other for high-bandwidth short-distance transmission (Wi-Fi, BLE, etc.).

[0003] Research revealed that existing sensor development focuses on a single mode for transmitting data from wireless sensor networks, meaning that current sensor products on the market can only provide data information for a single scenario.

[0004] In practical applications, some projects require sensors to operate under varying distances and bandwidths, which severely limits their application in engineering. For example, some smart city applications may require sensors to perform both remote monitoring and short-range, high-bandwidth data transmission at specific times or environments, requirements that current technologies cannot simultaneously meet.

[0005] On the other hand, relying solely on a single communication protocol for data transmission can lead to low energy efficiency for sensors during use. For example, high-bandwidth protocols (such as Wi-Fi) are very effective for short-range transmission, but using such protocols for long-distance or low-frequency data transmission results in significant unnecessary energy consumption. Furthermore, while low-bandwidth protocols can save energy, they are inadequate when efficient transmission of large amounts of data is required. Summary of the Invention

[0006] To address the problem that existing technologies rely solely on a single communication protocol for data transmission, which fails to meet the demands of practical applications requiring sensors to operate under varying distances and bandwidths, and consequently leads to low energy efficiency in sensor use, this invention provides a wireless data transmission method and system based on adaptive switching of communication protocols.

[0007] The technical solutions provided by the embodiments of the present invention are as follows:

[0008] First aspect

[0009] This invention provides a wireless data transmission method based on adaptive switching of communication protocols, comprising:

[0010] S1: Obtain signal acquisition command;

[0011] S2: Obtain the time when the signal acquisition command is received, and automatically calibrate the clock system of the wireless sensor network;

[0012] S3: Dynamically determine the data packet size and transmission time interval based on the current sensor network status;

[0013] S4: Adaptively form the corresponding communication protocol based on the set data packet size and sending time interval;

[0014] S5: Collect sensor data according to the communication protocol;

[0015] S6: Send the sensor data according to the communication protocol.

[0016] Second aspect

[0017] This invention provides a wireless data transmission system based on adaptive switching of communication protocols, comprising:

[0018] processor;

[0019] A memory storing computer-readable instructions, which, when executed by the processor, implement the wireless data transmission method based on adaptive switching of communication protocols as described in the first aspect.

[0020] Third aspect

[0021] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the wireless data transmission method based on adaptive switching of communication protocols as described in the first aspect.

[0022] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0023] In this invention, the data packet size and transmission time interval are dynamically determined based on the current sensor network status, thereby adaptively forming a corresponding communication protocol. Sensor data is collected and transmitted according to the formed communication protocol, enabling the sensor network to seamlessly switch between different communication protocols. This supports both long-distance, low-power environmental monitoring and short-distance, high-bandwidth data transmission, meeting the needs of practical applications that require sensors to operate under different distances and bandwidth conditions. It can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors during use. Attached Figure Description

[0024] 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.

[0025] Figure 1 A flowchart illustrating a wireless data transmission method based on adaptive switching of communication protocols, provided in an embodiment of the present invention;

[0026] Figure 2 This is a schematic diagram of a wireless data transmission system based on adaptive switching of communication protocols, provided in an embodiment of the present invention. Detailed Implementation

[0027] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0028] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0029] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, their intended meanings are consistent.

[0030] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0031] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0032] Reference manual attached Figure 1 The diagram illustrates a flowchart of a wireless data transmission method based on adaptive switching of communication protocols provided by an embodiment of the present invention.

[0033] This invention provides a wireless data transmission method based on adaptive switching of communication protocols. This method can be implemented by a wireless data transmission device based on adaptive switching of communication protocols, which can be a terminal or a server. The processing flow of the wireless data transmission method based on adaptive switching of communication protocols may include the following steps:

[0034] S1: Obtain signal acquisition command.

[0035] Specifically, signal acquisition instructions can be obtained from the host computer software.

[0036] S2: Obtain the time when the signal acquisition command is received and automatically calibrate the clock system of the wireless sensor network.

[0037] It's important to note that the automatic calibration of the clock system in a wireless sensor network ensures a one-to-one correspondence between the times carried by each sensor node. This ensures that all sensor nodes operate on the same time base, avoiding errors caused by clock drift. Furthermore, it allows the data collected by all sensors to be arranged in the correct chronological order, ensuring data accuracy.

[0038] S3: Dynamically determine the data packet size and transmission time interval based on the current sensor network status.

[0039] In one possible implementation, S3 specifically involves: dynamically determining the optimal data packet size and transmission time interval using a fuzzy-assisted firefly search optimization algorithm based on network traffic load prediction, transmission distance, node energy, end-to-end delay, and node connectivity.

[0040] Network traffic load forecast is a prediction of the amount of data transmitted over the network over a future period. It is calculated by analyzing historical network traffic data and combining it with the current network operating status (such as bandwidth utilization, node activity, and packet transmission frequency) using machine learning or statistical models to estimate future network traffic trends. When the load forecast is high, the system needs to reduce packet size and increase transmission intervals to prevent congestion; when the load is low, the system can increase packet size and shorten intervals to improve bandwidth utilization and transmission efficiency. This adaptive adjustment strategy ensures that the network maintains efficient and stable operation under different traffic load conditions.

[0041] Optionally, the network traffic load prediction value is determined by using a three-layer stacked gated loop unit.

[0042] Among them, the Gated Recurrent Unit (GRU) is an improved Recurrent Neural Network (RNN) designed to address the long-term dependency and gradient vanishing problems inherent in traditional RNNs. By introducing a gating mechanism, GRU enables the model to effectively capture long-term dependencies in sequential data and better maintain gradient stability during training.

[0043] The specific structure of the three-layer stacked gated loop unit proposed in this invention is as follows: The three-layer stacked gated loop unit includes a first gated loop unit, a second gated loop unit, and a third gated loop unit stacked together. Historical network traffic load data is combined into a network traffic load sequence. The input layer of the first gated loop unit is used to obtain the network traffic load sequence. The candidate layer of the first gated loop unit is connected to the input layer of the second gated loop unit. The candidate layer of the second gated loop unit is connected to the input layer of the third gated loop unit. The output layer of the third gated loop unit is connected to a fully connected layer. The fully connected layer is used to fuse the hidden states in the candidate layers of the first, second, and third gated loop units to obtain a comprehensive hidden state, which is then used to predict the network traffic load.

[0044] For each gated loop unit, the hidden state can be extracted according to the following formula:

[0045] z t =σ(W uz x t +W hz h t-1 +b z )

[0046] r t =σ(W ur x t +W hr h t-1 +b r )

[0047] c t =σ(W uc x t +W hc (r t ⊙h t-1 )+b c )

[0048] h t =(1-z) t )⊙h t-1 +z t ⊙c t

[0049] Among them, zt This represents updating the gate's output vector at time t, where σ() represents the activation function, and W uz x represents the weight matrix between the input layer and the update gate. t W represents the network traffic load at time t. hz h represents the self-connection weight matrix of the update gate between time t and time t-1. t-1 Let b represent the hidden state at time t-1. z This indicates the bias term of the updated gate, r t W represents the output vector of the reset gate at time t. ur W represents the weight matrix between the input layer and the reset gate. hr b represents the self-connection weight matrix of the reset gate between time t and time t-1. r This indicates the offset term for resetting the door, c t W represents the output vector of the candidate layer at time t. uc W represents the weight matrix between the input layer and the candidate layer. hc b represents the self-connection weight matrix of the candidate layer between time t and time t-1. c The term represents the bias term of the candidate layer, ⊙ represents the element-wise product operation, and h t This represents the hidden state at time t.

[0050] Furthermore, the integrated hidden state is specifically as follows:

[0051] H t =ω1h 1t +ω2h 2t +ω3h 3t

[0052] Among them, H t Represents the integrated hidden state, h 1t Let h represent the first hidden state, ω1 represent the weight coefficient of the first hidden state, and h represent the weight coefficient of the first hidden state. 2t Let h represent the second hidden state, ω2 represent the weight coefficient of the second hidden state, and h represent the weight coefficient of the second hidden state. 3t ω3 represents the third hidden state, and ω3 represents the weight coefficient of the third hidden state.

[0053] Those skilled in the art can set the weight coefficients ω1, ω2, and ω3 of the first hidden state according to the actual situation, and the present invention does not limit them.

[0054] It should be noted that by fusing the first, second, and third hidden states and weighting these features according to different coefficients, a comprehensive hidden state is generated. This approach not only captures features at different levels but also better represents the temporal characteristics of network traffic globally.

[0055] Furthermore, network traffic load is predicted by comprehensively considering hidden states:

[0056]

[0057] in, This represents the predicted network traffic load at time t+1, where Sigmoid() represents the Sigmoid activation function, and W... h b represents the weight matrix between the fully connected layer and the prediction layer. h This represents the prediction layer bias term.

[0058] In this invention, the three-layer stacked structure extracts higher-order features layer by layer, capturing long-term dependencies and short-term fluctuations in network traffic load, thus enhancing the model's ability to represent time series data. Through layer-by-layer processing, the model can make more accurate predictions of future traffic load without losing detail.

[0059] Transmission distance refers to the physical distance a signal covers when data is transmitted from one node to another. In wireless communication, transmission distance directly affects signal strength, transmission rate, power consumption, and network stability. Signal strength in wireless communication decreases exponentially with increasing transmission distance. Longer transmission distances mean that data packets are more prone to loss or errors during transmission, requiring smaller data packet sizes to reduce the probability of errors in individual packets. Simultaneously, increasing the frequency of data retransmissions leads to network congestion.

[0060] Node energy refers to the remaining battery power or state of power of a wireless sensor node. Energy consumption is a critical limiting factor in IoT devices, especially for battery-powered nodes. When node energy levels are low, energy consumption needs to be minimized. Transmitting large data packets can cause a node to consume a large amount of energy in a short period, and frequent transmissions will also accelerate energy depletion. Therefore, when node energy is low, choosing smaller data packets and longer transmission intervals is ideal to ensure the node can operate for a longer period.

[0061] End-to-end delay (EED) refers to the total time consumed from the transmission of a data packet to its reception. It is influenced by multiple factors, such as transmission time, processing time, and queue latency. In scenarios with high real-time requirements (such as remote control or video streaming), a high EED will negatively impact the real-time performance of data transmission. In such cases, transmitting larger data packets will further increase latency because large packets take longer to transmit and process. Therefore, smaller data packets can be transmitted and responded to more quickly, reducing latency.

[0062] Node connectivity refers to the number of connections a node has with other nodes, reflecting the frequency or centrality of that node's communication within the network. It is a key indicator of network topology, representing the node's communication load. When node connectivity is high, it needs to handle data transmission tasks from multiple connected nodes simultaneously. To prevent node overload, smaller data packets should be selected to reduce the load on a single transmission, and the transmission interval should be appropriately increased to avoid network congestion.

[0063] Among them, the fuzzy-assisted firefly search optimization algorithm is a novel optimization method proposed in this invention, which combines fuzzy logic systems with the firefly algorithm. This method utilizes fuzzy logic to handle uncertainty and fuzziness in complex problems, and uses the firefly algorithm to optimize the problem-solving process. The combination of the two can improve the efficiency and accuracy of the search process, and is suitable for complex, multi-dimensional, and multi-constraint optimization problems.

[0064] In one possible implementation, S3 specifically includes sub-steps S301 to S304:

[0065] S301: Using network traffic load prediction, transmission distance, node energy, end-to-end delay, and node connectivity as input variables, convert the input variables into fuzzy sets.

[0066] Optionally, S301 specifically includes: classifying network traffic load prediction values ​​into three fuzzy sets: low, medium, and high; classifying transmission distance into three fuzzy sets: low, medium, and high; classifying node energy into three fuzzy sets: low, medium, and high; classifying end-to-end delay into three fuzzy sets: low, medium, and high; and classifying node connectivity into three fuzzy sets: low, medium, and high.

[0067] S302: Using network traffic load prediction, transmission distance, node energy, end-to-end delay and node connectivity as conditions, and data packet size and transmission time interval as output results, construct fuzzy inference rules for a fuzzy logic system.

[0068] Optionally, the specific form of the fuzzy inference rule of the fuzzy logic system is as follows: when the network traffic load prediction value is level x1, the transmission distance is level x2, the node energy is level x3, the end-to-end delay is level x4, and the node connectivity is level x5, the data packet size is determined to be y1 and the transmission time interval is y2.

[0069] Specifically, level x1 can be any one of low, medium, or high school; level x2 can be any one of low, medium, or high school; level x3 can be any one of low, medium, or high school; level x4 can be any one of low, medium, or high school; and level x5 can be any one of low, medium, or high school.

[0070] For example, when the predicted network traffic load is high, the transmission distance is long, the node energy is medium, the end-to-end latency is low, and the node connectivity is high, the system will choose medium-sized data packets and longer transmission time intervals. This maintains a certain level of transmission efficiency while avoiding excessive data packets consuming network resources, preventing network congestion due to high load and long-distance transmission, and conserving node energy, extending their operating time. When the predicted network traffic load is low, the transmission distance is short, the node energy is high, the end-to-end latency is medium, and the node connectivity is low, the system will choose larger data packets and shorter transmission time intervals. This fully utilizes bandwidth resources, transmits data quickly, and because the node energy is sufficient and the transmission distance is short, the system can increase the transmission rate, reduce latency, and improve transmission efficiency.

[0071] S303: Based on the output of the fuzzy logic system, the fuzzy inference rules of the fuzzy logic system are optimized using the firefly search optimization algorithm.

[0072] Optionally, S303 specifically includes S3031 to S3035:

[0073] S3031: Constructing the fitness function for the firefly search optimization algorithm:

[0074]

[0075] Where f represents the fitness function, X represents the set of fuzzy inference rules, E represents node energy consumption, D represents end-to-end delay, T represents network throughput, β1 represents the weight coefficient of node energy consumption, β2 represents the weight coefficient of end-to-end delay, and β3 represents the weight coefficient of network throughput.

[0076] Those skilled in the art can set the weighting coefficients β1 for node energy consumption, β2 for end-to-end delay, and β3 for network throughput according to actual conditions; this invention does not impose any limitations.

[0077] In this invention, by incorporating three important indicators—energy consumption, end-to-end latency, and throughput—into the fitness function, a balance is achieved between energy efficiency and performance, thereby improving the system's intelligence and adaptability. This enables the system to maintain its optimal operating state under different network conditions and resource requirements.

[0078] S3032: Initialize firefly individuals. Each firefly individual represents a set of feasible fuzzy inference rules. Each firefly individual consists of multiple dimensional components, and each component represents a certain fuzzy inference rule.

[0079] S3033: Compare each individual firefly with other individuals in the population, generate a random number u, and move them according to the following adaptive movement rules:

[0080]

[0081] in, Let ω represent the position of the i-th firefly individual at iteration t+1, and let ω represent the inertia weight factor. This represents the position of the i-th firefly at the t-th iteration. Let represent the position of the j-th firefly individual in the t-th iteration, β represent attraction, α represent the step size factor, sign represent the sign function, r represent a random number in the range of 0 to 1, Levy represent the Levy flight random step size, exp represent an exponential function with the natural constant e as the base, b represent the logarithmic spiral shape parameter, l represent a uniform random number between -1 and 1, and R t Let represent the adaptive switching factor at the t-th iteration, and u represent a uniform random number between 0 and 1.

[0082] It's important to note that when the generated random number is greater than the adaptive switching factor, the individual will employ a Levy flight strategy. Levy flight is a long-distance, jump-based random walk pattern that allows the individual to explore a wide area of ​​the search space. This random step size helps prevent the algorithm from getting stuck in local optima, thus enhancing its global search capability and enabling it to effectively explore the entire search space. Conversely, when the generated random number is less than the adaptive switching factor, the individual will use a logarithmic spiral search for local optimization. Spiral search allows the individual to make precise adjustments within a small range around the current solution, thereby improving the accuracy of the local search. By combining the effects of exponential and cosine functions, the individual can search more flexibly around the optimal solution, ensuring the full development of the quality of local solutions.

[0083] This invention achieves a good balance between global search and local exploration, ensuring that individuals can fully explore complex search spaces while also performing precise optimizations when close to the optimal solution, ultimately finding a high-quality solution. This design is particularly suitable for multi-objective optimization scenarios, as it can dynamically adjust the search strategy according to specific application requirements, improving both search efficiency and solution quality.

[0084] Optionally, the attraction is specifically:

[0085]

[0086] Where β0 represents the attraction between two fireflies when the distance between them is 0, exp represents an exponential function with the natural constant e as the base, γ represents the light intensity attraction coefficient, and r ijLet represent the Euclidean distance between the i-th firefly individual and the j-th firefly individual.

[0087] In this invention, when the distance is small, the attraction is strong, prompting individuals to move more quickly toward a better solution. This strong attraction allows fireflies to converge rapidly to the vicinity of a better solution. When the distance is large, the attraction is weak, meaning that the mutual influence between individuals is reduced, thus maintaining a certain degree of search independence and exploration ability, and preventing individuals from converging to a local optimum too early.

[0088] Optionally, the adaptive switching factor is specifically:

[0089]

[0090] in, The fitness value represents the global best position at the (t-1)th iteration. This represents the fitness value of the globally optimal position at the (t-2)th iteration.

[0091] In this invention, by comparing the global optimal fitness values ​​of the first two iterations, the adaptive switching factor can determine whether the algorithm has entered a local optimum. If the fitness values ​​of the two iterations differ significantly, it indicates that there is still considerable room for improvement. In this case, the adaptive switching factor is small, and the algorithm tends to perform a global search. If the difference is small, it indicates that the system may be close to a local optimum. In this case, the adaptive switching factor is large, and the algorithm switches to a local fine-grained search.

[0092] Optionally, the Levy flight random step size is as follows:

[0093]

[0094] Where, u follows The normal distribution of v, v follows The normal distribution is given by λ, where λ represents the exponential parameter.

[0095]

[0096] Where τ is the standard Gamma function.

[0097] In this invention, Levy flight is a random walk model with long jump characteristics. By introducing a non-uniform step size distribution, the algorithm can make larger jumps during the search process. Unlike conventional Gaussian random step sizes, Levy flight can generate longer jumps, thereby expanding the search space.

[0098] S3034: Update individual fitness after a firefly moves to a new location.

[0099] S3035: Determine if the current iteration count has reached the maximum iteration count. If yes, output the set of fuzzy inference rules represented by the firefly individual with the highest fitness, in order to optimize the fuzzy inference rules of the fuzzy logic system. Otherwise, return to continue iterating.

[0100] In this invention, the fuzzy inference rules of the fuzzy logic system are optimized by the firefly search optimization algorithm, so that the fuzzy inference rules can be dynamically optimized according to different application scenarios and needs, thereby improving the application breadth and intelligence level of the fuzzy logic system.

[0101] S304: The optimal data packet size and transmission time interval are dynamically determined through an optimized fuzzy logic system.

[0102] S4: Adaptively form the corresponding communication protocol based on the set data packet size and sending time interval.

[0103] Optionally, the communication protocol includes: ZigBee protocol, Wi-Fi protocol, BLE protocol, LoRa protocol, NB-IoT protocol and LTE-M protocol. This invention does not limit the specific type of communication protocol.

[0104] S5: Collect sensor data according to the communication protocol.

[0105] Specifically, the sensor data can be data from sensors such as accelerometers, temperature sensors, strain sensors, displacement sensors, or pressure sensors. This invention does not limit the specific sensor data type.

[0106] S6: Send sensor data according to the communication protocol.

[0107] Two specific application scenarios are provided below:

[0108] The first application scenario: When the user requires a transmission distance greater than 400m, the control module sends a data acquisition command, and the time synchronization module obtains the current time and updates the clock system of the entire wireless sensor network. The setting module sets the data transmission interval and the size of the data packet carried by a single node, and selects the setting module 1 based on the operating conditions to form a one-to-one wireless communication protocol with the wireless communication module. Data is transmitted according to a time interval of 7.8ms and a data packet size of 127 bytes written by a single node. The communication standard adopted by the wireless communication module 1 is IEEE 802.15.4, with a corresponding RF power range of 0dBm to 20dBm. At the same time, it can ensure stable synchronous data transmission with a timestamp resolution of 1ns. Then, the data acquisition and processing module 2 will collect data according to this communication protocol, transmitting data to the sensor module 1 in real time, enabling the sensor module to acquire data over long distances with low bandwidth (250kbps), with a maximum transmission distance of up to 2km.

[0109] The second application scenario: When the user requires a transmission distance of less than 400m, the control module sends a data acquisition command, and the time synchronization module obtains the current time and updates the clock system of the entire wireless sensor network. The setting module sets the data transmission interval and the size of the data packet carried by a single node, and selects a configuration other than module 1 based on the operating conditions. For example, if module 2 is selected, the wireless communication module forms a one-to-one wireless communication protocol, transmitting data with a time interval of 3.9ms and a data packet size of 255 bytes per node. The RF power range of this wireless communication module is 0dBm to 20dBm. Simultaneously, it ensures high-speed, stable, and synchronous data transmission with a timestamp resolution of 1ns. Afterwards, the data acquisition and processing module 2 will collect data according to this communication protocol and synchronously transmit the collected real-time data to sensor module 1, enabling the sensor module to achieve high-bandwidth (1Mbps) data acquisition at close range (within 400m), which is four times the network bandwidth of wireless communication module 1 in the first application scenario.

[0110] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0111] In this invention, the data packet size and transmission time interval are dynamically determined based on the current sensor network status, thereby adaptively forming a corresponding communication protocol. Sensor data is collected and transmitted according to the formed communication protocol, enabling the sensor network to seamlessly switch between different communication protocols. This supports both long-distance, low-power environmental monitoring and short-distance, high-bandwidth data transmission, meeting the needs of practical applications that require sensors to operate under different distances and bandwidth conditions. It can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors during use.

[0112] Reference manual attached Figure 2 The diagram shows a schematic of the structure of a wireless data transmission system based on adaptive switching of communication protocols provided by the present invention.

[0113] The present invention also provides a wireless data transmission system 20 based on adaptive switching of communication protocols, applied to the above-mentioned wireless data transmission method based on adaptive switching of communication protocols, comprising:

[0114] Processor 201.

[0115] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, they implement the wireless data transmission method based on adaptive switching of communication protocol as described in the method embodiment.

[0116] The wireless data transmission system 20 based on adaptive switching of communication protocols provided by the present invention can execute the wireless data transmission method based on adaptive switching of communication protocols described above and achieve the same or similar technical effects. To avoid repetition, the present invention will not elaborate further.

[0117] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0118] In this invention, the data packet size and transmission time interval are dynamically determined based on the current sensor network status, thereby adaptively forming a corresponding communication protocol. Sensor data is collected and transmitted according to the formed communication protocol, enabling the sensor network to seamlessly switch between different communication protocols. This supports both long-distance, low-power environmental monitoring and short-distance, high-bandwidth data transmission, meeting the needs of practical applications that require sensors to operate under different distances and bandwidth conditions. It can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors during use.

[0119] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be 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.

[0120] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0121] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0122] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0123] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0124] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0127] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0130] If the aforementioned functions 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, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0131] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the wireless data transmission method based on adaptive switching of communication protocols as described in the method embodiment.

[0132] The present invention provides a computer-readable storage medium that can implement the steps and effects of the wireless data transmission method based on adaptive switching of communication protocols in the above-described method embodiments. To avoid repetition, the present invention will not repeat the steps.

[0133] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0134] In this invention, the data packet size and transmission time interval are dynamically determined based on the current sensor network status, thereby adaptively forming a corresponding communication protocol. Sensor data is collected and transmitted according to the formed communication protocol, enabling the sensor network to seamlessly switch between different communication protocols. This supports both long-distance, low-power environmental monitoring and short-distance, high-bandwidth data transmission, meeting the needs of practical applications that require sensors to operate under different distances and bandwidth conditions. It can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors during use.

[0135] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0136] The following points need to be explained:

[0137] (1) The accompanying drawings of the embodiments of the present invention only involve the structures involved in the embodiments of the present invention. Other structures can refer to the general design.

[0138] (2) For clarity, the thickness of layers or regions is enlarged or reduced in the drawings used to describe embodiments of the present invention; that is, these drawings are not drawn to actual scale. It is understood that when an element such as a layer, film, region, or substrate is referred to as being “above” or “below” another element, the element may be “directly” located “above” or “below” the other element, or there may be intermediate elements.

[0139] (3) Where there is no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to obtain new embodiments.

[0140] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A wireless data transmission method based on adaptive switching of communication protocols, characterized in that, include: S1: Obtain signal acquisition command; S2: Obtain the time when the signal acquisition command is received, and automatically calibrate the clock system of the wireless sensor network; S3: Dynamically determine the data packet size and transmission time interval based on the current sensor network status; S4: Adaptively form the corresponding communication protocol based on the set data packet size and sending time interval; S5: Collect sensor data according to the communication protocol; S6: Send the sensor data according to the communication protocol; Specifically, S3 is: Based on network traffic load prediction, transmission distance, node energy, end-to-end latency, and node connectivity, the optimal data packet size and transmission time interval are dynamically determined using a fuzzy-assisted firefly search optimization algorithm. Specifically, S3 includes: S301: Using network traffic load prediction, transmission distance, node energy, end-to-end delay, and node connectivity as input variables, convert the input variables into fuzzy sets; S302: Using network traffic load prediction, transmission distance, node energy, end-to-end delay and node connectivity as conditions, and data packet size and transmission time interval as output results, construct fuzzy inference rules for a fuzzy logic system. S303: Based on the output of the fuzzy logic system, the fuzzy inference rules of the fuzzy logic system are optimized using the firefly search optimization algorithm; S304: The optimal data packet size and transmission time interval are dynamically determined through an optimized fuzzy logic system.

2. The wireless data transmission method based on adaptive switching of communication protocols according to claim 1, characterized in that, The method for determining the network traffic load prediction value is as follows: The network traffic load prediction value is determined by using a three-layer stacked gated loop unit.

3. The wireless data transmission method based on adaptive switching of communication protocols according to claim 1, characterized in that, S301 specifically includes: The predicted network traffic load values ​​are divided into three fuzzy sets: low, medium, and high. The transmission distance is divided into three fuzzy sets: low, medium, and high. The node energy is divided into three fuzzy sets: low, medium, and high. The end-to-end delay is divided into three fuzzy sets: low, medium, and high. The node connectivity is divided into three fuzzy sets: low, medium, and high.

4. The wireless data transmission method based on adaptive switching of communication protocols according to claim 1, characterized in that, Specifically, S303 includes: S3031: Constructing the fitness function for the firefly search optimization algorithm: Where f represents the fitness function, X represents the set of fuzzy inference rules, E represents node energy consumption, D represents end-to-end delay, T represents network throughput, β1 represents the weight coefficient of node energy consumption, β2 represents the weight coefficient of end-to-end delay, and β3 represents the weight coefficient of network throughput. S3032: Initialize firefly individuals. Each firefly individual represents a set of feasible fuzzy inference rules. Each firefly individual consists of multiple dimensional components, and each component represents a certain fuzzy inference rule. S3033: Compare each individual firefly with other individuals in the population, generate a random number u, and move them according to the following adaptive movement rules: in, This represents the position of the i-th firefly individual at iteration t+1, where ω represents the inertia weight factor. This represents the position of the i-th firefly at the t-th iteration. Let represent the position of the j-th firefly individual in the t-th iteration, β represent attraction, α represent the step size factor, sign represent the sign function, r represent a random number in the range of 0 to 1, Levy represent the Levy flight random step size, exp represent an exponential function with the natural constant e as the base, b represent the logarithmic spiral shape parameter, l represent a uniform random number between -1 and 1, and R t denoted as the adaptive switching factor at the t-th iteration, where u represents a uniform random number between 0 and 1; S3034: Update individual fitness after a firefly moves to a new location; S3035: Determine if the current iteration count has reached the maximum iteration count; if so, output the set of fuzzy inference rules represented by the firefly individual with the highest fitness to optimize the fuzzy inference rules of the fuzzy logic system; otherwise, return to continue iterating.

5. The wireless data transmission method based on adaptive switching of communication protocols according to claim 1, characterized in that, The communication protocols include: ZigBee protocol, Wi-Fi protocol, BLE protocol, LoRa protocol, NB-IoT protocol, and LTE-M protocol.

6. A wireless data transmission system based on adaptive switching of communication protocols, characterized in that, include: processor; A memory storing computer-readable instructions, which, when executed by the processor, implement the wireless data transmission method based on adaptive switching of communication protocols as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the wireless data transmission method based on adaptive switching of communication protocol as described in any one of claims 1 to 5.