Wireless data transmission method and system based on communication protocol adaptive switching

By dynamically determining the packet size and transmission time gap and adaptively forming a communication protocol, the problem that existing wireless sensors cannot work under different distances and bandwidth conditions is solved, and efficient energy utilization and flexible data transmission are achieved.

CN119584201AActive Publication Date: 2025-03-07IDQ SCIENCE & TECHNOLOGY DEVELOPMENT (GUANGDONG HENGQIN) CO LTD +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411752449.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-10-24
Filing Date
2024-12-02
Publication Date
2025-03-07
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Existing wireless sensors can only work in a single communication protocol mode, and cannot meet the practical application needs that require work at different distances and bandwidth conditions at the same time, resulting in inefficient energy utilization.

Method used

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

Benefits of technology

It realizes seamless switching between different communication protocols of sensor networks, supports long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission, meets application needs under different conditions, reduces unnecessary power consumption, and extends the working time of sensor nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119584201A_ABST
    Figure CN119584201A_ABST
Patent Text Reader

Abstract

The invention provides a wireless data transmission method and system based on communication protocol adaptive switching, and relates to the technical field of data transmission, and the method comprises the steps: obtaining a signal collection instruction; acquiring the time when the signal acquisition instruction is received, and automatically calibrating a clock system of the wireless sensor network; dynamically determining the size of a data packet and a sending time slot according to the current sensor network state; self-adaptively forming a corresponding communication protocol according to the set size of the data packet and the sending time slot; acquiring sensor data according to a communication protocol; and sending the sensor data according to a communication protocol. According to the invention, seamless switching of the sensor network in different communication protocols can be realized, long-distance low-power-consumption environment monitoring and short-distance high-bandwidth data transmission requirements can be met, wide practical application requirements can be met, unnecessary power consumption can be reduced, and the energy utilization efficiency of the sensor in use can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a wireless data transmission method and system based on adaptive switching of communication protocols. Background Art

[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] The research found that existing sensor developments are all targeted at one mode to send data from a wireless sensor network, which means that existing sensor products on the market can only realize data information for a single situation.

[0004] In practical applications, some projects require sensors to work at different distances and bandwidths, which greatly limits practical engineering applications. For example, some smart city applications may require sensors to be able to monitor remotely and transmit data at short distances with high bandwidth at specific times or environments. Existing technologies cannot meet these requirements at the same time.

[0005] On the other hand, using only a single communication protocol for data transmission can also lead to inefficient energy utilization during sensor use. For example, high-bandwidth protocols (such as Wi-Fi) are very effective for short-distance transmission, but in scenarios where data is transmitted over long distances or at low frequencies, using such high-bandwidth protocols will result in a lot of unnecessary energy consumption. Furthermore, although low-bandwidth protocols can save energy, they are unable to cope with the need to efficiently transmit large amounts of data. Summary of the invention

[0006] In order to solve the technical problem that the prior art only adopts a single communication protocol for data transmission, which cannot meet the needs of practical applications that require sensors to work at different distances and under different bandwidth conditions, and easily leads to low energy utilization efficiency of sensors during use, the present invention provides a wireless data transmission method and system based on adaptive switching of communication protocols.

[0007] The technical solution provided by the embodiment of the present invention is as follows:

[0008] First aspect

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

[0010] S1: Get signal acquisition instructions;

[0011] S2: Obtaining the time when the signal collection instruction is received, and automatically calibrating the clock system of the wireless sensor network;

[0012] S3: Dynamically determine the data packet size and sending time interval according to the current sensor network status;

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

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

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

[0016] Second aspect

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

[0018] processor;

[0019] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the wireless data transmission method based on adaptive switching of communication protocols as described in the first aspect is implemented.

[0020] The third aspect

[0021] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the wireless data transmission method based on adaptive switching of communication protocols as described in the first aspect is implemented.

[0022] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0023] In the present invention, according to the current sensor network state, the data packet size and the sending time interval are dynamically determined, and then the corresponding communication protocol is adaptively formed. Sensor data is collected and sent according to the formed communication protocol, so that the sensor network can seamlessly switch between different communication protocols, supporting both long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission requirements. It can meet the needs of practical applications that require sensors to work at different distances and different bandwidth conditions at the same time, can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors in use. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A schematic flow chart of a wireless data transmission method based on adaptive switching of communication protocols provided by an embodiment of the present invention;

