A multi-terminal data storage and transmission method based on intelligent control disinfection system
By generating dynamic data segmentation strategies and priority tags in the intelligent disinfection system, and utilizing multi-channel parallel distribution and cross-terminal redundant reception mechanisms, the problem of adaptive adjustment in multi-terminal data synchronization is solved, achieving efficient and reliable data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG SHUNDE DAIGAO INTELLIGENT TECH CO LTD
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-31
AI Technical Summary
Existing multi-terminal data synchronization methods cannot adaptively adjust data block segmentation strategies and transmission priorities under dynamically changing equipment and network conditions, resulting in increased transmission latency and low retransmission recovery efficiency.
By calculating the difference between the real-time operating status parameters of the disinfection terminal and the historical status feature sequence, a dynamic data segmentation strategy and priority label are generated. The data is then distributed in parallel using at least two transmission channels. Combined with cross-terminal redundant reception and complementary confirmation mechanisms, adaptive segmentation and efficient transmission of data blocks are achieved.
Optimize data block structure and transmission priority under dynamic operating conditions to improve transmission efficiency and stability, shorten packet loss detection and replenishment time, and enhance overall transmission reliability and recovery efficiency.
Smart Images

Figure CN122496513A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage and transmission technology, specifically to a multi-terminal data storage and transmission method based on an intelligent disinfection system. Background Technology
[0002] During the operation of an intelligent disinfection system, multiple disinfection terminals need to frequently synchronize disinfection control commands and operational status data. Existing multi-terminal data synchronization methods typically rely on fixed data block rules and static channel allocation schemes to complete the transmission task. When the first disinfection terminal initiates data synchronization to the second and third disinfection terminals, the system often uses a pre-set uniform data block size to divide the command set, assigns the same transmission priority to all data blocks, and then completes the data transmission via a single channel or multiple channels using simple polling. This existing solution has significant shortcomings in dealing with the dynamic changes in the actual operating conditions of the disinfection terminals. The power consumption level and network signal strength of the disinfection terminals fluctuate in real time with environmental parameters such as ultraviolet radiation intensity, ozone concentration, temperature, and humidity. Fixed data block division strategies cannot dynamically adjust the number and size of blocks based on the current power consumption status and channel quality of the devices. When the terminal power consumption is high or the network signal is weak, excessively large data blocks can easily cause transmission timeouts and packet loss, while excessively small data blocks result in overly fragmented divisions and increased transmission handshake overhead. Meanwhile, static priority allocation ignores the varying transmission urgency of different data blocks under dynamic network conditions, resulting in inefficient use of channel resources. Furthermore, existing methods often rely on single channels or a small number of homogeneous channels for distribution. When a channel experiences congestion or interference, the overall transmission delay increases significantly. Moreover, the lack of cross-terminal complementary acknowledgment mechanisms after data blocks arrive at the receiving terminal means that local packet loss often requires separate retransmission from the source end, leading to low recovery efficiency. Therefore, it is necessary to address how to adaptively adjust data block segmentation strategies and transmission priorities under dynamically changing equipment and network conditions, and how to utilize multi-channel parallel distribution to improve transmission reliability and recovery efficiency. Summary of the Invention
[0003] This invention provides a multi-terminal data storage and transmission method based on an intelligent disinfection system, aiming to solve the problem that the data block segmentation strategy and transmission priority in the prior art cannot be adaptively adjusted according to the real-time power consumption and network signal strength of the disinfection terminal. At the same time, it solves the problem of low retransmission recovery efficiency caused by the lack of cross-terminal complementary confirmation mechanism in multi-channel parallel distribution scenarios.
[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a multi-terminal data storage and transmission method based on an intelligent disinfection system, the method comprising:
[0005] In response to a synchronization request initiated by the first disinfection terminal within the intelligent disinfection system, the system obtains the first terminal identifier and the first set of operating status parameters for the first disinfection terminal. Based on the first terminal identifier, the system indexes the historical data cache corresponding to the first disinfection terminal in the distributed storage node and extracts the historical status feature sequence from the historical data cache.
[0006] As a technical solution of this invention, when indexing the historical data cache area based on the first terminal identifier, the first terminal identifier is used as a hash index key to locate the storage address of the historical data cache area corresponding to the first disinfection terminal in a distributed hash table. This storage address is accessed to read multiple historical operating state parameter vectors of the first disinfection terminal recorded in the historical data cache area within a consecutive past time window. These historical operating state parameter vectors include parameters such as temperature, humidity, ultraviolet intensity, ozone concentration, and operating time. Principal component analysis is performed on the multiple historical operating state parameter vectors to reduce dimensionality, extracting the first three principal component components. These first three principal component components are then arranged in timestamp order to construct a historical state feature sequence.
[0007] Based on the difference between the first set of operating state parameters and the historical state feature sequence, a dynamic data segmentation strategy and dynamic priority tags are generated for the first disinfection terminal. Preferably, the difference between the real-time power consumption value in the first set of operating state parameters and the historical average power consumption value in the historical state feature sequence is calculated, and the difference is normalized and mapped to a data block quantity coefficient. The ratio between the real-time network signal strength in the first set of operating state parameters and the historical minimum signal strength in the historical state feature sequence is calculated, and the ratio is mapped to a data block size adjustment coefficient. The total number of data blocks to be segmented is determined according to the data block quantity coefficient, and the maximum byte length of each data block is determined according to the data block size adjustment coefficient. The total number of data blocks and the maximum byte length are combined as the dynamic data segmentation strategy. At the same time, based on the comparison result of the real-time network signal strength and the preset signal strength threshold, a high-priority tag or a normal-priority tag is selected as the dynamic priority tag. On this basis, the product of the data block quantity coefficient and the data block size adjustment coefficient is limited to the product of the preset total number of blocks and the block length to ensure that the total amount of data after segmentation is within a reasonable transmission boundary.
[0008] Following a dynamic data segmentation strategy, the disinfection control instruction set to be transmitted is segmented into multiple variable-length data blocks, and a transmission sequence number is assigned to each data block based on a dynamic priority label. During the segmentation process, starting from the beginning of the disinfection control instruction set to be transmitted, the first data block is sequentially segmented according to the maximum byte length defined within the dynamic data segmentation strategy. It is determined whether the first data block contains a complete disinfection control instruction; if not, the current segmentation length is adjusted until a complete disinfection control instruction is obtained, and the adjusted current segmentation length is taken as the actual length of the first data block. The segmentation process is repeated according to the total number of data blocks defined within the dynamic data segmentation strategy, sequentially obtaining multiple variable-length data blocks. The priority level of the dynamic priority label is obtained, and a transmission sequence number containing a combination of the priority level and a globally incrementing sequence number is generated for each data block. The globally incrementing sequence number uses Gray code encoding to avoid transmission conflicts when adjacent sequence numbers flip simultaneously.
[0009] Multiple variable-length data blocks carrying transmission sequence numbers are distributed in parallel to the second and third disinfection terminals within the intelligent disinfection system via at least two different transmission channels. During parallel distribution, a globally increasing sequence number is extracted from the transmission sequence number carried by each variable-length data block, and the multiple variable-length data blocks are divided into a first subset and a second subset according to the parity of the globally increasing sequence number. The variable-length data blocks in the first subset are sent to the second disinfection terminal via the first transmission channel, while the variable-length data blocks in the second subset are sent to the third disinfection terminal via the second transmission channel. This parity-based traffic splitting mechanism allows each channel to bear approximately half of the data load, effectively utilizing the parallel transmission capabilities of multiple channels, shortening the overall transmission time, and reducing the risk of complete data blockage due to single-channel congestion.
[0010] For the transmission process of the first transmission channel, before transmitting the first variable-length data block within the first subset, a channel reservation request is sent to the second disinfection terminal. The channel reservation request includes the total number of data blocks in the first subset and the estimated transmission duration. Upon receiving the channel acknowledgment signal from the second disinfection terminal, data transmission on the first transmission channel is initiated, and the transmission time of each variable-length data block is timestamped. For the transmission process of the second transmission channel, before transmitting the first variable-length data block within the second subset, the current load value of the second transmission channel is detected. If the current load value is lower than a preset load threshold, transmission begins directly; otherwise, a random backoff time is waited before re-detection. This differentiated channel access control ensures the deterministic transmission timing of the first transmission channel while allowing the second transmission channel to flexibly adapt to changes in network load, thus balancing transmission efficiency and system stability.
[0011] The system receives a first reception confirmation message from the second disinfection terminal and a second reception confirmation message from the third disinfection terminal. It then extracts the sequence number sets of received data blocks from both the first and second reception confirmation messages. These sets are merged to obtain a global confirmed sequence number set. The transmission sequence number of the missing data block is determined based on the difference between the global confirmed sequence number set and the transmission sequence number set of all sent data blocks. This missing data block's transmission sequence number is then sent as a retransmission request to both the second and third disinfection terminals, instructing them to retrieve and return the missing data block from their respective received data blocks. This mechanism, utilizing redundant reception from multiple terminals for retransmission, enables rapid data repair even during intermittent packet loss, reduces reliance on retransmissions from the original sender, and improves overall transmission robustness.
[0012] After receiving multiple variable-length data blocks carrying transmission sequence numbers, the second disinfection terminal sorts the received data blocks according to the globally increasing sequence number in the transmission sequence number and checks whether there are any sequence number gaps in the sorted data blocks. If a sequence number gap is detected, the second disinfection terminal sends a retransmission request containing the range of gap sequence numbers to the first disinfection terminal and starts a timer to wait for the arrival of the retransmitted data block. If the retransmitted data block is received before the timer expires, it is inserted into the corresponding position in the sorted sequence to form a complete data block sequence. If no retransmitted data block is received after the timer expires, the second disinfection terminal checks whether there are any data blocks in its local cache that are adjacent to the range of gap sequence numbers. If adjacent data blocks are stored, the second disinfection terminal reverse-engineers the instruction fragment that should be included in the missing data block based on the actual length of the adjacent data blocks and the encoding rules of the disinfection control instructions, and inserts the derivation result as a repair data block into the corresponding position in the sorted sequence. This self-repair capability based on instruction encoding rules allows the receiving terminal to restore the complete instruction set locally as much as possible even under extreme network conditions, avoiding interruption of the disinfection control process due to the loss of individual data blocks.
[0013] After parallel distribution is completed, the first disinfection terminal receives a first storage confirmation message from the second disinfection terminal and a second storage confirmation message from the third disinfection terminal. The first storage confirmation message contains the hard disk sector address of the data block stored by the second disinfection terminal, and the second storage confirmation message contains the solid-state drive cache address of the data block stored by the third disinfection terminal. The first disinfection terminal associates and stores the hard disk sector address and solid-state drive cache address in the metadata record table in the distributed storage node, and marks the synchronization identifier corresponding to this transmission as completed. By uniformly recording the physical addresses of heterogeneous storage media on different terminals in the metadata, fine-grained management of distributed storage is achieved, facilitating subsequent synchronization verification, data auditing, and fast cross-terminal retrieval.
[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0015] By calculating the difference between the real-time operating status parameter set of the first disinfection terminal and the historical status feature sequence, the system can dynamically generate a segmentation strategy for the terminal. Specifically, the system uses the difference between the real-time power consumption value and the historical average power consumption value, normalized, to map and obtain a data block quantity coefficient. It also uses the ratio of the real-time network signal strength to the historical minimum signal strength to map and obtain a data block size adjustment coefficient. These factors are then combined to determine the total number of data blocks to be segmented and the maximum byte length of each data block. When device power consumption increases or network quality deteriorates, this mechanism automatically converges the block size and adjusts the number of blocks to avoid transmission timeouts and packet loss caused by transmitting large data blocks in weak network or high power conditions. When the network condition is good and power consumption is sufficient, the block size is appropriately increased to reduce the handshake overhead of segmented fragment transmission. Based on the comparison between the real-time network signal strength and a preset threshold, a high-priority tag or a normal-priority tag is selected. According to the determined segmentation strategy, the instruction set to be transmitted is actually segmented into multiple variable-length data blocks, ensuring that the shape and transmission priority of the data blocks match the current channel conditions and terminal load status, thereby maintaining the efficiency and stability of data transmission under dynamic operating conditions. After acquiring multiple variable-length data blocks carrying dynamic priority tags and transmission sequence numbers, they are distributed in parallel to the second and third disinfection terminals via at least two different transmission channels. During distribution, the data blocks are divided into two subsets according to the parity of the globally increasing sequence number in the transmission sequence number, and these subsets are simultaneously transmitted via different channels, effectively achieving spatial splitting of the data stream. On the receiving side, the reception confirmation messages returned by the second and third disinfection terminals are obtained, and the sequence number sets of the received data blocks are extracted from each terminal. Since the transmission processes on the two channels are independent, the successfully received data blocks exhibit differentiated characteristics. By merging the confirmed sequence number sets of the two terminals to obtain a global confirmed sequence number set, and calculating the difference between this set and the sequence number set of all transmitted data blocks, the transmission sequence number of the missing data block can be accurately located. The missing sequence number is sent as a retransmission request to both the second and third disinfection terminals simultaneously, instructing both parties to cross-reference and return the missing portion from their respective received data blocks. This mechanism, which utilizes dual-terminal redundant reception and cross-terminal complementary confirmation, ensures that retransmission recovery no longer relies solely on a single retransmission path at the source end, significantly shortening the time for packet loss detection and replenishment. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1This is a flowchart of a multi-terminal data storage and transmission method based on an intelligent disinfection system;
[0018] Figure 2 This is a flowchart for constructing historical state feature sequences;
[0019] Figure 3 This is a flowchart of the dynamic data segmentation strategy and priority label generation process;
[0020] Figure 4 This is a curve showing the change in the total number of data blocks versus the maximum byte length in a dynamic data partitioning strategy;
[0021] Figure 5 This is a statistical analysis chart of data block length based on a dynamic data segmentation strategy;
[0022] Figure 6 This is a chart comparing the estimated length of the missing data block with its actual length. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] See Figure 1 This invention provides a multi-terminal data storage and transmission method based on an intelligent disinfection system. In response to a synchronization request initiated by a first disinfection terminal within the intelligent disinfection system, the method obtains the first terminal identifier and a first set of operating status parameters for that first disinfection terminal. Based on the first terminal identifier, the method indexes the historical data cache corresponding to the first disinfection terminal in a distributed storage node and extracts historical status feature sequences from the historical data cache. Based on the difference between the first set of operating status parameters and the historical status feature sequences, a dynamic data segmentation strategy and a dynamic priority label are generated for the first disinfection terminal. According to the dynamic data segmentation strategy, the disinfection control instruction set to be transmitted is segmented into multiple variable-length data blocks, and a transmission sequence number is assigned to each data block according to the dynamic priority label. The multiple variable-length data blocks carrying the transmission sequence numbers are distributed in parallel to a second and a third disinfection terminal within the intelligent disinfection system through at least two different transmission channels.
[0025] Example 1:
[0026] In specific implementation, please refer to Figure 2The first terminal identifier is used as the hash index key and input into a pre-built distributed hash table. The distributed hash table adopts a consistent hash ring structure, with each storage node responsible for a segment on the hash ring. After the first terminal identifier is hashed using the SHA-256 hash function, a fixed-length digest is obtained. This fixed-length digest is mapped to a position on the hash ring. Starting from the mapped position on the hash ring, the first available storage node is searched clockwise to obtain the storage address of the historical data cache allocated to the first disinfection terminal on that storage node. The storage address includes the node's network address and the data block offset.
[0027] After obtaining the storage address, a Transmission Control Protocol (TCP) connection is established via the node network address. A read operation is performed on the historical data buffer based on the data block offset, retrieving multiple historical operating status parameter vectors of the first disinfection terminal recorded within the historical data buffer over a past continuous time window. The length of the past continuous time window is set to 3600 seconds, with a sampling period of 1 second, thus obtaining 3600 historical operating status parameter vectors. Each historical operating status parameter vector consists of five components: temperature, humidity, ultraviolet intensity, ozone concentration, and operating time. Each component is normalized and mapped to the [0,1] interval.
[0028] The process of principal component analysis (PCA) for dimensionality reduction of multiple historical operational state parameter vectors is as follows: All historical operational state parameter vectors are arranged into a design matrix with 3600 rows and 5 columns. The mean of each column of the design matrix is calculated, resulting in a 5-dimensional mean vector. The 5-dimensional mean vector is subtracted from each row of the design matrix to obtain a centered matrix. The covariance matrix of the centered matrix is calculated, with a dimension of 5×5. Eigenvalue decomposition is performed on the covariance matrix to obtain 5 eigenvalues and their corresponding 5 5-dimensional eigenvectors. The eigenvalues are sorted from largest to smallest, and the first three eigenvectors are extracted as the first, second, and third eigenvectors. These three eigenvectors form a projection matrix with a dimension of 5×3. The centered matrix is multiplied by the projection matrix to obtain a dimensionality-reduced matrix with 3600 rows and 3 columns. Each row corresponds to the first three principal component components of a timestamp. The formulas for calculating the first three principal component components are as follows:
[0029]
[0030] in, Indicates the first The principal components at the timestamp The component values, The values are 1, 2, and 3; Indicates the sorted order of the first... Each feature vector is a column vector with a dimension of 5; Indicates the timestamp The collected historical running status parameter vector is a column vector with a dimension of 5; It represents the 5-dimensional mean vector of all historical running state parameter vectors.
[0031] The first three principal component components are arranged in timestamp order to construct a historical state feature sequence. The first, second, and third principal component components corresponding to the same timestamp in the dimensionality-reduced matrix are combined into a triplet. All triplets are concatenated in ascending order of timestamp to obtain a historical state feature sequence of length 3600. This historical state feature sequence is stored in an index structure associated with the historical data cache of the first disinfection terminal for subsequent difference calculations.
[0032] Example 2:
[0033] In specific implementation, please refer to Figure 3 The first set of operating state parameters includes real-time operating data collected by the first disinfection terminal at the moment of initiating a synchronization request. This real-time operating data is simultaneously collected by a temperature sensor, humidity sensor, ultraviolet intensity meter, ozone concentration detector, and power meter, and after analog-to-digital conversion, forms five real-time parameter values. Real-time power consumption is extracted from the first set of operating state parameters. Real-time power consumption is the real-time power reading collected by the power meter, measured in watts. Simultaneously, historical average power consumption is extracted from the historical state feature sequence corresponding to the first disinfection terminal. The historical average power consumption is obtained by extracting the power consumption components from all historical operating state parameter vectors associated with the historical state feature sequence, and then calculating the arithmetic mean of all power consumption components. The difference between the real-time power consumption and the historical average power consumption is calculated and normalized. The normalization process uses the maximum contrast normalization method, with the maximum value of the power consumption component in the historical operating state parameter vector set as the upper bound and the minimum value as the lower bound, linearly mapping the difference to the [-1,1] interval to obtain the normalized difference.
[0034] The normalized difference is mapped to a data block quantity coefficient using a piecewise linear mapping function. When the normalized difference is in the interval [-1, 0], the data block quantity coefficient remains at the baseline value of 3; when the normalized difference is in the interval (0, 0.5], the data block quantity coefficient linearly increases from the baseline value of 3 to 5; when the normalized difference is in the interval (0.5, 1], the data block quantity coefficient linearly increases from 5 to 8. The data block quantity coefficient is an integer, and the output value of the linear function is rounded down during the increment process. The range of the data block quantity coefficient is [3, 8]. The baseline value of 3 is based on the minimum number of segments required for the disinfection control instruction set between the first disinfection terminal and the second and third disinfection terminals. This minimum number of segments is determined by statistically analyzing the minimum number of data blocks required for complete transmission in 100 historical synchronization records.
[0035] In some embodiments, the real-time network signal strength is extracted from a first set of operating state parameters. The real-time network signal strength is the received signal strength indication value measured by the first disinfection terminal communication module at the time of initiating the synchronization request, in dBm. Network signal strength components are extracted from a set of historical operating state parameter vectors associated with historical state feature sequences. These network signal strength components are the received signal strength indication values recorded at historical synchronization times. All historical network signal strength components are sorted, and the minimum value is taken as the historical minimum signal strength. The ratio of the real-time network signal strength to the historical minimum signal strength is calculated; the ratio is a positive real number.
[0036] The ratio is mapped to a data block size adjustment factor using the following formula:
[0037]
[0038] in, This represents the data block size adjustment factor, with a value range of [0.5, 2.0]. This represents the minimum value of the data block size adjustment factor, which is 0.5. This represents the maximum value of the data block size adjustment factor, which is 2.0. This represents the ratio of real-time network signal strength to the historical minimum signal strength. The range of values is (0, +∞); This represents the center value of the ratio, which is 1.5. It is determined statistically based on the boundary ratio between normal signal strength and weak signal strength in the network environment of the intelligent disinfection system where the first disinfection terminal is located. This represents the curve steepness parameter, with a value of 3.0. It is set according to the principle that the change in the data block size adjustment coefficient should not exceed 30% within the normal fluctuation range of the network signal strength. Represents the natural constant.
[0039] The total number of data blocks to be generated is determined based on the data block quantity coefficient, which is an integer value ranging from 3 to 8. The maximum byte length of each data block is determined based on the data block size adjustment coefficient. This maximum byte length is determined as follows: the default maximum byte length supported by the first disinfection terminal communication module is obtained (1024 bytes). This default maximum byte length is then multiplied by the data block size adjustment coefficient, and the product is rounded down to the nearest byte boundary to obtain the adjusted maximum byte length. When the data block size adjustment coefficient is 0.5, the maximum byte length is 512 bytes; when the coefficient is 2.0, the maximum byte length is 2048 bytes.
[0040] The total number of data blocks and the maximum byte length are combined to form a dynamic data splitting strategy. The dynamic data splitting strategy is stored in the form of a tuple, where the first element of the tuple is the total number of data blocks and the second element is the maximum byte length.
[0041] Optionally, the product of the data block quantity coefficient and the data block size adjustment coefficient is limited to a preset range of the product of the total number of blocks and the block length. The preset range of the product of the total number of blocks and the block length is [1536, 16384]. The lower limit of 1536 is obtained by multiplying the minimum total number of data blocks (3) by the minimum maximum byte length (512), and the upper limit of 16384 is obtained by multiplying the maximum total number of data blocks (8) by the maximum byte length (2048). After each generation of a dynamic data splitting strategy, the current product of the data block quantity coefficient and the data block size adjustment coefficient is calculated. If the current product value is lower than 1536, the maximum byte length is adjusted to 512 bytes to bring the product to the lower limit; if the current product value is higher than 16384, the maximum byte length is adjusted to 2048 bytes to bring the product down to the upper limit.
[0042] Simultaneously, based on the comparison between the real-time network signal strength and the preset signal strength threshold, a high-priority tag or a normal-priority tag is selected as the dynamic priority tag. The preset signal strength threshold is set to -65dBm, which is determined by the critical value of the received signal strength corresponding to the Wi-Fi 6 communication module used by the first disinfection terminal when the transmission rate drops from the peak to 50%. When the real-time network signal strength is greater than or equal to -65dBm, a high-priority tag is selected, and the priority level value corresponding to the high-priority tag is 1; when the real-time network signal strength is less than -65dBm, a normal-priority tag is selected, and the priority level value corresponding to the normal-priority tag is 0. The dynamic priority tag is encoded in the form of an 8-bit unsigned integer and appended to the tuple of the dynamic data segmentation strategy to form a triplet strategy description structure.
[0043] See Figure 4 In the graph, the horizontal axis represents the synchronization request sequence number, ranging from 0 to 1000. The left side of the vertical axis corresponds to the total number of data blocks, and the right side corresponds to the maximum byte length (unit: bytes). The legend shows that solid lines represent the "total number of data blocks" and dashed lines represent the "maximum byte length".
[0044] The curve shows that the total number of data blocks fluctuates slightly between 2.85 and 3.15, and the maximum byte length fluctuates between approximately 580 and 860 bytes. The total number of data blocks curve fluctuates slightly around the baseline value of 3, without any integer jumps exceeding the baseline value of 3, indicating that the data block quantity coefficient is basically maintained near the baseline value of 3, which is consistent with the determination of the baseline value of the data block quantity coefficient and its mapping rules in Example 2.
[0045] The maximum byte length curve exhibits a clear oscillating characteristic, with values varying between approximately 580 and 860 bytes. It does not reach the extreme values of a maximum of 2048 bytes and a minimum of 512 bytes set in the embodiment, indicating that the data block size adjustment coefficient is within a range of 0.5 to 1.0. This trend reflects the dynamic adjustment of the ratio of real-time network signal strength to the historical minimum signal strength within a range below the ratio center value r0 = 1.5, consistent with the sigmoid function mapping relationship and parameter settings used in Embodiment 2.
[0046] The fluctuation trends of the two curves for the total number of data blocks and the maximum byte length do not show a significant correlation, indicating that the data block quantity coefficient and the data block size adjustment coefficient are two independently adjusted dimensions in the dynamic data segmentation strategy. The dynamic segmentation strategy formed by their combination ensures that the total size of the data blocks is within the preset range. No abnormal fluctuations of the product of the total number of data blocks and the maximum byte length exceeding the preset range [1536, 16384] are observed in the figure, indicating that the limitation mechanism on the product range in Example 2 ensures the rationality of the segmentation strategy.
[0047] In summary, the figure clearly illustrates the process of dynamically adjusting the number and size of data blocks based on real-time power consumption differences and real-time network signal strength in Example 2, reflecting the application effect of the dynamic data segmentation strategy in multi-terminal data storage and transmission methods.
[0048] Example 3:
[0049] In practice, after obtaining the dynamic data segmentation strategy, the first disinfection terminal extracts the maximum byte length from the tuples contained in the dynamic data segmentation strategy. Starting from the beginning position of the byte sequence of the disinfection control instruction set to be transmitted, the first disinfection terminal reads the corresponding number of bytes sequentially from the disinfection control instruction set, using the maximum byte length defined in the dynamic data segmentation strategy as the read length, to form the original byte segment of the first data block.
[0050] The system determines whether the original byte segment of the first data block contains a complete disinfection control instruction. Each complete disinfection control instruction in the disinfection control instruction set follows a predefined binary frame format, which includes: a 1-byte frame start flag, a 1-byte instruction type code, a 2-byte data payload length field, a variable-length data payload field, a 2-byte cyclic redundancy check field, and a 1-byte frame end flag. The frame start flag is fixed at hexadecimal value 0xA5, and the frame end flag is fixed at hexadecimal value 0x5A. The first disinfection terminal scans the original byte segment byte by byte starting from offset 0. When it detects the value 0xA5, it records the frame start position and reads the data payload length value from the 2nd and 3rd bytes after the frame start position. Based on the data payload length value, it calculates the total number of bytes in the complete frame. The first disinfection terminal reads a 1-byte value from the frame start position at an offset of 1 byte from the total number of bytes minus 1 byte. When this byte value equals 0x5A, the frame is determined to be a complete disinfection control instruction.
[0051] If at least one complete disinfection control instruction can be identified within the original byte segment, the first data block is determined to contain a complete disinfection control instruction, and the maximum byte length defined in the dynamic data segmentation strategy is directly used as the actual length of the first data block. If no complete disinfection control instruction is identified within the original byte segment, the first disinfection terminal scans byte by byte backward from the last byte of the original byte segment, searching for the value 0x5A, and takes the first 0x5A found as the candidate frame end position. The data payload length field is parsed backward from the candidate frame end position, and the frame start flag 0xA5 and cyclic redundancy check are verified. After determining that the candidate frame is a valid complete instruction, the number of bytes occupied by the complete instruction from the frame start flag to the frame end flag is calculated, and this number of bytes is used as the actual length of the first data block. The tail bytes in the original byte segment that exceed the actual length are then placed back into the unread area of the disinfection control instruction set. If a complete disinfection control instruction is not found by scanning from back to front within the original byte segment, the first disinfection terminal continues to read 1 byte from the disinfection control instruction set and appends it to the end of the original byte segment. The complete instruction detection process is repeated until a complete disinfection control instruction is located. The end position of the complete instruction is used as the actual length of the first data block.
[0052] Optionally, when adjusting the length of the original byte segment, the first disinfection terminal uses the byte following the byte containing the frame end flag 0x5A of the complete disinfection control instruction as the end boundary of the first data block, and extracts all bytes from the start position to the end boundary from the disinfection control instruction set to form the first variable-length data block.
[0053] After the first variable-length data block is cut, the first disinfection terminal continues cutting from the starting position of the remaining part of the disinfection control instruction set. Bytes are read from the remaining part according to the maximum byte length defined in the dynamic data cutting strategy to form the original byte segment of the second data block. The same integrity detection method is used to adjust the cutting length to obtain the second variable-length data block. This cutting and integrity adjustment process is repeated until the number of variable-length data blocks obtained reaches the total number of data blocks defined in the dynamic data cutting strategy, or all bytes in the disinfection control instruction set have been allocated. If the disinfection control instruction set is allocated before reaching the total number of data blocks, the remaining variable-length data blocks are marked as empty data blocks with an actual length of zero. If there are still unallocated bytes after the disinfection control instruction set reaches the total number of data blocks, all remaining bytes are appended to the end of the last variable-length data block, and the actual length of the last variable-length data block increases accordingly.
[0054] After obtaining all variable-length data blocks, the first disinfection terminal acquires the priority level of the dynamic priority tag. The dynamic priority tag is encoded as an 8-bit unsigned integer, with a priority level value of 1 for high-priority tags and 0 for ordinary-priority tags. The first disinfection terminal extracts the priority level value from the dynamic priority tag to construct the transmission sequence number.
[0055] Simultaneously, the first disinfection terminal assigns a globally increasing sequence number to each non-empty variable-length data block. The global increasing sequence number starts from 0 and increments sequentially according to the order in which the variable-length data blocks are cut. For the decimal value of each globally increasing sequence number, the first disinfection terminal uses Gray code encoding to convert it, generating a corresponding Gray code value to avoid transmission conflicts caused by multiple bits of adjacent globally increasing sequence numbers flipping simultaneously in binary representation. The Gray code encoding conversion formula is:
[0056]
[0057] in, A decimal integer representing a globally incrementing index. The value range is from 0 to , The total number of data blocks defined within the dynamic data partitioning strategy; This indicates the floor function, which rounds down to the nearest integer. The result is rounded down to the nearest integer. This represents the bitwise XOR operator, for... binary representation and The binary representation is subjected to bitwise XOR logical operations; Representing decimal integers The Gray code value obtained after Gray code conversion binary bit width and The binary bit width remains consistent.
[0058] The first disinfection terminal combines the priority level value and the Gray code value to form a transmission sequence number. The combination method is as follows: the priority level value occupies bits 23 to 16 of the transmission sequence number, a total of 8 bits; the Gray code value occupies bits 15 to 0 of the transmission sequence number, a total of 16 bits. When the binary representation of the Gray code value is less than 16 bits, the high-order bits are padded with zeros. This 24-bit transmission sequence number is appended in 3-byte form to the header structure of the corresponding variable-length data block, forming a variable-length data block carrying the transmission sequence number.
[0059] See Figure 5 In the graph, the horizontal axis represents the data block number, ranging from 1 to 8, and the vertical axis represents the data block length in bytes, ranging from 0 to 1400 bytes. In the legend, the dashed line represents the maximum byte length, which is fixed at 1024 bytes; the solid line represents the mean actual length, indicating the average actual cut length of each data block; and the dotted line represents the standard deviation boundary, reflecting the fluctuation range of the actual length.
[0060] As described in Example 3, the maximum byte length of the data block is the maximum byte length defined in the dynamic data segmentation strategy. In this figure, the maximum byte length is a fixed value of 1024 bytes, represented by a dashed line. The average actual length shown by the solid line is all lower than 1024 bytes, indicating that after the adjustment of the complete disinfection control instruction boundary, the actual length of each data block is reduced compared to the maximum byte length, ensuring that the data block contains complete instructions and avoids frame truncation. The average actual length fluctuates slightly at around 880 bytes, indicating that the data block length remains relatively stable under the dynamic segmentation strategy, and the length distribution is concentrated.
[0061] The dotted lines represent the standard deviation boundaries of the actual length, which are within a range of approximately ±60 to 80 bytes above and below the mean actual length. This reflects that the length of each data block in the disinfection control instruction set fluctuates to some extent, which is determined by the instruction payload length and frame structure. However, the fluctuation range is small, ensuring the uniformity of the transmitted data block size and transmission efficiency.
[0062] The overall trend shows that the mean actual length curve of all eight data blocks is stable, with no obvious upward or downward trend. The standard deviation boundary remains stable, and the mean actual length is always lower than the maximum byte length. This is consistent with the technical solution in Example 3, which uses frame start and end flags to determine the complete disinfection control instruction and adjust the actual length of the data block, ensuring that the segmented variable length data blocks all contain at least one complete instruction.
[0063] Therefore, the figure effectively reflects the actual length distribution of the disinfection control instruction set after being cut into multiple variable-length data blocks based on the dynamic data cutting strategy and complete instruction detection adjustment in Embodiment 3, verifying that the dynamic data cutting method of the present invention can achieve reasonable control of data block length and effective cutting of complete instructions.
[0064] Example 4:
[0065] In practice, the first disinfection terminal acquires all non-empty variable-length data blocks carrying transmission sequence numbers and extracts the transmission sequence number from the header structure of each variable-length data block. The transmission sequence number is 24 bits long. The first disinfection terminal reads bits 15 to 0 of the transmission sequence number to obtain a 16-bit Gray code value, and decodes the Gray code value into the corresponding globally increasing sequence number. The decoding method is as follows: the most significant bit of the 16-bit Gray code value is used as the most significant bit of the decoded binary number. Each bit of the decoded binary number is obtained by XORing the corresponding Gray code value with the next higher bit of the decoded binary number. The operation is performed sequentially from the most significant bit to the least significant bit until the least significant bit is decoded, ultimately obtaining the globally increasing sequence number in decimal representation.
[0066] The first disinfection terminal divides all non-empty variable-length data blocks into a first subset and a second subset based on the parity of the globally increasing sequence number corresponding to each variable-length data block. When the globally increasing sequence number is even, the variable-length data block corresponding to that sequence number is assigned to the first subset; when the globally increasing sequence number is odd, the variable-length data block corresponding to that sequence number is assigned to the second subset. The variable-length data blocks in the first subset are arranged in ascending order of their globally increasing sequence numbers, and the variable-length data blocks in the second subset are also arranged in ascending order of their globally increasing sequence numbers.
[0067] Before sending the variable-length data blocks in the first subset to the second disinfection terminal via the first transmission channel, the first disinfection terminal first sends a channel reservation request to the second disinfection terminal. The channel reservation request is encapsulated using the User Datagram Protocol (UDP), and the destination port is the data receiving port pre-registered by the second disinfection terminal. The message body of the channel reservation request contains two fields: the first field is the total number of data blocks in the first subset, represented by a 2-byte unsigned integer; the second field is the estimated transmission duration, represented by a 4-byte unsigned integer in milliseconds. The estimated transmission duration is calculated as follows: the byte lengths of all variable-length data blocks in the first subset are summed to obtain the total number of bytes; the total number of bytes is multiplied by 8 to obtain the total number of bits; the total number of bits is divided by the negotiated transmission rate of the first transmission channel (bits per second); the quotient is multiplied by 1000 and rounded up to obtain the estimated transmission duration in milliseconds. The negotiated transmission rate of the first transmission channel is determined by negotiation between the first and second disinfection terminals when they establish a Transmission Control Protocol (TCP) connection.
[0068] After sending a channel reservation request, the first disinfection terminal enters a waiting state for a channel confirmation signal. If it does not receive a channel confirmation signal from the second disinfection terminal within a preset confirmation waiting time, the first disinfection terminal retransmits the channel reservation request using an exponential backoff method, with retransmission intervals of 100 milliseconds, 200 milliseconds, and 400 milliseconds, and a maximum of 3 retransmissions. Upon receiving a channel confirmation signal from the second disinfection terminal, the first disinfection terminal initiates data transmission on the first transmission channel. The channel confirmation signal includes the address of the first subset receive buffer and the size of the receive window allocated by the second disinfection terminal for this transmission. The first disinfection terminal sends each variable-length data block in the first subset in chronological order. At the moment each variable-length data block is completed, it obtains a timestamp accurate to milliseconds through its system clock interface and records the timestamp in the status tracking table corresponding to that variable-length data block, marking the transmission time of that variable-length data block.
[0069] Before sending the variable-length data blocks within the second subset to the third disinfection terminal via the second transmission channel, the first disinfection terminal detects the current load value of the second transmission channel. The detection method for the current load value of the second transmission channel is as follows: the first disinfection terminal sends a lightweight channel probe request to the third disinfection terminal, containing only a 4-byte timestamp field. Upon receiving the channel probe request, the third disinfection terminal immediately returns a channel probe response, which includes a reception timestamp and the current processing queue length of the third disinfection terminal. The first disinfection terminal records the round-trip time between the time the channel probe request is sent and the time the channel probe response is received, and adds the round-trip time to the result of multiplying the current processing queue length of the third disinfection terminal by the single-packet processing time of the third disinfection terminal to obtain the current load index value of the second transmission channel, in milliseconds.
[0070] The first disinfection terminal compares its current load index value with a preset load threshold. The preset load threshold is set to 80 milliseconds. The value of 80 milliseconds is based on the following: the round-trip time of the second transmission channel between the first and third disinfection terminals is 2 milliseconds under ideal network conditions; the average single-packet processing time of the third disinfection terminal is 0.5 milliseconds; when the processing queue length of the third disinfection terminal reaches 156, the total load index value is approximately 2 + 156 × 0.5 = 80 milliseconds. At this time, the processing capacity of the third disinfection terminal is in a medium-load state. If the current load index value is lower than 80 milliseconds, the first disinfection terminal directly begins transmitting variable-length data blocks from the second subset to the third disinfection terminal.
[0071] If the current load index value is higher than or equal to 80 milliseconds, the first disinfection terminal executes a random backoff process. The random backoff time is calculated as follows: within a preset backoff interval [50 milliseconds, 300 milliseconds], a uniformly distributed random integer is generated using the hardware random number generator of the first disinfection terminal, which serves as the millisecond value for the random backoff time. After waiting for the random backoff time, the first disinfection terminal re-executes the detection process of the current load value of the second transmission channel and compares the re-detected current load index value with the preset load threshold of 80 milliseconds again. The random backoff and re-detection process is repeated a maximum of 5 times. If the current load index value is still higher than or equal to 80 milliseconds after the 5th detection, the first disinfection terminal no longer waits and forcibly starts transmitting the variable-length data blocks in the second subset to the third disinfection terminal.
[0072] The first disinfection terminal executes the transmission process from the first transmission channel to the second disinfection terminal and the transmission process from the second transmission channel to the third disinfection terminal in parallel. These two transmission processes occupy independent thread resources. The first disinfection terminal continuously listens for the first receive acknowledgment message from the second disinfection terminal and the second receive acknowledgment message from the third disinfection terminal. After successfully receiving one or more variable-length data blocks in the first subset, the second disinfection terminal generates a first receive acknowledgment message. This first receive acknowledgment message contains a set of transmission sequence numbers for all variable-length data blocks successfully received by the second disinfection terminal, stored in Gray code form. The third disinfection terminal generates the second receive acknowledgment message in the same way as the second disinfection terminal.
[0073] The first disinfection terminal receives a first reception confirmation message from the second disinfection terminal, extracts the sequence number set of received data blocks from the message body of the first reception confirmation message, and performs Gray code decoding on each Gray code value in the sequence number set to obtain a first confirmed global sequence number set. The first disinfection terminal receives a second reception confirmation message from the third disinfection terminal, extracts the sequence number set of received data blocks from the message body of the second reception confirmation message, and decodes it to obtain a second confirmed global sequence number set.
[0074] The first and second confirmed global sequence number sets are merged, and a deduplication operation is performed on the merged set to obtain the global confirmed sequence number set. The global confirmed sequence number set contains the globally incrementing sequence numbers of all variable-length data blocks that have been successfully received by at least one of the second and third disinfection terminals.
[0075] The first disinfection terminal acquires the transmission sequence number set of all transmitted variable-length data blocks, decodes the Gray code values of all transmitted variable-length data blocks to obtain the transmitted global sequence number set. It performs a difference operation between the transmitted global sequence number set and the global acknowledged sequence number set, removing all elements from the transmitted global sequence number set that appear in the global acknowledged sequence number set, resulting in the global incrementing sequence number set of missing data blocks. Each element in the global incrementing sequence number set of missing data blocks represents a variable-length data block that was transmitted via the first and second transmission channels but was not acknowledged by the second and third disinfection terminals.
[0076] The first disinfection terminal re-encodes each globally increasing sequence number in the set of globally increasing sequence numbers for the missing data block into a Gray code value, and combines it with the priority level value to form a transmission sequence number, thus forming a transmission sequence number set for the missing data block. The first disinfection terminal constructs a retransmission request message from this set of transmission sequence numbers for the missing data block. The retransmission request message includes a retransmission request flag, the number of retransmission sequence numbers, and a 24-bit representation of each retransmission sequence number. The first disinfection terminal sends the retransmission request message to both the second and third disinfection terminals, instructing the second disinfection terminal to query its received data block buffer, retrieve a variable-length data block matching the retransmission sequence number, and return it; simultaneously, it instructs the third disinfection terminal to query its received data block buffer, retrieve a variable-length data block matching the retransmission sequence number, and return it.
[0077] Example 5:
[0078] In practical implementation, after receiving one or more variable-length data blocks carrying transmission sequence numbers through the first transmission channel, the second disinfection terminal temporarily stores each variable-length data block in the receiving buffer of the second disinfection terminal. The second disinfection terminal extracts the 24-bit transmission sequence number from the block header structure of each variable-length data block, reads bits 15 to 0 of the transmission sequence number to obtain the Gray code value, decodes the Gray code value into a decimal globally increasing sequence number, and performs an XOR operation from the most significant bit to the least significant bit of the Gray code value to restore the binary globally increasing sequence number.
[0079] The second disinfection terminal uses the globally incrementing sequence number obtained from decoding as the sorting key to perform ascending sorting on all variable-length data blocks in the receiving buffer. The sorting algorithm is merge sort, and the recursion depth of merge sort is proportional to the logarithm of the number of variable-length data blocks. During the sorting process, the movement of data blocks is completed by adjusting pointers, and no data block copies are generated.
[0080] After sorting, the second disinfection terminal traverses the sorted variable-length data block sequence, starting from the data block with the smallest global increment number, and sequentially checks whether the global increment numbers of every two adjacent variable-length data blocks are consecutive. When the difference between the global increment number of the subsequent variable-length data block and the global increment number of the preceding variable-length data block is equal to 1, it is determined that there is no sequence number gap between the two data blocks; when the difference is greater than 1, it is determined that there is a sequence number gap between the two data blocks, and the starting sequence number of the gap is recorded as the global increment number of the preceding variable-length data block plus 1, and the ending sequence number of the gap is the global increment number of the subsequent variable-length data block minus 1, forming a gap sequence number range.
[0081] If the second disinfection terminal detects at least one discontinuous sequence number range, it constructs a retransmission request message. The message header of the retransmission request message contains a 4-bit message type code, which is the binary value 0011, indicating that the message is a data block retransmission request. The message body contains a 1-byte field for the number of discontinuous sequence number ranges, and a start and end globally incrementing sequence number for each discontinuous sequence number range, each occupying 2 bytes. The second disinfection terminal sends the retransmission request message to the first disinfection terminal via the reverse link of the first transmission channel.
[0082] The second disinfection terminal starts a retransmission timer simultaneously with sending a retransmission request message. The timeout of the retransmission timer is set to the sum of the estimated round-trip time and four times the round-trip time deviation. The initial value of the estimated round-trip time is the median of the round-trip time samples measured when the second disinfection terminal and the first disinfection terminal establish a transmission control protocol connection. The initial value of the round-trip time deviation is the standard deviation of the round-trip time samples. The retransmission timer uses a timer interrupt polling mechanism with a timer interval of 10 milliseconds. Each interruption decrements the remaining time of the retransmission timer by 10 milliseconds, and a timeout event is triggered when the remaining time reaches zero.
[0083] During the retransmission timer operation, the second disinfection terminal monitors the incoming data on the first transmission channel. When the second disinfection terminal receives a retransmission data block sent by the first disinfection terminal, it decodes the globally increasing sequence number from the transmission sequence number of the retransmission data block and compares the globally increasing sequence number with the range of each discontinuity sequence number. If the globally increasing sequence number falls within a certain discontinuity sequence number range, the second disinfection terminal inserts the retransmission data block into the corresponding position in the sorting sequence of the receive buffer, restoring the continuity of the globally increasing sequence number at that position. Simultaneously, the second disinfection terminal updates the discontinuity sequence number range, removing the arrived globally increasing sequence numbers from the discontinuity sequence number range.
[0084] Before the retransmission timer expires, if all retransmitted data blocks corresponding to the globally incrementing sequence numbers within the entire range of interrupted sequence numbers have arrived, the second disinfection terminal closes the retransmission timer, confirming that a complete data block sequence has been formed. In the complete data block sequence, all variable-length data blocks are arranged consecutively starting from 0 according to the globally incrementing sequence number, with no missing sequence numbers.
[0085] If the retransmission timer expires and the second disinfection terminal detects that some globally incrementing sequence numbers within a certain range of intermittent sequence numbers have not yet received the corresponding retransmitted data blocks, the second disinfection terminal enters the local cache query process. The second disinfection terminal queries the adjacent data block cache maintained in the local persistent storage module. The adjacent data block cache stores a copy of each variable-length data block that has been successfully received and sorted in this session. Using the missing globally incrementing sequence number as a reference, the second disinfection terminal locates the variable-length data block corresponding to the missing globally incrementing sequence number minus 1 and the variable-length data block corresponding to the missing globally incrementing sequence number plus 1 in the adjacent data block cache, and treats the two located variable-length data blocks as adjacent data blocks.
[0086] If the adjacent data block cache only stores the variable-length data block corresponding to the missing global incremented sequence number minus 1, and not the variable-length data block corresponding to the missing global incremented sequence number plus 1, then only the variable-length data block corresponding to the missing global incremented sequence number minus 1 is considered an adjacent data block. If neither of the two adjacent data blocks is stored, the second disinfection terminal abandons the repair of the missing global incremented sequence number, generates an alarm record, and writes it to the log storage area.
[0087] If at least one adjacent data block is stored, the second disinfection terminal extracts the actual length of the adjacent data block and uses this actual length as a reference value to infer the length of the missing data block. The estimation formula for the length of the missing data block is:
[0088]
[0089] in, Indicates the estimated length of the missing data block, in bytes; This indicates the actual length of the adjacent data block corresponding to the missing global incrementing index minus 1. If the adjacent data block corresponding to the missing global incrementing index minus 1 does not exist. The value is the byte length of the shortest complete instruction in the disinfection control instruction set. The byte length of the shortest complete instruction is obtained by parsing the binary frame format of the disinfection control instruction set. This indicates the actual length of the adjacent data block corresponding to the missing global incrementing index plus 1. If the adjacent data block corresponding to the missing global incrementing index plus 1 does not exist, then this value is used. Values The value; when and When neither exists, The value is the byte length of the shortest complete instruction in the disinfection control instruction set.
[0090] The second disinfection terminal obtains the generation constraints of instruction fragments from the encoding rules of the disinfection control instruction set. The encoding rules of the disinfection control instruction set stipulate that each complete disinfection control instruction consists of the following in sequence: frame start flag, instruction type code, data payload length field, data payload field, cyclic redundancy check field, and frame end flag. Starting from the last byte of the previous adjacent data block, the second disinfection terminal generates candidate instruction fragments byte by byte according to the encoding rules of the disinfection control instruction set. The total number of bytes in the candidate instruction fragments is equal to the estimated length of the missing data block. For each candidate instruction fragment generated, the second disinfection terminal checks whether the first byte of the candidate instruction fragment is the frame start flag 0xA5, whether the last byte is the frame end flag 0x5A, whether the data payload length field in the middle is consistent with the actual data payload length, and whether the cyclic redundancy check field passes the check. If the candidate instruction fragment passes all the above checks, the second disinfection terminal uses the candidate instruction fragment as the derivation result.
[0091] If no candidate instruction segment passes the test after traversing all candidate instruction segment combinations, the second disinfection terminal will estimate the length of the missing data block. Increment by 1 byte, repeatedly executing the candidate instruction fragment generation and verification process, with a maximum increment count of 10. If a candidate instruction fragment that passes the verification is found within the maximum increment count, that candidate instruction fragment is used as the derivation result; if no fragment is found after reaching the maximum increment count, the second disinfection terminal abandons the repair of the missing data block and generates a derivation failure record.
[0092] The second disinfection terminal uses the derivation result as a repair data block, assigning a 24-bit transmission sequence number corresponding to the missing global increment sequence number to the repair data block. The priority level value is inherited from the transmission sequence numbers of adjacent data blocks, and the global increment sequence number is filled using Gray code encoded from the missing global increment sequence number value. The second disinfection terminal inserts the repair data block into the position corresponding to the missing global increment sequence number in the receiving buffer sorting sequence, restoring the sequence continuity and forming a complete data block sequence.
[0093] After the first disinfection terminal completes the parallel distribution process, it waits for and receives the first storage confirmation information sent by the second disinfection terminal and the second storage confirmation information sent by the third disinfection terminal. After successfully receiving all variable-length data blocks and completing their sorting, the second disinfection terminal writes the complete data block sequence to its local hard drive, with the hard drive storage address represented in logical block addressing mode. The second disinfection terminal obtains the starting sector number and sector occupancy number returned by the write operation, combines these two numbers to form the hard drive sector address of the data block stored by the second disinfection terminal, and encapsulates it in the first storage confirmation information. The first storage confirmation information includes a 4-byte confirmation message identifier, a 16-byte second disinfection terminal device identifier, a 4-byte hard drive sector start number, a 2-byte sector occupancy number, and a 4-byte cyclic redundancy check value.
[0094] After successfully receiving all variable-length data blocks, the third disinfection terminal writes the complete data block sequence into its solid-state drive (SSD) cache. The third disinfection terminal obtains the physical address of the cache page corresponding to the write operation, encapsulates the cache page physical address into an SSD cache address, and writes it into the second storage confirmation information. The second storage confirmation information includes a 4-byte confirmation message identifier, a 16-byte third disinfection terminal device identifier, an 8-byte SSD cache page physical address start value, a 4-byte cache length, and a 4-byte cyclic redundancy check value.
[0095] After receiving the first storage confirmation information, the first disinfection terminal extracts the second disinfection terminal device identifier and hard disk sector address; after receiving the second storage confirmation information, it extracts the third disinfection terminal device identifier and solid-state drive cache address. The first disinfection terminal constructs metadata record entries, which include the synchronization identifier corresponding to this synchronization transmission, the second disinfection terminal device identifier, hard disk sector address, third disinfection terminal device identifier, and solid-state drive cache address. The synchronization identifier is a 128-bit universally unique identifier generated by the first disinfection terminal when initiating a synchronization request. The first disinfection terminal stores the metadata record entries in the metadata record table of the distributed storage node. The metadata record table is deployed on the distributed storage node, using a log structure merging tree storage engine. The write process is append-only; the metadata record entries are serialized and appended to the end of the currently active log file. After writing is complete, the first disinfection terminal updates the status field corresponding to the synchronization identifier, changing the status field from value 0 to value 1. A value of 1 indicates that the synchronization identifier corresponding to this transmission is in a completed state. The status update operation is performed through the atomic comparison exchange interface provided by the distributed storage node, ensuring linear consistency of status field updates when multiple disinfection terminals concurrently access the metadata record table.
[0096] See Figure 6This figure shows a scatter plot of the estimated length of the missing data block by the second disinfection terminal in Example 5. The horizontal axis represents the actual length of the missing data block (in bytes), and the vertical axis represents the estimated length of the missing data block (in bytes) inferred by the second disinfection terminal based on the actual length of adjacent data blocks. The point cloud in the figure is relatively dense and distributed along the diagonal reference line y=x, indicating that the estimated length is highly correlated with the actual length, the estimation error is small, and the estimation result has good accuracy and reliability.
[0097] The scatter plot distribution corresponding to "estimated length vs. actual length" in the legend reflects the results obtained through the formula. The calculation of the missing data block length is effective. This formula uses the actual lengths of the adjacent data blocks on either side of the missing data block as a reference, accurately reflecting the true length characteristics of the missing data block. The scatter points are linearly distributed around the diagonal of y=x, indicating that the estimated length is basically proportional to the actual length, with no significant systematic bias.
[0098] The coordinate axis scales cover a range from 0 to 2200 bytes, indicating that the test covered a relatively large range of missing data blocks. The scatter points are evenly distributed across the entire length range, demonstrating that the estimation method is applicable to missing data blocks of varying lengths. There are no obvious outliers in the graph, indicating that the estimation process is stable and has few extreme errors.
[0099] This figure visually verifies the effectiveness of the technical solution in Example 5 where the second disinfection terminal derives the length of the missing data block based on the length of adjacent data blocks. It provides reliable length parameter support for the generation and verification of candidate instruction fragments for missing data blocks, ensuring the accuracy and integrity of the repaired data blocks.
[0100] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A multi-terminal data storage and transmission method based on an intelligent disinfection system, characterized in that, The method includes: In response to a synchronization request initiated by the first disinfection terminal within the intelligent disinfection system, the system obtains the first terminal identifier and the first set of operating status parameters of the first disinfection terminal. Based on the first terminal identifier, the historical data cache corresponding to the first disinfection terminal is indexed in the distributed storage node, and the historical state feature sequence in the historical data cache is extracted. Based on the difference between the first set of operating state parameters and the historical state feature sequence, a dynamic data segmentation strategy and dynamic priority label are generated for the first disinfection terminal. According to the dynamic data segmentation strategy, the disinfection control instruction set to be transmitted is segmented into multiple variable-length data blocks, and a transmission sequence number is assigned to each data block according to the dynamic priority label. Multiple variable-length data blocks carrying transmission sequence numbers are distributed in parallel to the second and third disinfection terminals within the intelligent disinfection system through at least two different transmission channels.
2. The multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 1, characterized in that, Based on the first terminal identifier, the historical data cache corresponding to the first disinfection terminal is indexed in the distributed storage node, and the historical state feature sequence within the historical data cache is extracted, including: Use the first terminal identifier as the hash index key to locate the storage address of the historical data cache corresponding to the first disinfection terminal in the distributed hash table; Access the storage address and read the vector of multiple historical operating status parameters of the first disinfection terminal recorded in the historical data cache within the past continuous time window. Principal component analysis is performed on the multiple historical operating state parameter vectors to reduce dimensionality, and the first three principal component components are extracted. The first three principal component components are arranged in order of timestamp to construct the historical state feature sequence.
3. The multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 2, characterized in that, The multiple historical operating status parameter vectors include temperature, humidity, ultraviolet intensity, ozone concentration, and operating duration parameters.
4. The multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 1, characterized in that, Based on the difference between the first set of operating state parameters and the historical state feature sequence, a dynamic data segmentation strategy and dynamic priority tags are generated for the first disinfection terminal, including: Calculate the difference between the real-time power consumption value in the first set of operating state parameters and the historical average power consumption value in the historical state feature sequence, and normalize the difference to map it into a data block quantity coefficient; Calculate the ratio of the real-time network signal strength in the first set of operating state parameters to the historical minimum signal strength in the historical state feature sequence, and map the ratio to a data block size adjustment coefficient; The total number of data blocks to be generated is determined based on the data block quantity coefficient, and the maximum byte length of each data block is determined based on the data block size adjustment coefficient. The total number of data blocks and the maximum byte length are combined as the dynamic data cutting strategy. Meanwhile, based on the comparison result between the real-time network signal strength and the preset signal strength threshold, a high-priority label or a normal-priority label is selected as the dynamic priority label.
5. A multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 4, characterized in that, The product of the data block quantity coefficient and the data block size adjustment coefficient is limited to the product of the preset total number of blocks and the block length.
6. The multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 1, characterized in that, According to the dynamic data segmentation strategy, the disinfection control instruction set to be transmitted is segmented into multiple variable-length data blocks, and a transmission sequence number is assigned to each data block according to the dynamic priority label, including: Starting from the beginning of the disinfection control instruction set to be transmitted, the first data block is sequentially cut out according to the maximum byte length defined in the dynamic data cutting strategy; Determine whether the first data block contains a complete disinfection control instruction. If not, adjust the current cutting length until a complete disinfection control instruction is obtained, and use the adjusted current cutting length as the actual length of the first data block. According to the total number of data blocks defined in the dynamic data cutting strategy, the cutting process is repeated to obtain multiple variable-length data blocks in sequence. Obtain the priority level of the dynamic priority tag, and generate a transmission sequence number for each data block that includes a combination of the priority level and a globally incrementing sequence number.
7. A multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 6, characterized in that, The globally incrementing sequence number uses Gray code encoding to avoid transmission conflicts when adjacent sequence numbers flip simultaneously.
8. A multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 1, characterized in that, Multiple variable-length data blocks carrying transmission sequence numbers are distributed in parallel to the second and third disinfection terminals within the intelligent disinfection system through at least two different transmission channels, including: Extract the globally incrementing sequence number from the transmission sequence number carried by each variable-length data block, and divide the multiple variable-length data blocks into a first subset and a second subset according to the parity of the globally incrementing sequence number; The variable-length data blocks in the first subset are sent to the second disinfection terminal through the first transmission channel, and the variable-length data blocks in the second subset are sent to the third disinfection terminal through the second transmission channel. Receive the first reception confirmation message returned by the second disinfection terminal and the second reception confirmation message returned by the third disinfection terminal, and extract the sequence number set of the received data blocks in the first reception confirmation message and the sequence number set of the received data blocks in the second reception confirmation message.
9. A multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 8, characterized in that, The variable-length data blocks within the first subset are transmitted to the second disinfection terminal via the first transmission channel, and simultaneously, the variable-length data blocks within the second subset are transmitted to the third disinfection terminal via the second transmission channel, including: Before sending the first variable-length data block in the first subset, a channel reservation request is sent to the second disinfection terminal, the channel reservation request containing the total number of data blocks in the first subset and the estimated transmission duration; After receiving the channel confirmation signal returned by the second disinfection terminal, data transmission on the first transmission channel is initiated, and the transmission time of each variable-length data block is marked with a timestamp. Before sending the first variable-length data block in the second subset, the current load value of the second transmission channel is detected. If the current load value is lower than the preset load threshold, transmission is started directly; otherwise, the detection is restarted after a random backoff time.
10. A multi-terminal data storage and transmission method based on an intelligent disinfection system according to claim 8, characterized in that, After receiving the first reception confirmation message returned by the second disinfection terminal and the second reception confirmation message returned by the third disinfection terminal, and extracting the sequence number set of the received data blocks in the first reception confirmation message and the sequence number set of the received data blocks in the second reception confirmation message, the process further includes: Merge the sequence number set of received data blocks in the first reception confirmation message and the sequence number set of received data blocks in the second reception confirmation message to obtain a global confirmed sequence number set; The transmission sequence number of the missing data block is determined based on the difference between the globally confirmed sequence number set and the transmission sequence number set of all sent data blocks. The transmission sequence number of the missing data block is sent as a retransmission request to the second disinfection terminal and the third disinfection terminal respectively, instructing the second disinfection terminal and the third disinfection terminal to retrieve and return the missing data block from their respective received data blocks.