Low-power-consumption wireless sensor network data processing method
By adjusting the clock frequency of the wireless sensor network, switching from high frequency to low frequency, and optimizing the data transmission process, the problem of excessive power consumption of wireless sensor networks in the prior art is solved, and a longer battery life and more reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510059732.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-18
AI Technical Summary
The existing low-power wireless sensor networks have problems with excessive power consumption during data transmission, which affects the service life of node batteries.
By optimizing the data transmission process, adjust the clock frequency of the wireless sensor network according to the actual situation of the transmission task, switch from high frequency to low frequency to reduce overall power consumption, while monitoring the stability of data transmission and restoring the clock frequency if necessary.
It realizes that while ensuring data transmission reliability, it reduces the overall power consumption of the sensor network and extends the service life of the node battery.
Smart Images

Figure CN119854922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication, and in particular to a low-power consumption wireless sensor network data processing method. Background Art
[0002] Low-power wireless sensor networks are composed of a large number of micro sensor nodes deployed in the monitoring area. These nodes form a multi-hop self-organizing network system through wireless communication. The sensor nodes in this system are usually powered by batteries. The service life of the node battery directly determines the service life of the sensor node. Therefore, the study of power consumption of wireless sensor networks is of great significance.
[0003] In the prior art, battery management technology, such as sleep mechanism and dynamic adjustment of power consumption, is usually used to extend the battery life of sensor network nodes. Chinese patent CN119052956A proposes a method and device for LoRa tree networking, which selects the optimal path and sinks it to the route near the node. Through the delayed response algorithm, the waiting time is calculated, and the higher priority ones give responses earlier, obtain the locking authority, and lock the route and node at the first level. The route that fails to lock will no longer forward the network data, and will only forward the network request from the route that is successfully locked to the gateway. After receiving the network request, the gateway returns the network response packet to the node by the original route, thereby completing the allocation of node short addresses and data communication links, effectively avoiding the problem of increased power consumption while preventing system congestion. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a low-power wireless sensor network data processing method, which optimizes the data transmission process and adjusts the clock frequency of the wireless sensor network according to the actual situation of the transmission task, aiming to ensure the reliability of data transmission of the wireless sensor network while optimizing the power consumption of the sensor network nodes. To achieve the above purpose, the present invention provides the following technical solutions:
[0005] On the one hand, a low-power wireless sensor network data processing method is provided, comprising the following steps:
[0006] S1. The node device obtains first data;
[0007] S2. The node device adds a unique serial number to the first data;
[0008] S3, the node device sends the first data to which a unique sequence number has been added to an adjacent processing device;
[0009] S4, the processing device receives the first data and determines whether the unique serial number in the first data is a continuous serial number;
[0010] S5. When the unique sequence numbers are continuous, the processing device obtains the number of times when no packet loss occurs. When the accumulated number of times when no packet loss occurs is greater than a first threshold, the processing device sends a switching instruction to the node device.
[0011] S6. The node device executes a clock frequency switching operation according to the switching instruction, and switches the first clock frequency to the second clock frequency.
[0012] Preferably, the first data is a set of data packets.
[0013] Preferably, the adding of the unique serial number to the first data at least includes: adding the corresponding unique serial number to each data packet in the data set.
[0014] Preferably, each data packet in the data packet set corresponds to a unique random number sequence number, and the random number sequence number is a number that increases sequentially.
[0015] Preferably, the step S5 at least further comprises: when the unique sequence number is discontinuous, triggering the node device to resend the corresponding data packet in the first data to the processing device.
[0016] Preferably, the step S5 at least further includes: when the accumulated number of non-packet loss times is not greater than a first threshold, returning to execute non-packet loss counting.
[0017] Preferably, in step S6, the first clock frequency is higher than the second clock frequency, and the duty cycle of the high-frequency clock is gradually reduced through the clock management module, while the duty cycle of the low-frequency clock is gradually increased to complete the switching of the first frequency to the second frequency, and the first frequency is higher than the second frequency.
[0018] Preferably, after step S6, the method further includes: the node device acquires the second data and adds a unique serial number to the second data.
[0019] Preferably, the second data to which the unique serial number has been added is sent to a processing device.
[0020] Preferably, after sending the second data to the processing device, the node device determines whether a response signal fed back by the processing device is received within a time window, and switches the clock frequency if no response signal is received within the time window.
[0021] On the other hand, the present invention also provides a system and an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the low-power wireless sensor network data processing method as described above are implemented.
[0022] In summary, the present invention has the following beneficial effects compared with the prior art:
[0023] (1) The wireless sensor network is built using the ZigBee protocol stack, which has the advantages of low power consumption, low cost, low complexity, high capacity, short delay, high security and strong anti-interference ability.
[0024] (2) The wireless sensor network transmits data by monitoring the serial number. When the receiving end finds that the data packet is lost, it can request the sending end to resend the subsequent data packets, thereby optimizing the resource utilization and performance of the network and improving the efficiency and stability of data transmission.
[0025] (3) Based on the overall status of data transmission, the wireless sensor network switches the clock frequency of the wireless sensor network from high frequency to low frequency, thereby reducing the overall power consumption of the sensor network. At the same time, to ensure that the integrity of the data is not affected during the switching process, the data sender is monitored in time to see whether the response signal is received within the time window to determine the stability of data transmission, and the network clock frequency is restored in time when data transmission is affected. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 An overall flow chart of a low-power wireless sensor network data processing method provided in this embodiment;
[0027] Figure 2 An overall flow chart of another low-power wireless sensor network data processing method provided by this embodiment; DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] The terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.
[0030] Example 1
[0031] like Figure 1 As shown, this embodiment provides a low-power wireless sensor network data processing method, such as Figure 1 As shown, the following steps are included:
[0032] 101. A node device obtains first data;
[0033] In step S1, the node device applies appropriate sensors according to the application scenario of the wireless sensor network, and deploys the sensors in the monitored area to obtain the perception data of the corresponding scenario. For example, in environmental monitoring, sensors such as temperature, humidity, air pressure, light, and CO2 concentration can be selected, and in smart homes, sensors such as temperature, humidity, air pressure, combustible gas, and human infrared can be selected. After the sensor collects the scene data, it transmits the data to the node device according to the ZigBee data format requirements, thereby completing the node device's acquisition of the data.
[0034] 102. The node device adds a unique serial number to the first data;
[0035] In step S2, the first data is a data packet set. For example, the first data X can be {x1, x2, x3, ..., x n}where x1, x2, x3, ..., x n Corresponding to the 1st-nth data packets, the adding of the unique serial number to the first data specifically refers to adding the corresponding unique serial number to each data packet in the set, each data packet in the data packet set corresponds to a unique random serial number, and the random serial number is a number that increases in sequence, and the serial number is usually added as a field in the data packet header. The node device encapsulates the data packet in the first data to be sent together with the unique serial number corresponding to the data packet into a complete data packet that meets the ZigBee protocol data format requirements. During the data packet transmission process, the serial number will be transmitted to the receiving end together with the data packet.
[0036] 103. The node device sends the first data to which a unique sequence number has been added to an adjacent processing device;
[0037] In step 103, the node device selects a suitable sending function according to the API document of the ZigBee protocol stack, and passes necessary parameters to the sending function, including the target address, the endpoint descriptor of the sending node, the cluster ID, the data packet length, and the data packet buffer pointer.
[0038] 104. The processing device receives the first data and determines whether the unique serial number in the first data is a continuous serial number;
[0039] In step 104, the processing device receives the first data and determines whether the unique serial number in the first data is a continuous serial number. Specifically, the processing device can compare the serial number of the currently received data packet with the serial number of the previous data packet. If the current sequence number is the previous sequence number plus 1 (or the incremental step specified by the protocol), the sequence number can be considered to be continuous.
[0040] 105. When the unique sequence numbers are continuous, the processing device obtains the number of times that no packet is lost;
[0041] In step 105, the log recording function of the processing device can be started to record the data packet information during the communication process. By analyzing the log file, the packet loss event can be identified and the number of packet loss and non-packet loss times can be counted. Otherwise, the data retransmission function is started.
[0042] 106. Determine whether the cumulative number of times no packet loss occurs is greater than a first threshold;
[0043] In a ZigBee network, broadcast data is forwarded layer by layer through multiple nodes to ensure that the entire network can receive the information. In order to avoid excessive flooding of broadcast packets in the network, the ZigBee Alliance sets a limit of only 8 broadcast packets to be sent within 9 seconds. Therefore, in step 106, the first threshold may be 8 times.
[0044] 107. When the accumulated number of times of no packet loss is greater than a first threshold, the processing device sends a switching instruction to the node device;
[0045] In step 107, when the cumulative number of non-packet loss times is greater than the first threshold, the processing device constructs a data packet containing a switching instruction, which usually includes the address of the node device, the switching command, the target frequency parameter, etc. Otherwise, it will return to continue to obtain the number of non-packet loss times.
[0046] 108. The node device executes a clock frequency switching operation according to the switching instruction, and switches the first clock frequency to a second clock frequency.
[0047] The clock frequency in the wireless sensor network is generated by an internal RC oscillator, or it can also be provided by an external crystal oscillator. In the data transmission process of the wireless sensor network, a clock frequency of 32 MHz can be selected for data transmission. The switching clock frequency can be further divided by a timer to obtain a lower frequency. For example, in the HalTimerInit function, the frequency of the timer can be adjusted by setting the division coefficient of the timer. For example, the clock frequency of 32 MHz can be adjusted to a clock frequency of 16 MHz by dividing by two, or the clock frequency can be smoothly adjusted by a special clock module. In this way, the instability of data transmission caused by switching the clock frequency can be minimized.
[0048] During the clock frequency switching process, if a timer is used for frequency division, that is, switching directly from high frequency to low frequency, it will cause short-term clock instability or interruption, which will affect the normal data transmission. Therefore, a smooth transition method is selected in this step. During switching, a special clock management module is used to gradually reduce the duty cycle or frequency of the high-frequency clock, and gradually increase the duty cycle or frequency of the low-frequency clock to ensure the continuity and stability of the clock signal. In addition, during the switching process, each time the duty cycle is adjusted, the serial number is monitored at the receiving end to see if it is continuous. By monitoring the continuity of the serial number, it is determined whether there is an abnormality in the data transmission. Once an abnormality occurs in the data transmission, the duty cycle is restored to the previous level.
[0049] Example 2
[0050] like Figure 2 As shown, steps 201-209 are the same as steps 101-109 in Example 1. After step 209, the node device obtains the second data, which is a set of data packets, and then the node device sends the second data to the processing device. It should be noted that in this Example 2, the second data does not need to be added with a unique serial number. After the node device sends the second data to the processing device, it is also necessary to determine whether the response signal fed back by the processing device is received within the time window. If the node device does not receive the response signal within the time window, the clock frequency will be switched, and the high-frequency clock signal will be adjusted to a low-frequency clock signal. In the process of adjusting the high-frequency signal to the low-frequency clock signal, the high-frequency signal can be optionally directly adjusted to a low-frequency signal to restore the original data transmission state and ensure the continuity of data transmission.
[0051] In summary, the wireless sensor network of the embodiment of the present invention switches the clock frequency of the wireless sensor network from high frequency to low frequency based on the overall state of data transmission, thereby reducing the overall power consumption of the sensor network. At the same time, in order to ensure that the integrity of the data will not be affected during the switching process, the data sending end is timely monitored to determine whether the response signal is received within the time window to determine the stability of data transmission, and the clock frequency of the network is promptly restored when the data transmission is affected. The wireless sensor network is a network built using the ZigBee protocol stack, which has the advantages of low power consumption, low cost, low complexity, high capacity, short delay, high security and strong anti-interference ability. The wireless sensor network performs data transmission by monitoring the serial number. When the receiving end finds that the data packet is lost, it can request the sending end to resend the subsequent data packet, optimize the resource utilization and performance of the network, and improve the efficiency and stability of data transmission.
[0052] Based on the same inventive concept, an embodiment of the present invention also provides a system or electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of a low-power wireless sensor network data processing method as described above are implemented.
[0053] The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of the electronic device. In this embodiment, the processor is used to run the program code or process data stored in the memory, such as the program code of the target recognition algorithm.
[0054] The memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device. In other embodiments, the memory can also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory can also include both the internal storage unit of the electronic device and its external storage device. In this embodiment, the memory is generally used to store the operating method and various application software installed in the electronic device, such as the program code of the network data processing method, etc. In addition, the memory can also be used to temporarily store various types of data that have been output or are to be output.
[0055] Based on the same inventive concept, the present invention further provides a readable storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network data processing method described above are implemented.
[0056] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0058] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0060] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A low-power wireless sensor network data processing method, characterized in that: The steps include: S1. The node device obtains first data; S2. The node device adds a unique serial number to the first data; S3, the node device sends the first data to which a unique sequence number has been added to an adjacent processing device; S4, the processing device receives the first data and determines whether the unique serial number in the first data is a continuous serial number; S5. When the unique sequence numbers are continuous, the processing device obtains the number of times when no packet loss occurs. When the accumulated number of times when no packet loss occurs is greater than a first threshold, the processing device sends a switching instruction to the node device. S6. The node device executes a clock frequency switching operation according to the switching instruction, and switches the first clock frequency to the second clock frequency.
2. The low-power wireless sensor network data processing method according to claim 1, characterized in that: The first data is a set of data packets.
3. The low-power wireless sensor network data processing method according to claim 2, characterized in that: The adding the unique serial number to the first data at least comprises: A corresponding unique sequence number is added to each data packet in the data including set.
4. The low-power wireless sensor network data processing method according to claim 3, characterized in that: Each data packet in the data packet set corresponds to a unique random number sequence number, and the random number sequence number is a number that increases sequentially.
5. The low-power wireless sensor network data processing method according to claim 1, characterized in that: The step S5 at least includes: When the unique sequence number is non-continuous, the node device is triggered to resend the corresponding data packet in the first data to the processing device.
6. The low-power wireless sensor network data processing method according to claim 1, characterized in that: The step S5 at least includes: When the accumulated number of non-packet loss times is not greater than the first threshold, the process returns to executing non-packet loss counting.
7. The low-power wireless sensor network data processing method according to claim 1, characterized in that: In step S6, the duty cycle of the high-frequency clock is gradually reduced and the duty cycle of the low-frequency clock is gradually increased by the clock management module to complete the switching from the first frequency to the second frequency, where the first frequency is higher than the second frequency.
8. The low-power wireless sensor network data processing method according to claim 1, characterized in that: After step S6, the method further includes: The node device obtains the second data and adds a unique serial number to the second data.
9. The low-power wireless sensor network data processing method according to claim 8, characterized in that: The second data to which the unique serial number has been added is sent to a processing device.
10. The low-power wireless sensor network data processing method according to claim 9, characterized in that: After the node device sends the second data to the processing device, it determines whether a response signal fed back by the processing device is received within a time window. If no response signal is received within the time window, the clock frequency is switched.
Citation Information
Patent Citations
LoRa tree networking method, device and equipment
CN119052956A