[0026] Figure 2 A schematic structural diagram of a wireless data transmission system based on adaptive switching of communication protocols provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0028] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0029] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0030] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0031] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0032] Reference Manual Attached Figure 1 , shows a flow chart of a wireless data transmission method based on adaptive switching of communication protocols provided in an embodiment of the present invention.

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

[0034] S1: Get signal acquisition instructions.

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

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

[0037] It should be noted that the automatic calibration of the clock system of the wireless sensor network can ensure the one-to-one correspondence of the time carried by the sensor nodes. This ensures that all sensor nodes operate under the same time reference, avoiding errors caused by clock drift. This allows the data collected by all sensors to be arranged in the correct time sequence, ensuring the accuracy of the data.

[0038] S3: Dynamically determine the data packet size and sending time interval according to the current sensor network status.

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

[0040] Among them, the network traffic load prediction value is the prediction result of the data transmission volume in the network in the future period of time. It is estimated by using machine learning or statistical models to analyze historical network traffic data and combine the current network operation status (such as bandwidth utilization, node activity, packet transmission frequency, etc.) to estimate future network traffic trends. When the load prediction value is high, the system needs to reduce the packet size and increase the sending time gap to prevent congestion; when the load is low, the system can increase the packet size and shorten the gap to improve bandwidth utilization and transmission efficiency. This adaptive adjustment strategy ensures that the network can maintain efficient and stable operation under different traffic load conditions.

[0041] Optionally, the network traffic load prediction value is determined by: determining the network traffic load prediction value through three-layer stacked gated loop units.

[0042] Among them, the Gated Recurrent Unit (GRU) is an improved Recurrent Neural Network (RNN) that aims to solve the long-term dependency and gradient vanishing problems of traditional RNN. By introducing a gating mechanism, the GRU model can effectively capture the long-term dependency in sequence data and better maintain gradient stability during training.

[0043] The specific structure of the three-layer stacked gated loop unit proposed in the present invention is: the three-layer stacked gated loop unit includes a first gated loop unit, a second gated loop unit and a third gated loop unit which are stacked. The historical data of the network traffic load 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 the fully connected layer, and the fully connected layer is used to fuse the hidden states in the candidate layers of the first gated loop unit, the second gated loop unit and the third gated loop unit to obtain a comprehensive hidden state, and then use the comprehensive hidden state to predict the network traffic load.

[0044] For each gated recurrent 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 represents the output vector of the update gate at time t, σ() represents the activation function, and W uz represents the weight matrix between the input layer and the update gate, x t represents the network traffic load at time t, W hz represents the self-connection weight matrix of the update gate between time t and time t-1, h t-1 represents the hidden state at time t-1, b z represents the bias term of the update gate, r t represents the output vector of the reset gate at time t, W ur represents the weight matrix between the input layer and the reset gate, W hr represents the self-connection weight matrix between the reset gate at time t and time t-1, b r represents the bias term of the reset gate, c t represents the output vector of the candidate layer at time t, W uc Represents the weight matrix between the input layer and the candidate layer, W hc represents the self-connection weight matrix between the candidate layer at time t and time t-1, b c represents the bias term of the candidate layer, ⊙ represents the element-wise product operation, and h t represents the hidden state at time t.

[0050] Furthermore, the comprehensive hidden state is specifically:

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

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

[0053] Among them, those skilled in the art can set the weight coefficient ω1 of the first hidden state, the weight coefficient ω2 of the second hidden state, and the weight coefficient ω3 of the third hidden state according to actual conditions, and the present invention does not limit this.

[0054] It should be noted that by fusing the first hidden state, the second hidden state and the third hidden state, and weighting and combining these features according to different weight coefficients, a comprehensive hidden state is generated. This method can not only capture features at different levels, but also better express the timing characteristics of network traffic globally.

[0055] Furthermore, the network traffic load is predicted by comprehensive hidden states:

[0056]

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

[0058] In the present invention, the three-layer stacked structure can capture the long-term dependencies and short-term fluctuations in network traffic load by extracting higher-order features layer by layer, making the model more capable of expressing time series. By processing layer by layer, the model can better predict future traffic loads without losing details.

