Search

CN-122001957-A - Thermometer measurement data transmission method based on WIFI network

CN122001957ACN 122001957 ACN122001957 ACN 122001957ACN-122001957-A

Abstract

The invention relates to the technical field of data compression transmission of the Internet of things, in particular to a thermometer measurement data transmission method based on a WIFI network. And carrying out self-adaptive compression on the feature vector by using the pre-training model to generate a compressed feature code stream. And carrying out differential comparison on the current compressed code stream and the reference code stream in the history buffer memory, generating a differential feature update packet, and packaging the differential feature update packet and decoding auxiliary information into a transmission frame. And dynamically selecting a rate and a slicing strategy according to the real-time WIFI channel quality to finish data transmission. According to the method, by means of a dynamic segmentation and differential compression mechanism, efficient representation and low redundancy transmission of temperature data are achieved, and equipment power consumption and network bandwidth are effectively saved.

Inventors

  • SHEN ZHOUHONG

Assignees

  • 宁波中博电器有限公司

Dates

Publication Date
20260508
Application Date
20260317

Claims (10)

  1. 1. The thermometer measurement data transmission method based on the WIFI network is characterized by comprising the following steps of: Acquiring an original temperature measurement sequence generated by thermometer equipment in a preset sampling period, and performing outlier detection and smoothing correction processing on the original temperature measurement sequence to generate a standard temperature measurement sequence; carrying out dynamic segmentation processing on the standard temperature measurement sequence, dividing the measurement sequence into a plurality of measurement paragraphs according to the temperature change rate and the steady-state duration, and extracting paragraph feature vectors for each measurement paragraph; Performing adaptive compression processing on paragraph feature vectors of each measured paragraph by using a pre-trained compression coding model to generate a compressed feature code stream, and simultaneously generating decoding auxiliary information corresponding to the compressed feature code stream; performing differential comparison on the compressed characteristic code stream of the current sampling period and a reference compressed characteristic code stream in a history cache database to generate a differential characteristic update packet; Combining the differential feature update package with the decoding auxiliary information according to a preset encapsulation format, adding a time stamp and a device identifier, and generating a WIFI transmission data frame; Detecting a current channel quality parameter in a WIFI network channel, dynamically selecting a transmission rate and a fragmentation strategy based on the channel quality parameter, and performing fragmentation and encapsulation processing on the WIFI transmission data frame to generate a plurality of WIFI data fragmentation packets; and sending the plurality of WIFI data fragment packets to a designated cloud server through the WIFI network interface, and monitoring the transmission confirmation state of each fragment packet in the sending process.
  2. 2. The WIFI network-based thermometer measurement data transmission method according to claim 1, further comprising: If all the transmission acknowledgements are not received within the preset retransmission time, regenerating a corresponding WIFI data fragment packet based on the WIFI transmission data frame according to the missing fragment packet identification to selectively retransmit; after receiving all WIFI data fragment packets, the cloud server reorganizes the WIFI data fragment packets according to the encapsulation format, and analyzes the difference feature update packets and the decoding auxiliary information; and the cloud server rebuilds the differential feature update package according to the decoding auxiliary information and the reference compressed feature code stream in the history cache database, and recovers the standard temperature measurement sequence of the current sampling period.
  3. 3. The WIFI network-based thermometer measurement data transmission method according to claim 1, wherein the dynamically segmenting the standard temperature measurement sequence into a plurality of measurement segments according to a temperature change rate and a steady state duration, and extracting a segment feature vector for each measurement segment, comprises: calculating the temperature difference between adjacent measuring points in the standard temperature measuring sequence to obtain an instantaneous temperature change rate sequence; setting a temperature change rate threshold and minimum steady-state continuous points, scanning the instantaneous temperature change rate sequence, and identifying a section with the temperature change rate continuously lower than the temperature change rate threshold as a steady-state candidate section; For each steady state candidate section, verifying whether the number of measurement points contained in each steady state candidate section is greater than or equal to the minimum steady state continuous point number, and marking the steady state candidate section meeting the condition as a steady state measurement section; Dividing the part of the standard temperature measurement sequence which does not belong to any steady-state measurement section into a plurality of transient measurement sections according to the inflection point of the temperature change trend; Calculating the average temperature value, the temperature variance and the paragraph duration of each steady-state measurement paragraph to form a steady-state characteristic subvector; Calculating the starting temperature, the ending temperature, the maximum change rate and the paragraph duration of each transient measurement paragraph to form transient characteristic sub-vectors; Combining the steady state feature sub-vector or transient feature sub-vector of each paragraph with the start time offset of the paragraph in the whole sequence to jointly form the paragraph feature vector of the paragraph.
  4. 4. The WIFI network-based thermometer measurement data transmission method according to claim 1, wherein the adaptively compressing the paragraph feature vector of each measurement paragraph with the pre-trained compression coding model to generate a compressed feature code stream, and generating decoding auxiliary information corresponding to the compressed feature code stream, includes: Inputting the paragraph feature vector into a feature dimension reduction layer of a pre-trained compression coding model, and mapping the paragraph feature vector with high dimension into a potential feature representation with low dimension; a quantization encoder for inputting the low-dimensional latent feature representation into the pre-trained compression coding model, and for quantizing successive latent feature representations into discrete symbol index sequences; performing lossless compression coding on the discrete symbol index sequence by using an entropy coder to generate a binary compression characteristic code stream; In the process of quantization coding, synchronously recording a quantization codebook mark and a quantization step length parameter used; In the entropy coding process, synchronously generating probability model parameters used by the entropy coder; and combining the quantized codebook identification, the quantized step length parameter and the probability model parameter to generate the decoding auxiliary information.
  5. 5. The WIFI network-based thermometer measurement data transmission method according to claim 4, wherein the performing the differential comparison between the compressed feature code stream of the current sampling period and the reference compressed feature code stream in the history buffer database, generating the differential feature update packet includes: The history cache database stores a reference compressed characteristic code stream corresponding to the last successful transmission period; Reading a reference compressed characteristic code stream corresponding to the last successful transmission period from the history cache database; Performing length alignment processing on the compressed characteristic code stream of the current sampling period and the reference compressed characteristic code stream, and performing zero filling on the part with insufficient length at the tail part; the two aligned compressed characteristic code streams are compared bit by bit, and positions with different bit values are marked; Encoding the position information with different bit values and the bit values corresponding to the position information in the compressed characteristic code stream of the current sampling period according to the position sequence to generate a bit differential sequence; Counting the run length of continuous identical bit values in the bit differential sequence, and performing run length coding compression on the bit differential sequence; and encapsulating the bit differential sequence compressed by the run-length coding into the differential feature updating packet.
  6. 6. The WIFI network-based thermometer measurement data transmission method according to claim 5, wherein the combining the differential feature update packet and the decoding auxiliary information according to a preset encapsulation format, and adding a timestamp and a device identifier, generating a WIFI transmission data frame includes: presetting the encapsulation format to comprise a frame head, load data and a frame tail; the frame header fixedly comprises a frame start identifier and a frame length field; Writing binary data of the differential feature update package into a first portion of a payload data region of the encapsulation format; writing binary data of the decoding auxiliary information into a second part of the payload data area of the packaging format, and setting a separation mark between the first part and the second part; acquiring current system time, generating a high-precision time stamp, and writing a binary representation of the high-precision time stamp into a third part of a payload data area of the package format; Reading a unique device identifier from a non-volatile memory of the thermometer device, writing a binary representation of the unique device identifier into a fourth portion of the payload data field of the packaging format; calculating cyclic redundancy check codes of all data of the load data area, and writing the cyclic redundancy check codes into the frame tail of the encapsulation format; and combining the frame head, the load data area and the frame tail in sequence to generate a complete WIFI transmission data frame.
  7. 7. The WIFI network-based thermometer measurement data transmission method according to claim 6, wherein detecting a current channel quality parameter in a WIFI network channel, dynamically selecting a transmission rate and a fragmentation policy based on the channel quality parameter, performing fragmentation and encapsulation processing on the WIFI transmission data frame, and generating a plurality of WIFI data fragmentation packets, and includes: acquiring a received signal strength indication and a signal to noise ratio of a current channel through channel state information of a WIFI network interface; inquiring a predefined channel quality mapping table according to the received signal strength indication and the signal to noise ratio, and determining the current channel quality level; Selecting a corresponding maximum transmission unit value and a fragment size threshold from a strategy configuration library according to the current channel quality level; Comparing the total length of the WIFI transmission data frame with the selected maximum transmission unit value, and if the total length is larger than the maximum transmission unit value, starting the slicing process; dividing a load data area of the WIFI transmission data frame into a plurality of continuous data slicing blocks according to the slicing size threshold; adding a fragmentation head containing a fragmentation sequence number, a total fragmentation number and a frame identifier for each data fragmentation block to generate an independent WIFI data fragmentation packet; And adding the head and tail of the standard WIFI data link layer for each WIFI data slice packet to finish packaging.
  8. 8. The WIFI network-based thermometer measurement data transmission method according to claim 7, wherein the sending the plurality of WIFI data fragment packets to the designated cloud server through the WIFI network interface, and monitoring the transmission acknowledgement status of each fragment packet during the sending process, includes: adding a plurality of WIFI data fragment packets into a transmission queue according to the sequence of the fragment sequence; sequentially taking out WIFI data fragment packets from the transmission queue, and transmitting the WIFI data fragment packets through a transmission buffer area of a WIFI network interface; starting a timer corresponding to each WIFI data fragment packet, wherein the timeout time of the timer is dynamically set according to the current network round trip delay; Monitoring a transmission confirmation message from the cloud server within the timeout time; If a transmission confirmation message for a certain WIFI data fragment packet is received within the timeout time, marking that the transmission confirmation state of the WIFI data fragment packet is successful, and canceling a corresponding timer; If the transmission confirmation message of a certain WIFI data fragment packet is not received within the timeout time, marking that the transmission confirmation state of the WIFI data fragment packet is timeout failure.
  9. 9. The WIFI network-based thermometer measurement data transmission method according to claim 8, wherein if all transmission acknowledgements are not received within a preset retransmission time, regenerating a corresponding WIFI data fragment packet based on the WIFI transmission data frame according to the missing fragment packet identifier, and selectively retransmitting the corresponding WIFI data fragment packet, including: After the last WIFI data fragment packet is sent, starting a total retransmission waiting timer; after the retransmission waiting timer is overtime, checking the transmission confirmation state of all WIFI data fragment packets; Screening out all WIFI data fragment packets with transmission confirmation states failing overtime, and recording the fragment serial numbers of the WIFI data fragment packets as missing fragment packet identifiers; extracting corresponding data fragment blocks from the locally cached WIFI transmission data frames according to the missing fragment packet identifications; adding a fragmentation head for each extracted data fragmentation block again to generate a WIFI data fragmentation packet for retransmission; And adding the WIFI data fragment packet for retransmission into a retransmission transmission queue with high priority, and transmitting the WIFI data fragment packet with high priority.
  10. 10. The WIFI network-based thermometer measurement data transmission method according to claim 2, wherein after receiving all WIFI data fragment packets, the cloud server reorganizes according to the encapsulation format, analyzes to obtain the differential feature update packet and the decoding auxiliary information, and includes: the cloud server sequentially receives a plurality of WIFI data fragment packets, and classifies all the fragment packets belonging to the same WIFI transmission data frame into the same reorganization buffer area according to the frame identification in the fragment header; according to the sequence numbers of the fragments in the head part of the fragments, the data fragments of all fragments are orderly arranged and restored into a complete load data area; calculating a cyclic redundancy check code for the restored load data area, comparing the cyclic redundancy check code with an original cyclic redundancy check code in the frame tail, and checking the data integrity; After verification, analyzing the load data area according to a preset packaging format, and positioning binary data of the differential feature update package and binary data of the decoding auxiliary information according to a separation identifier; Respectively reading out binary data of the differential feature update package and binary data of the decoding auxiliary information; The cloud server rebuilds the differential feature update package according to the decoding auxiliary information and the reference compressed feature code stream in the history cache database, and recovers the standard temperature measurement sequence of the current sampling period, and the method comprises the following steps: The cloud server extracts a quantization codebook identification, a quantization step length parameter and a probability model parameter from the decoding auxiliary information; Initializing an entropy decoder by using the probability model parameters, and performing entropy decoding on binary data of the differential feature update package to obtain a bit differential sequence; performing run length decoding on the bit differential sequence to restore a complete bit differential sequence; Reading a reference compressed characteristic code stream of the last period corresponding to the equipment identifier from a history cache database of the cloud server; performing bit correction on the reference compressed characteristic code stream by using the restored bit differential sequence to obtain a compressed characteristic code stream of the current period; Initializing an entropy decoder by using the probability model parameters, and performing entropy decoding on the compressed characteristic code stream of the current period to obtain a discrete symbol index sequence; inverse quantizing the discrete symbol index sequence into a low-dimensional potential feature representation according to the quantization codebook identification and quantization step size parameters; Inputting the low-dimensional potential feature representation into a feature reduction layer of a pre-trained decompression model corresponding to a thermometer equipment end, and reconstructing paragraph feature vectors of each measurement paragraph; And reconstructing a complete standard temperature measurement sequence according to the paragraph types, the characteristic values and the time offsets in the paragraph characteristic vectors.