[0059] Among them, the transmission distance refers to the physical distance covered by the signal when data is transmitted from one node to another. In wireless communication, the transmission distance directly affects the signal strength, transmission rate, power consumption and network stability. In wireless communication, the signal strength decays exponentially with the increase of transmission distance. A longer transmission distance means that data packets are more likely to be lost or erroneous during transmission, which requires the data packet size to be smaller to reduce the error probability of a single data packet. At the same time, increasing the frequency of data retransmission will cause network congestion.

[0060] Among them, node energy refers to the remaining battery energy or power supply status of the wireless sensor node. In IoT devices, energy consumption is a key limiting factor, especially for battery-powered nodes. When the node energy level is low, it is necessary to minimize energy consumption. Transmitting large data packets will cause the node to consume a lot of energy in a short period of time, and frequent transmission will also accelerate the depletion of energy. Therefore, when the node energy is low, it is ideal to choose smaller data packets and longer transmission time intervals to ensure that the node can run longer.

[0061] Among them, end-to-end delay (EED) refers to the time consumed in the entire process from sending a data packet to receiving it. It includes the influence of multiple factors, such as transmission time, processing time, queue delay, etc. In scenarios with high real-time requirements (such as remote control or video streaming), if the end-to-end delay is high, the real-time performance of data transmission will be affected. In this case, transmitting larger data packets will further increase the delay because large data packets take longer to transmit and process. Therefore, smaller data packets can be transmitted and responded to more quickly, reducing delays.

[0062] Among them, node connectivity refers to the number of connections between a node and other nodes, reflecting the frequency or centrality of the node's communication in the network. It is a key indicator of the network topology and represents the communication load of the node. When the node connectivity is high, it needs to handle data transmission tasks of multiple connected nodes at the same time. In order to prevent the node from being overloaded, smaller data packets should be selected to reduce the load of a single transmission, and the sending time interval should be appropriately increased to avoid network congestion.

[0063] Among them, the fuzzy-assisted firefly search optimization algorithm is a new optimization algorithm proposed by the present invention, which combines the fuzzy logic system with the firefly algorithm. This method uses fuzzy logic to deal with uncertainty and ambiguity in complex problems, and optimizes the problem-solving process through the firefly algorithm. The combination of the two can improve the efficiency and accuracy of the search process, and is suitable for complex, multi-dimensional, and multi-constrained optimization problems.

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

[0065] S301: Taking the predicted value of network traffic load, transmission distance, node energy, end-to-end delay and node connectivity as input variables, the input variables are converted into fuzzy sets.

[0066] Optionally, S301 specifically includes: dividing the network traffic load prediction value into three fuzzy sets of low, medium and high. Dividing the transmission distance into three fuzzy sets of low, medium and high. Dividing the node energy into three fuzzy sets of low, medium and high. Dividing the end-to-end delay into three fuzzy sets of low, medium and high. Dividing the node connectivity into three fuzzy sets of low, medium and high.

[0067] S302: Constructing fuzzy reasoning rules of a fuzzy logic system with network traffic load prediction value, transmission distance, node energy, end-to-end delay and node connectivity as conditions, and data packet size and sending time interval as output results.

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

[0069] Among them, the x1 level is specifically any one of low, medium, and high school, the x2 level is specifically any one of low, medium, and high school, the x3 level is specifically any one of low, medium, and high school, the x4 level is specifically any one of low, medium, and high school, and the x5 level is specifically any one of low, medium, and high school.

[0070] For example, when the network traffic load prediction value is high, the transmission distance is long, the node energy is medium, the end-to-end delay is low, and the node connectivity is high, the system will select medium-sized data packets and longer transmission time gaps. This can avoid too many data packets occupying network resources while maintaining a certain transmission efficiency, prevent network congestion caused by high load and long-distance transmission, and save node energy and extend its working time. When the network traffic load prediction value is low, the transmission distance is short, the node energy is high, the end-to-end delay is medium, and the node connectivity is low, the system will select larger data packets and shorter transmission time gaps. This can make full use of bandwidth resources and quickly transmit data. Because the node energy is sufficient and the transmission distance is short, the system can increase the transmission rate, reduce delays, and improve transmission efficiency.

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

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

[0073] S3031: Construct the fitness function of the firefly search optimization algorithm:

[0074]

[0075] Where f represents the fitness function, X represents the set of fuzzy inference rules, E represents the node energy consumption, D represents the end-to-end delay, T represents the 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] Among them, those skilled in the art can set the weight coefficient β1 of node energy consumption, the weight coefficient β2 of end-to-end delay, and the weight coefficient β3 of network throughput according to actual conditions, and the present invention does not limit this.

[0077] In the present invention, by incorporating three important indicators, namely energy consumption, end-to-end delay and throughput, into the fitness function, a balance is achieved between energy efficiency and performance, thereby improving the intelligence and adaptability of the system, so that the system can always maintain the optimal operating state under different network states and resource conditions.

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

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

[0080]

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

[0082] It should be noted that when the generated random number is greater than the adaptive switching factor, the individual will move using the Levy flight strategy, which is a random walk mode with long-distance jumps that enables the individual to conduct a large-scale exploration in the search space. This random step size helps prevent the algorithm from falling into the local optimal solution, thereby enhancing the global search capability and enabling the algorithm to effectively explore the entire search space. 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 in a small range near the current solution, thereby improving the accuracy of local search. Combined with the effects of the exponential function and the cosine function, the individual can conduct a more flexible search around the optimal solution to ensure that the quality of the local solution is fully developed.

[0083] In the present invention, a good balance can be maintained between global search and local development, which not only ensures that individuals can fully explore in complex search spaces, but also can perform precise optimization when approaching the optimal solution, and finally find a high-quality solution. This design is particularly suitable for multi-objective optimization scenarios, and can dynamically adjust the search strategy according to specific application requirements, thereby improving search efficiency and solution quality.

[0084] Optionally, the attraction is specifically:

[0085]

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

[0087] In the present invention, when the distance is small, the attraction is large, which prompts the individual to move closer to the optimal solution more quickly. This strong attraction enables the fireflies to converge quickly to the vicinity of the optimal solution. When the distance is large, the attraction is small, which means that the mutual influence between individuals is weakened, thereby maintaining a certain degree of search independence and exploration ability, and preventing individuals from converging to the local optimum too early.

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

[0089]

[0090] in, represents the fitness value of the global best position at the t-1th iteration, Represents the fitness value of the global best position at the t-2th iteration.

[0091] In the present invention, by comparing the global best fitness values ​​of the first two iterations, the adaptive switching factor can determine whether the algorithm has entered the local optimal area. If the fitness values ​​of the two iterations differ greatly, it means that there is still a lot of room for improvement. At this time, the adaptive switching factor is small, and the algorithm tends to perform global search; if the difference is small, it means that the system may be close to the local optimum. At this time, the adaptive switching factor is large, and the algorithm turns to local fine search.

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

[0093]

[0094] Among them, u obeys The normal distribution of v follows The normal distribution of , λ represents the exponential parameter.

[0095]

[0096] Among them, τ is the standard Gamma function.

[0097] In the present invention, Levy flight is a random walk model with long jump characteristics. By introducing an uneven step size distribution, the algorithm is able to make a larger range of jumps during the search process. Unlike conventional Gaussian random step sizes, Levy flight can generate longer jumps, thereby expanding the search space.

[0098] S3034: After the firefly individual moves to a new position, update the individual fitness.

[0099] S3035: Determine whether the current number of iterations has reached the maximum number of iterations. If so, output the fuzzy inference rule set represented by the firefly individual with the highest current fitness to optimize the fuzzy inference rules of the fuzzy logic system. Otherwise, return to continue iteration.

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

[0101] S304: Dynamically determine the optimal data packet size and sending time interval through the optimized fuzzy logic system.

[0102] S4: Adaptively form a corresponding communication protocol according to 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. The present invention does not limit the specific type of the communication protocol.

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

[0105] The sensor data may specifically be sensor data such as an acceleration sensor, a temperature sensor, a strain sensor, a displacement sensor or a pressure sensor, and the present invention does not limit the specific sensor data type.

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

[0107] The following are two specific application scenarios:

[0108] The first application scenario: When the user's required transmission distance is greater than 400m, the control module sends an acquisition instruction, the timing module obtains the current time and updates the clock system of the entire wireless sensor network. The setting module sets the data transmission time interval and the size of the data packet carried by a single node, and selects the setting module 1 in combination with the working conditions to form a one-to-one corresponding wireless communication protocol for the wireless communication module, according to the time interval of 7.8ms and the number of bytes of the data packet written by a single node is 127 bytes to transmit data. The communication standard adopted by the wireless communication module 1 is IEEE 802.15.4, and the corresponding RF power range is 0dbm to 20dbm. At the same time, it can ensure the stable and synchronous transmission of data, and the resolution of the timestamp is 1ns. Then the data acquisition and processing module 2 will collect data according to the communication protocol, and transmit data to the sensor module 1 while collecting real-time data, so that the sensor module can achieve long-distance low-bandwidth (250kbps) data acquisition, and the maximum transmission distance is up to 2km.