Description

Thermometer measurement data transmission method based on WIFI network Technical Field The invention relates to the technical field of data compression transmission of the Internet of things, in particular to a thermometer measurement data transmission method based on a WIFI network. Background In the field of environmental monitoring of the Internet of things, the temperature sensing equipment based on the WIFI network is required to continuously upload the acquired temperature measurement data to the cloud server. The existing common data transmission scheme is that the thermometer equipment samples according to fixed periods, and the original temperature data sequence of each period is directly or simply packaged and then completely transmitted through a WIFI network. This raw data transmission mode, when faced with long, high frequency temperature monitoring tasks, produces massive and highly redundant data packets. In particular, under the scene that the temperature change is slow or constant, data with similar values are continuously sent, unnecessary network bandwidth and energy consumption of equipment communication modules are consumed, the pressure is formed for the continuous voyage of the battery-powered terminal equipment of the Internet of things, and the storage and processing burden of the cloud platform is increased. To reduce the amount of data transmitted, some improvements use a general data compression algorithm to compress the temperature sequence in its entirety, or to adjust over the transmission period. However, the general compression algorithm has limited compression efficiency on small-scale sensing data sequences with specific physical change modes such as temperature data, and cannot fully consider the characteristic of time change of the temperature data. The transmission strategy with a fixed period cannot adapt to the actual change speed of the temperature, the details can be lost when the temperature changes suddenly, and invalid data can be still sent when the temperature changes steadily. The prior art lacks a special method capable of closely fitting the intrinsic change rule of temperature measurement data and realizing high-precision and high-efficiency data representation and low-redundancy transmission, so that the network resource utilization efficiency and the overall energy efficiency of the WIFI temperature sensing device still have a larger improvement space on the premise of ensuring the data integrity and timeliness. Disclosure of Invention The invention aims to solve the defects in the prior art, and provides a thermometer measurement data transmission method based on a WIFI network. In order to achieve the purpose, the invention adopts the following technical scheme that the thermometer measurement data transmission method based on the WIFI network comprises the following steps: Acquiring an original temperature measurement sequence generated by thermometer equipment in a preset sampling period, and performing outlier detection and smoothing correction processing on the original temperature measurement sequence to generate a standard temperature measurement sequence; carrying out dynamic segmentation processing on the standard temperature measurement sequence, dividing the measurement sequence into a plurality of measurement paragraphs according to the temperature change rate and the steady-state duration, and extracting paragraph feature vectors for each measurement paragraph; Performing adaptive compression processing on paragraph feature vectors of each measured paragraph by using a pre-trained compression coding model to generate a compressed feature code stream, and simultaneously generating decoding auxiliary information corresponding to the compressed feature code stream; performing differential comparison on the compressed characteristic code stream of the current sampling period and a reference compressed characteristic code stream in a history cache database to generate a differential characteristic update packet; Combining the differential feature update package with the decoding auxiliary information according to a preset encapsulation format, adding a time stamp and a device identifier, and generating a WIFI transmission data frame; Detecting a current channel quality parameter in a WIFI network channel, dynamically selecting a transmission rate and a fragmentation strategy based on the channel quality parameter, and performing fragmentation and encapsulation processing on the WIFI transmission data frame to generate a plurality of WIFI data fragmentation packets; and sending the plurality of WIFI data fragment packets to a designated cloud server through the WIFI network interface, and monitoring the transmission confirmation state of each fragment packet in the sending process. As a further aspect of the present invention, the method further comprises: If all the transmission acknowledgements are not received within the preset retransmission t