[0109] The second application scenario: When the user's required transmission distance is less than 400m, the control module sends an acquisition instruction, the timing module obtains the current time and updates the clock system of the entire wireless sensor network. The setting module sets the data transmission time interval and the size of the data packet carried by a single node, and selects the case of non-module 1 in combination with the working conditions. For example, if the setting module 2 is selected, the wireless communication module forms a one-to-one wireless communication protocol, and transmits data according to the time interval of 3.9ms and the number of bytes of the data packet written by a single node is 255 bytes. The RF power range corresponding to the wireless communication module is 0dbm to 20dbm. At the same time, it can ensure high-speed, stable and synchronous transmission of data, and the resolution of the timestamp is 1ns. After that, the data acquisition and processing module 2 will collect data according to the communication protocol, and synchronously transmit the collected real-time data to the sensor module 1, so that the sensor module can achieve close-range (within 400m) high-bandwidth (1Mbps) data acquisition, and the network bandwidth is 4 times that of the wireless communication module 1 corresponding to the first application scenario.

[0110] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0111] In the present invention, according to the current sensor network state, the data packet size and the sending time interval are dynamically determined, and then the corresponding communication protocol is adaptively formed. Sensor data is collected and sent according to the formed communication protocol, so that the sensor network can seamlessly switch between different communication protocols, supporting both long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission requirements. It can meet the needs of practical applications that require sensors to work at different distances and different bandwidth conditions at the same time, can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors in use.

[0112] Reference Manual Attached Figure 2 , showing a schematic structural diagram of a wireless data transmission system based on adaptive switching of communication protocols provided by the present invention.

[0113] The present invention further provides a wireless data transmission system 20 based on adaptive switching of communication protocols, which is 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, a wireless data transmission method based on adaptive switching of communication protocols as in the method embodiment is implemented.

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

[0117] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0118] In the present invention, according to the current sensor network state, the data packet size and the sending time interval are dynamically determined, and then the corresponding communication protocol is adaptively formed. Sensor data is collected and sent according to the formed communication protocol, so that the sensor network can seamlessly switch between different communication protocols, supporting both long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission requirements. It can meet the needs of practical applications that require sensors to work at different distances and different bandwidth conditions at the same time, can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors in use.

[0119] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0120] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link 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. When implemented by software, the above embodiments can be implemented in whole or in part in the form of 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, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0122] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0123] In the present 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 refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0124] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean 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 appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0127] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

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

[0130] If the functions are implemented in the form of 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0131] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the wireless data transmission method based on adaptive switching of communication protocols as described in the method embodiment is implemented.

[0132] A computer-readable storage medium provided by the present invention can implement the steps and effects of the wireless data transmission method based on adaptive switching of communication protocols in the above method embodiment. To avoid repetition, the present invention will not go into details.

[0133] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0134] In the present invention, according to the current sensor network state, the data packet size and the sending time interval are dynamically determined, and then the corresponding communication protocol is adaptively formed. Sensor data is collected and sent according to the formed communication protocol, so that the sensor network can seamlessly switch between different communication protocols, supporting both long-distance low-power environmental monitoring and short-distance high-bandwidth data transmission requirements. It can meet the needs of practical applications that require sensors to work at different distances and different bandwidth conditions at the same time, can reduce unnecessary power consumption, extend the working time of sensor nodes, and improve the energy utilization efficiency of sensors in use.

[0135] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0136] There are a few points to note:

[0137] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

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

[0139] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0140] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A wireless data transmission method based on adaptive switching of communication protocols, characterized in that: include: S1: Get signal acquisition instructions; S2: Obtaining the time when the signal collection instruction is received, and automatically calibrating the clock system of the wireless sensor network; S3: Dynamically determine the data packet size and sending time interval according to the current sensor network status; S4: Adaptively form a corresponding communication protocol according to the set data packet size and sending time interval; S5: collecting sensor data according to the communication protocol; S6: Send the sensor data according to the communication protocol.

2. The wireless data transmission method based on adaptive switching of communication protocols according to claim 1 is characterized in that: The S3 is specifically: According to the predicted value of network traffic load, transmission distance, node energy, end-to-end delay and node connectivity, the optimal data packet size and sending time interval are dynamically determined through the fuzzy-assisted firefly search optimization algorithm.

3. The wireless data transmission method based on adaptive switching of communication protocols according to claim 2 is characterized in that: The S3 specifically includes: S301: Taking the network traffic load prediction value, transmission distance, node energy, end-to-end delay and node connectivity as input variables, converting the input variables into fuzzy sets; S302: constructing fuzzy reasoning rules of a fuzzy logic system with network traffic load prediction value, transmission distance, node energy, end-to-end delay and node connectivity as conditions and data packet size and transmission time interval as output results; S303: Based on the output result of the fuzzy logic system, the fuzzy reasoning rules of the fuzzy logic system are optimized by using the firefly search optimization algorithm; S304: Dynamically determine the optimal data packet size and sending time interval through the optimized fuzzy logic system.

4. The wireless data transmission method based on adaptive switching of communication protocols according to claim 3 is characterized in that: The method for determining the network traffic load prediction value is specifically as follows: The network traffic load prediction value is determined by three layers of stacked gated loop units.

5. The wireless data transmission method based on adaptive switching of communication protocols according to claim 3 is characterized in that: The S301 specifically includes: Dividing the network traffic load prediction value into three fuzzy sets: low, medium and high; Divide the transmission distance into three fuzzy sets: low, medium and high; Divide the node energy into three fuzzy sets: low, medium and high; Dividing the end-to-end delay into three fuzzy sets: low, medium, and high; The node connectivity is divided into three fuzzy sets: low, medium and high.

6. The wireless data transmission method based on adaptive switching of communication protocols according to claim 5, characterized in that: The specific form of the fuzzy reasoning rules of the fuzzy logic system is: When the network traffic load prediction value is x1, the transmission distance is x2, the node energy is x3, the end-to-end delay is x4, and the node connectivity is x5, the data packet size is determined to be y1 and the sending time interval is y2; Among them, the x1 level is specifically any one of low, medium, and high school, the x2 level is specifically any one of low, medium, and high school, the x3 level is specifically any one of low, medium, and high school, the x4 level is specifically any one of low, medium, and high school, and the x5 level is specifically any one of low, medium, and high school.

7. The wireless data transmission method based on adaptive switching of communication protocols according to claim 1, characterized in that: The S303 specifically includes: S3031: Construct the fitness function of the firefly search optimization algorithm: Where f represents the fitness function, X represents the set of fuzzy inference rules, E represents the node energy consumption, D represents the end-to-end delay, T represents the 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 feasible fuzzy inference rule set. Each firefly individual is composed of multiple dimensional components, and each component represents a fuzzy inference rule. S3033: Compare each firefly individual with other individuals in the population, generate a random number u, and move according to the following adaptive movement rules: in, represents the position of the i-th firefly individual at the t+1th iteration, ω represents the inertia weight factor, represents the position of the i-th firefly individual at the t-th iteration, represents the position of the j-th firefly individual at the t-th iteration, β represents the attraction, α represents the step factor, sign represents the sign function, r represents a random number in the range of 0 to 1, Levy represents the Levy flight random step, exp represents the exponential function with the natural constant e as the base, b represents the logarithmic spiral shape parameter, l represents a uniform random number between -1 and 1, R t represents the adaptive switching factor at the tth iteration, and u represents a uniform random number between 0 and 1; S3034: After the firefly individual moves to a new position, update the individual fitness; S3035: Determine whether the current number of iterations has reached the maximum number of iterations; if so, output the fuzzy inference rule set represented by the firefly individual with the highest current fitness to optimize the fuzzy inference rules of the fuzzy logic system; otherwise, return to continue iteration.

8. 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.

9. A wireless data transmission system based on adaptive switching of communication protocols, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the wireless data transmission method based on adaptive switching of communication protocols as claimed in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a wireless data transmission method based on adaptive switching of communication protocols as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Wireless sensor network data fusion method

    CN107295453A

  • Product quality prediction method and device of RBF model based on firefly algorithm optimization

    CN113361751A

  • Reactive power optimization method, device and equipment for power distribution network and storage medium

    CN116805178A

  • Load imbalance intelligent early warning regulation and control system based on cloud edge computing

    CN118199264A

  • Method for realizing three-dimensional path planning of low-altitude unmanned aerial vehicle in complex mountainous region

    CN118642528A