An adaptive cold chain device data transmission method
By adopting an adaptive data transmission method for cold chain equipment and dynamically adjusting the transmission strategy, the shortcomings of the fixed delay mechanism are overcome, achieving environmental adaptability and reliability, and improving the efficiency and accuracy of data transmission in cold chain equipment.
Patent Information
- Application Number
- CN202511358442.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-09-23
AI Technical Summary
In existing cold chain equipment data transmission methods, the fixed delay mechanism cannot adapt to environmental fluctuations, resulting in unstable data response speed, low transmission efficiency or data loss. Furthermore, the parameters are not flexible, the equipment compatibility is poor, the metadata verification is weak, the sequence number management is chaotic, and the impact of environmental factors is not quantified, leading to insufficient transmission reliability and efficiency.
An adaptive data transmission method is adopted, including dynamic buffer monitoring, intelligent waiting adjustment, precise retransmission, adaptive parameter configuration, multi-layer verification and coupling coefficient quantization, etc., to dynamically adjust the transmission strategy to adapt to environmental changes and ensure data integrity and efficiency.
It significantly improves the adaptability and reliability of data transmission in cold chain equipment, reduces resource waste, enhances equipment compatibility and transmission continuity, and ensures the accuracy of critical data and environmental adaptability.
Smart Images

Figure CN120856743B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of data transmission, and particularly relates to an adaptive cold chain equipment data transmission method. BACKGROUND
[0002] In the field of cold chain equipment data transmission, the real-time and integrity of data are crucial for equipment monitoring and operation decision-making. In the prior art, the data transmission between the cold chain equipment and the upper computer mainly relies on a fixed delay waiting mechanism: after sending a data request, the system needs to wait for a preset fixed time to read the returned data to ensure the integrity of data reception. However, this fixed delay strategy has significant defects. In the cold chain scenario, the equipment data response speed is greatly affected by factors such as environmental temperature and electromagnetic interference: when the equipment is in an ultra-low temperature environment or a strong electromagnetic interference area, the chip processing performance decreases, the data response delay is prolonged, and the fixed delay may cause incomplete data packets due to insufficient time length; and in a stable environment, the fixed delay will cause low transmission efficiency due to the long waiting time, especially in a large data scenario, the cumulative waiting time will seriously slow down the overall transmission process.
[0003] The above problems make it difficult for the existing transmission method to balance between data integrity and transmission efficiency, and there is an urgent need for a transmission scheme that can dynamically adapt to the equipment response state to solve the inherent defects of the fixed delay mechanism. SUMMARY
[0004] The application aims to solve the defects in the prior art and provides an adaptive cold chain equipment data transmission method, which comprises the following steps:
[0005] In the communication initialization stage, the serial port corresponding to the cold chain equipment is opened and the connection parameters are set, in the metadata acquisition stage, a metadata request packet is sent, the total number of data packets and the total number of records returned by the equipment are received and parsed, in the data packet request stage, data requests are sent in a loop according to the packet sequence number, and in the data reception and processing stage, data is read and integrity check is performed, and the method further comprises the following steps:
[0006] Dynamic buffer monitoring, which detects the change of buffer data volume in real time to replace the fixed delay waiting;
[0007] Intelligent waiting adjustment, which terminates the waiting when no new data is detected for a plurality of times and sets a maximum monitoring period;
[0008] Precise retransmission, which locates the problem packet sequence number when there is a single packet error and only retransmits the failed data packet while retaining the successfully received data packet.
[0009] Preferably, the communication initialization stage further comprises self-adaptive configuration of serial communication baud rate, data bits, stop bits and check mode, and the parameter adaptability is verified by sending test data packets during the configuration process. If the test fails for multiple times in succession, the system automatically switches to a preset backup parameter combination to reattempt connection.
[0010] Further preferably, the metadata acquisition stage further comprises verification of the check bits of the returned total data packet number and total record number. The check bits are calculated by a hash algorithm. If the verification fails, the system first performs multiple metadata request packet retransmission operations, and only if the retransmission still fails, the system performs global termination and error reporting process.
[0011] Further preferably, the packet number management adopts a double-byte cyclic count mechanism. When the low byte overflows, the high byte is incremented. The high byte is set to a limited range. When the high byte reaches the upper limit and the low byte overflows again, the high byte is reset to the initial value and the cycle number is recorded. The cycle number is used as an auxiliary parameter for data integrity verification.
[0012] Further preferably, an interference-temperature coupling coefficient is introduced during the data transmission process to quantify the impact of low-temperature environment on transmission performance. The coupling coefficient calculation formula is:
[0013] ;
[0014] wherein, is the interference-temperature coupling coefficient, represents the environmental electromagnetic field strength, represents the chip junction temperature, is the electromagnetic sensitivity coefficient, is the temperature compensation reference value, is the temperature influence factor, is the chip reference operating temperature.
[0015] Further preferably, the data packet fragmentation size is adjusted based on the coupling coefficient. The fragmentation size calculation formula is:
[0016] ;
[0017] wherein, is the data packet fragmentation size, is the maximum fragmentation size, is the preset reference coupling coefficient. When , the fragmentation size remains , the currently calculated interference-temperature coupling coefficient.
[0018] Further preferably, the retransmission number is dynamically determined based on the coupling coefficient. The calculation formula is:
[0019] ;
[0020] wherein, is the number of retransmission, is the current calculated interference-temperature coupling coefficient, is the retransmission coefficient, represents a rounding up operation, and when the calculation result is less than 1, the retransmission number is forced to be 1.
[0021] Further preferably, the integrity check of the data receiving and processing stage adopts a multi-layer verification mechanism, the first layer is CRC16 cyclic redundancy check, the second layer is data length matching check, and the third layer is key field range check, the key fields include temperature value, humidity value and device running state code, and each layer of check is provided with an independent failure threshold, and when any layer of check fails continuously for multiple times, the retransmission process of the corresponding data packet is triggered.
[0022] Further preferably, the buffer area monitoring adopts sliding window mean filtering processing, the filtering window size is a preset number of continuous detection periods, each detection period is a preset time length, the data growth state is judged through the change rate of the filtered buffer area data volume, the change rate calculation formula is the ratio of the difference between the current data volume after filtering and the data volume of the previous period to the data volume of the previous period, and when the change rate is less than a preset value continuously for multiple times, it is determined that there is no new data.
[0023] Further preferably, it further includes a transmission performance dynamic evaluation step, the evaluation indexes include data packet reception success rate, average transmission delay and data integrity score, the success rate is the ratio of the number of successfully received data packets to the total number of requested data packets, the average transmission delay is the average time of each data packet from sending request to receiving completion, and the integrity score is the weighted sum of the number of fields passing the check and the total number of fields, the weight is pre-configured according to the importance of the field, and when any index does not meet a preset threshold value continuously for multiple monitoring periods, a transmission parameter optimization process is automatically started.
[0024] Technical effects:
[0025] The present application effectively solves the core problem of the existing fixed delay mechanism through the creative technical points of dynamic buffer area monitoring, intelligent waiting adjustment and accurate retransmission. The dynamic buffer area monitoring replaces the fixed delay, and real-time adapts to the data transmission state; the intelligent waiting adjustment balances the data integrity and transmission efficiency through continuous no-new-data termination waiting and maximum period constraint; the accurate retransmission only operates on the failed data packet, reducing resource waste. The above-mentioned technologies work together, completely overcome the defect that the fixed delay cannot adapt to environmental fluctuations, and significantly improve the adaptability and reliability of cold chain data transmission. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1Flow chart of the adaptive cold chain equipment data transmission method of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.
[0028] In the conventional cold chain equipment data transmission, the following technical problems exist: 1. The fixed delay waiting mechanism is adopted, which cannot be dynamically adjusted according to the actual data transmission situation, easily leading to too long waiting time to reduce transmission efficiency or too short time to cause data loss; 2. The full retransmission mode is usually adopted in error retransmission, that is, all data packets need to be retransmitted even if only a single packet is wrong, causing waste of bandwidth and time resources; 3. The buffer monitoring lacks real-time and intelligent judgment, and it is difficult to accurately identify the data transmission state, affecting the integrity of data reception.
[0029] Based on this, please refer to Figure 1 The present embodiment provides an adaptive cold chain equipment data transmission method, which includes a dynamic buffer monitoring step, an intelligent waiting adjustment step based on the buffer state, and a precise retransmission step under error isolation. The dynamic buffer monitoring step detects the change of buffer data volume in real time to replace the fixed delay waiting, the intelligent waiting adjustment step terminates the waiting when there is no new data detected for continuous multiple times and sets a maximum monitoring period, and the precise retransmission step locates the problem packet sequence number when there is a single packet error and retransmits only the failed data packet while retaining the successfully received data packet.
[0030] In the present scheme, continuous multiple times are defined as 3 times or more, and are linked with the maximum monitoring period. In the intelligent waiting mechanism, if there is no new data detected for continuous 3 times and the maximum monitoring period has not been reached, the waiting is terminated in advance; if the condition of no new data for continuous 3 times is not met but the maximum period has been reached, the waiting is also forcibly terminated.
[0031] The technical solution forms a synergistic mechanism through three core improvements: the dynamic buffer monitoring step gets rid of the mechanicality of the traditional fixed delay, directly reflects the real-time state of data transmission by tracking the change of buffer data volume in real time, and provides accurate basis for subsequent waiting adjustment; the intelligent waiting adjustment step sets the termination condition of no new data for continuous multiple times and the maximum monitoring period, which avoids the waste of resources caused by infinite waiting and ensures that data will not be missed due to premature termination; the precise retransmission step adopts the error isolation strategy, retransmits only the problem packet, completely abandons the inefficient mode of full retransmission, and retains the successful data packet to maintain the continuity of transmission.
[0032] The technical effects achieved by the scheme are remarkable: dynamic buffer monitoring realizes on-demand adjustment of the waiting mechanism, solving the problem of mismatch between fixed delay and actual transmission rhythm; intelligent waiting adjustment balances data integrity and transmission efficiency through double constraints, including continuous no new data and maximum period, avoiding invalid waiting or data loss; precise retransmission significantly reduces the amount of retransmitted data, reducing bandwidth occupation and transmission time, while ensuring the continuity of the transmission process by retaining successful data. The combination of the three makes the cold chain equipment data transmission environmentally adaptable and resource efficient, especially suitable for the characteristics of unstable data burst volume and complex transmission environment in cold chain scenarios.
[0033] In traditional cold chain equipment serial communication, parameter configuration has obvious limitations: first, fixed parameter combinations are used, such as fixed baud rate, data bits, etc., which cannot adapt to different types of equipment or dynamically changing transmission environments, resulting in poor equipment compatibility; second, the parameter verification mechanism is missing, and after configuration, it directly enters the data transmission stage, which directly leads to communication failure if the parameters do not match, and there is no effective retry strategy after failure, which requires manual intervention to adjust and affects transmission continuity.
[0034] Based on this, the communication initialization stage of the adaptive cold chain equipment data transmission method also includes adaptive configuration of serial communication baud rate, data bits, stop bits, and check mode. During the configuration process, the parameter adaptability is verified by sending test data packets, and if continuous multiple tests fail, it automatically switches to a preset backup parameter combination to retry connection.
[0035] In this scheme, continuous multiple times are defined as 3 or more consecutive test failures. During the adaptive configuration of serial port parameters, the system continuously sends 3 test data packets for the current parameter combination, such as baud rate 9600 and data bits 8 bits. If no valid response is received, the parameter adaptability verification fails, and it is determined as continuous multiple failures, automatically switching to a backup parameter combination. This number can be dynamically adjusted according to the electromagnetic interference intensity of the device, and in a strong interference environment, such as a cold storage motor-intensive area, the number of times can be set to 5 to avoid false judgment of parameter mismatch due to transient interference; in a weak interference environment, the default value of 3 can be maintained to improve configuration efficiency.
[0036] This technical solution improves from both configuration logic and verification mechanism: adaptive configuration breaks the parameter fixation limit, including core communication parameters such as baud rate and data bits, into dynamic adjustment range, making the system flexible to adapt to device characteristics and environmental needs; the test data packet verification link serves as an intermediate validation layer between configuration and transmission, verifying the effectiveness of the parameter combination through actual data interaction to avoid invalid configuration entering the transmission stage; the backup parameter combination and multiple retry mechanism form a fault-tolerant logic that automatically enables a preset alternative when the current parameter combination fails continuously, reducing the need for human intervention.
[0037] The technical effects of this scheme are outstanding: adaptive configuration significantly improves device compatibility, allowing the same transmission method to adapt to multiple cold chain devices, eliminating the need to develop separate communication modules for different devices; test data packet verification exposes parameter mismatch issues early, avoiding the tedious process of troubleshooting after communication failure and reducing fault location time; backup parameters and retry mechanisms significantly reduce the probability of communication interruption. Even if the initial parameter adaptation fails, the system can still maintain transmission continuity through automatic switching, especially suitable for unattended cold chain scenarios, reducing the cost of manual maintenance.
[0038] Traditional metadata transmission has data reliability issues: first, the total number of data packets and the total number of records, as the basis for subsequent data transmission, have weak self-checking mechanisms and are prone to errors due to transmission interference; second, the single processing method after metadata verification failure usually directly terminates transmission, lacking targeted retry strategies, which leads to temporary errors under slight interference being misjudged as fatal failures, reducing transmission robustness.
[0039] Based on this, the metadata acquisition stage of the adaptive cold chain device data transmission method also includes verifying the returned total number of data packets and total number of records. The check bits are calculated by a hash algorithm. If the verification fails, the system first performs multiple metadata request packet retransmission operations, and if it still fails after retransmission, it performs global termination and error reporting processes.
[0040] In this scheme, multiple times are defined as 3 or more retransmission operations. When the check bits of the metadata, total number of data packets, and total number of records fail, the system automatically retransmits the metadata request packet 3 times by default; if the verification still fails after 3 retransmissions, it performs global termination and error reporting. For cold chain critical devices such as vaccine refrigerators, the metadata transmission can be adjusted to 5 times, as the accuracy of metadata directly affects the integrity of subsequent full data transmission, and fault tolerance needs to be improved; for non-critical devices, 3 times can be maintained to avoid invalid waiting.
[0041] This technical solution establishes a three-level processing logic of verification, retry, and termination: the check bits generated by the hash algorithm provide strong verification capability for metadata, allowing precise identification of tampering or loss during data transmission through hash value comparison, ensuring the originality of metadata; the multiple retransmission mechanism is designed for temporary interference such as sudden electromagnetic interference, giving metadata transmission multiple correction opportunities to avoid extreme handling of terminating after a single failure; global termination as the last resort is triggered only when multiple retransmissions still fail, ensuring timely error reporting in the event of a fundamental failure such as device failure, and avoiding invalid retries.
[0042] The technical effect achieved by the scheme is remarkable: the hash check bit fundamentally solves the weak metadata check problem, enabling accurate identification of metadata errors and laying the foundation for subsequent data transmission integrity; the multiple retransmission mechanism significantly improves the anti-interference capability of metadata transmission, converting transmission failures caused by temporary interference into recoverable normal processes and reducing unnecessary transmission interruptions; the retry priority and termination bottom logic balances reliability and efficiency, avoiding transmission termination caused by minor errors and promptly cutting losses in the event of serious failures to ensure predictable system behavior.
[0043] Traditional data packet sequence number management has overflow and confusion problems: first, single-byte counting is used, with a limited sequence number range, which is prone to overflow during large data transmission, leading to sequence number repetition or disorder and making it difficult to distinguish different batches of data packets; second, the sequence number cycle mechanism is simple, with a reset to the initial value after overflow, lacking cycle count records, making it difficult for the receiving end to determine the order of data packets and affecting the accuracy of data splicing.
[0044] Therefore, the adaptive cold chain equipment data transmission method uses a double-byte cycle counting mechanism for packet sequence number management. When the low byte overflows, the high byte is incremented. The high byte is set to a limited range. When the high byte reaches the upper limit and the low byte overflows again, the high byte is reset to the initial value and the cycle count is recorded. The cycle count serves as an auxiliary parameter for data integrity verification.
[0045] This technical solution optimizes sequence number management through hierarchical counting and cycle recording: the double-byte structure expands the sequence number space, with the low byte responsible for basic counting and the high byte responsible for carry management, significantly improving the representation range of the sequence number and reducing the frequency of overflow; the high byte limit range and reset mechanism avoid resource occupation caused by unlimited carry, and the cycle count record provides batch identification for sequence number cycles; the cycle count serves as an auxiliary parameter, together with the sequence number, to form a complete data packet identifier, providing a basis for the receiving end to determine the data order.
[0046] The technical effects achieved by this scheme are obvious: double-byte counting significantly expands the sequence number range, meeting the needs of large data transmission in cold chain equipment and reducing transmission confusion caused by sequence number overflow; the high byte carry and reset mechanism makes sequence number management more efficient, enabling sequence number reuse in limited resources; the combination of cycle count and sequence number solves the sequence number repetition problem, enabling the receiving end to determine the order of data packets based on the cycle count and ensuring the accuracy of data splicing, especially for long-term and continuous data transmission needs in cold chain scenarios.
[0047] In traditional cold chain data transmission, the impact of environmental factors on transmission performance is neglected: First, the coupling effect of low temperature environment and electromagnetic interference is not considered. Evaluating the impact of temperature or electromagnetic interference alone cannot reflect the synergistic effect of the two in actual scenarios, resulting in a lack of accurate basis for adjusting transmission parameters; Second, there is a lack of quantitative indicators of environmental impact, and the understanding of how low temperature and electromagnetic interference affect transmission stability is vague, making it difficult to formulate targeted optimization strategies, resulting in increased transmission error rate or decreased efficiency.
[0048] Based on this, the adaptive cold chain equipment data transmission method introduces an interference-temperature coupling coefficient during data transmission to quantify the impact of the low-temperature environment on transmission performance. The coupling coefficient is calculated using the following formula:
[0049] ;
[0050] in, Interference-temperature coupling coefficient, Indicates the intensity of the ambient electromagnetic field. Indicates the chip junction temperature. The electromagnetic susceptibility coefficient, This is the temperature compensation reference value. Temperature is a factor that affects the environment. This is the chip's reference operating temperature.
[0051] This formula is used to quantify the combined effects of environmental electromagnetic interference and chip temperature on transmission performance. Its design logic is based on the physical characteristics of cold chain equipment in extreme environments and the working mechanism of the chip.
[0052] From the perspective of the numerator, The cubic form is not arbitrarily set, but rather stems from strong electromagnetic interference, such as the nonlinear effect of the electromagnetic field generated by the cold storage motor group on data transmission.
[0053] Experiments show that when the electromagnetic field intensity exceeds a certain threshold, its damage to signal integrity increases cubically with increasing intensity. This is because a strong electromagnetic field induces a nonlinear decay in the carrier mobility within the chip, leading to a sharp increase in signal distortion. As a parameter for electromagnetic susceptibility calibration, it needs to be determined experimentally based on the chip model, such as the anti-interference level of a cryogenic MCU. For example, for chips with strong anti-interference capabilities... A smaller value is used to weaken the weight of electromagnetic interference; conversely, a larger value is used to ensure accurate quantification of highly sensitive chips.
[0054] In the denominator, The exponential function is used to characterize the effect of temperature on the chip's anti-interference capability. When the chip junction temperature... Below the reference operating temperature , usually the normal operating point at room temperature, such as 25℃, is negative, and the exponential term is converted to , which increases as the temperature decreases, resulting in an increase in the denominator, and the coupling coefficient decreases - this is consistent with the physical characteristics of the chip's internal semiconductor material at low temperatures, where the resistivity increases, signal transmission delays increase, but electromagnetic interference sensitivity decreases; when is higher than , the exponential term approaches 0, and the denominator is approximately , at which point the coupling coefficient is mainly determined by electromagnetic interference.
[0055] As a temperature factor, it needs to be calibrated through low-temperature environmental experiments, such as in the range of -40℃ to 25℃, by measuring the error rate curve of the chip at different temperatures, and fitting the optimal value of to ensure the accuracy of the coupling effect quantization.
[0056] The constant term is to avoid the denominator approaching 0 at extremely low temperatures, such as , the exponential term may be extremely large, but if is set reasonably, it can ensure that the denominator is always positive, and as a temperature compensation reference value, its size needs to be determined according to the chip's anti-interference baseline at room temperature, such as by measuring the transmission performance of the chip without electromagnetic interference at room temperature , and setting to a value that keeps the coupling coefficient in a reasonable range, such as around 1.0, to facilitate subsequent calculation of fragmentation and retransmission parameters.
[0057] Those skilled in the art can implement the formula by the following steps:
[0058] Select the target chip, simulate different combinations of (0 to the maximum electromagnetic intensity of the device's working environment) and (-40℃ to 50℃) in an electromagnetic shielding room;
[0059] Measure the data packet error rate under each combination, and establish the mapping relationship between the error rate and , ;
[0060] Fit the specific values of , , by the least squares method to ensure that the coupling coefficient is consistent with the trend of error rate changes;
[0061] The calibrated parameters are written into the device firmware to realize real-time calculation. The design of the formula not only reflects the physical action mechanism of electromagnetic interference and temperature, but also ensures the universality in different hardware environments through the calibratable parameters.
[0062] The technical solution constructs a quantitative model of environmental influence through a coupling coefficient: the formula The term reflects the nonlinear influence of electromagnetic interference and reflects the sharp enhancement of interference in a strong electromagnetic environment; the exponential term describes the influence mechanism of temperature, when is less than , the value of the exponential term changes significantly in a low-temperature environment, reflecting the amplification effect of low temperature on transmission performance. , , The coefficients are calibrated according to the characteristics of the chip and the cold chain scene to ensure the relevance of the model.
[0063] The technical effects achieved by this scheme are outstanding: the coupling coefficient quantifies the synergistic effect of electromagnetic interference and low temperature for the first time, solving the limitations of traditional separate environmental factor evaluation and enabling the influence of the environment on transmission performance to be converted from qualitative description to quantitative indicators; the quantitative model provides accurate basis for subsequent transmission parameter adjustment, and the transmission strategy can be dynamically optimized according to the size of , such as adjusting the fragmentation size and the number of retransmissions; the coefficient calibration for the cold chain scene ensures that the model fits the actual application, avoids errors in the universal model in a low-temperature environment, improves the accuracy of transmission parameter adjustment, and ultimately reduces transmission failures caused by environmental factors.
[0064] In traditional cold chain data transmission, there are obvious defects in the setting of data packet fragmentation size: first, a fixed fragmentation size is used, which cannot be dynamically adjusted according to the actual electromagnetic interference intensity and temperature environment; in a strong interference and ultra-low temperature environment, large fragments are prone to overall failure due to transmission errors, while in a low-interference environment, small fragments will reduce transmission efficiency due to the high proportion of header information; second, the correlation between fragmentation size and environmental influence lacks quantitative basis, and the adjustment strategy relies mainly on empirical values, resulting in insufficient precision of fragmentation optimization and difficulty in balancing transmission reliability and efficiency.
[0065] Therefore, the adaptive cold chain device data transmission method adjusts the data packet fragmentation size based on the coupling coefficient, and the fragmentation size calculation formula is:
[0066]
[0067] wherein, is the data packet fragmentation size, is the maximum fragmentation size, is a preset reference coupling coefficient, when , the fragmentation size remains , The current interference-temperature coupling coefficient is calculated. The technical solution builds a dynamic correlation between the fragment size and the environmental impact through a mathematical model: the introduction of the sine function makes the fragment size change with the coupling coefficient , reflecting the nonlinear change of the interference-temperature synergistic effect. When increases, the environment deteriorates, and the sine function value decreases, and the fragment size decreases accordingly, reducing the risk of single packet transmission; as an upper limit value, ensures that in a low interference environment, the maximum fragment is used, reducing the redundancy of header information and improving transmission efficiency; the setting of the reference coupling coefficient provides a critical point for environmental division, enabling the fragment strategy to automatically switch between efficient transmission and reliable transmission modes.
[0068] The formula is used to dynamically adjust the data packet fragment size according to the coupling coefficient The selection of the function form is based on the balance principle of anti-interference demand and transmission efficiency, and specific parameter configuration can ensure that the person skilled in the art can implement it.
[0069] The sine function is the core of fragment size adjustment, when , i.e. the environmental interference and temperature impact are within the normal range that the chip can withstand, the sine function value is 1, at this time The basis of this setting is: in a good environment, large fragments can reduce the redundancy of packet header information, improving transmission efficiency, for example, a 1000-byte fragment has a 90% lower header proportion than a 100-byte fragment.
[0070] As the reference coupling coefficient, it needs to be determined according to the stable working threshold of the chip within the design life, for example, the maximum value when the chip error rate is less than 0.1% is determined by experiment, which is set to , ensuring the operability of the normal range division.
[0071] When , the environment deteriorates, , the sine function value monotonically decreases with , resulting in synchronous decrease.
[0072] The physical meaning of this change rule is: in a harsh environment, small fragments can reduce the probability of single packet transmission failure, for example, the retransmission cost of a 200-byte fragment is much lower than that of a 2000-byte fragment, and the nonlinear characteristics of the sine function, which decreases rapidly at the beginning and slows down later, can avoid excessive reduction of the fragment size — when is much larger than , Value tends to 0, but in practical applications can be limited by hardware The minimum value, such as no less than 64 bytes, ensures the integrity of the data frame structure.
[0073] The setting needs to be combined with the communication interface characteristics of the cold chain equipment, such as the maximum frame length of the serial port, the MTU value of the wireless module, for example, for RS485 serial port, can be set to 1024 bytes, the typical maximum payload of this interface, to match the hardware transmission capability.
[0074] Those skilled in the art can determine the parameters by the following steps:
[0075] Measure the maximum fragment size supported by the device, set ;
[0076] Determined by experiment ;
[0077] Test the relationship between fragment size and transmission success rate at different values, verify the effectiveness of the sine function adjustment, and fine-tune the function form as necessary, such as replacing it with to change the rate of decline.
[0078] The design of this formula not only quantitatively relates the fragment size to the environmental coupling effect, but also ensures implementability through measurable parameters ( , ).
[0079] The technical effects achieved by this scheme are significant: the non-linear adjustment mechanism solves the rigidity defect of fixed fragmentation, so that the fragment size can accurately match the degree of environmental deterioration, and through small fragments, the error probability is reduced in strong interference and ultra-low temperature, and in good environment, the efficiency is improved through large fragments; the quantitative characteristics of the mathematical model avoid the subjectivity of empirical adjustment, ensuring that the adjustment logic of the fragment size is consistent and predictable in different environments; the cooperation of the maximum fragment and the reference coefficient forms a double constraint, which not only guarantees the transmission efficiency in low-interference environment, but also provides a bottom line for reliability in high-interference environment, especially suitable for the characteristics of large environmental fluctuations in cold chain scenarios, making the transmission system have environmental adaptive ability.
[0080] The traditional data retransmission mechanism has the dual problems of resource waste and insufficient reliability: one is that the number of retransmissions is fixed, in severe environments such as strong electromagnetic interference and ultra-low temperature, the fixed number of retransmissions may lead to data loss due to insufficient retransmission, while in good environment, excessive retransmission will occupy bandwidth and time resources; two is that the correlation between the number of retransmissions and environmental impact lacks scientific basis, and adjustment depends mainly on static thresholds, which cannot dynamically adapt to the real-time synergistic effect of interference-temperature, resulting in insufficient accuracy of the retransmission strategy.
[0081] Based on this, the retransmission number of the adaptive cold chain equipment data transmission method is dynamically determined according to the coupling coefficient, and the calculation formula is:
[0082]
[0083] wherein, is the retransmission number, is the current calculated interference-temperature coupling coefficient, is the retransmission coefficient, represents the upward rounding operation, and when the calculation result is less than 1, the retransmission number is forced to be 1.
[0084] The formula is used to dynamically determine the retransmission number of the data packet according to the coupling coefficient The function structure of the formula is designed to balance the transmission reliability and resource consumption, and the physical meaning and determination method of each parameter are clear and operable. The logarithmic term is the core of the retransmission number adjustment, which makes the retransmission number increase with , but the growth rate gradually slows down.
[0085] When is slightly greater than , it is in a mild interference state, , the logarithmic term is about , and the retransmission number increases slightly; when is much greater than , it is in a serious interference state, , and the growth rate significantly decreases.
[0086] The technical logic of this design is: under serious interference, excessive retransmission will lead to bandwidth saturation and dramatic delay increase, and the marginal decreasing characteristic of the logarithmic term can avoid unlimited growth of the retransmission number, for example, when is 10 times , the logarithmic term is about 2.3, which is only 23% of the linear growth, effectively balancing reliability and efficiency.
[0087] The coefficient is the retransmission intensity adjustment factor, and its value needs to be determined according to the real-time requirements and battery capacity of the equipment: for scenes with high real-time requirements, such as cold chain alarm data transmission, a smaller value such as 1.2 can be set to reduce retransmission delay; for scenes with priority to reliability, such as historical temperature and humidity records, a larger value such as 2.5 can be set to improve the success rate.
[0088] The specific value of can be calibrated by experiment, for example, test different The optimal balance between the corresponding transmission success rate and latency is selected.
[0089] Round up symbol Ensuring that the retransmission count is a positive integer, and forcing it to be 1 when the calculated result is less than 1, guarantees that even under slight interference, Slightly smaller It can also correct occasional errors, such as single packet loss caused by transient electromagnetic pulses, through at least one retransmission.
[0090] Those skilled in the art can implement this through the following steps:
[0091] Based on the equipment application scenario The initial value;
[0092] Different The relationship between retransmission count, success rate, and latency was tested and optimized. ;
[0093] Verification in extreme cases, such as Check if the number of retransmissions is within a reasonable range, such as no more than 10, to avoid exhausting resources.
[0094] This technical solution achieves intelligent adaptation of the retransmission count through a composite function model: coupling coefficient By directly introducing the formula, the number of retransmissions increases with the enhancement of the combined effects of interference and temperature, ensuring sufficient retransmission redundancy under harsh environments; for several terms The addition of this feature makes the increase in retransmission count marginally decreasing, avoiding resource depletion caused by an unlimited increase in retransmission count under extreme conditions; retransmission coefficient It can be adjusted according to device characteristics, such as battery capacity and transmission priority, to provide customization space for different scenarios; rounding up and minimum value constraints ensure that the number of retransmissions is a valid integer and that at least one retransmission is performed to avoid errors caused by zero retransmissions that cannot be corrected.
[0095] The solution achieves significant technical benefits: the dynamic retransmission mechanism addresses the limitations of fixed retransmissions, automatically increasing retransmissions to improve reliability in deteriorating environments and reducing retransmissions to conserve resources in favorable environments; the diminishing marginal growth characteristic balances reliability and efficiency, ensuring necessary redundancy in harsh environments while avoiding transmission delays caused by excessive retransmissions; the adjustability of the retransmission coefficient enhances the solution's versatility, allowing for flexible configuration based on the actual needs of cold chain equipment, such as prioritizing real-time performance or reliability; and the minimum constraint ensures that even under slight interference, occasional errors can be corrected through at least one retransmission, reducing the probability of data loss and maintaining the stability of the transmission system in complex environments.
[0096] The traditional data integrity check has the problem of insufficient fault tolerance: first, a single check method is used, such as relying only on CRC check, which is difficult to deal with multiple types of transmission errors, for example, CRC check can detect data bit flip but is not sensitive to data length anomalies, resulting in some errors being missed; second, the processing strategy after the check fails is simple, usually a single check failure determines that the data is invalid, which is easy to misjudge the data due to occasional errors caused by transient interference, affecting the continuity of transmission; third, the protection of key data such as temperature and humidity, device status code lacks pertinence, and the same check standard is used for ordinary data, which may cause key information errors to be missed.
[0097] Therefore, the data receiving and processing phase of the adaptive cold chain equipment data transmission method adopts a multi-layer verification mechanism, the first layer is CRC16 cyclic redundancy check, the second layer is data length matching check, and the third layer is key field range check, including temperature value, humidity value and device running status code. Each layer of check is set with an independent failure threshold, and when any layer of check fails continuously for multiple times, the corresponding data packet retransmission process is triggered.
[0098] In the present scheme, continuous multiple times means 3 times or more failures in succession, and different check levels can be configured separately. The first layer CRC16 check: 3 consecutive failures trigger retransmission, because CRC check has strong anti-interference ability, 3 failures can be determined as substantial data packet error; the second layer data length matching check: 2 consecutive failures trigger retransmission, length error is mostly transmission truncation, and the fault tolerance requirement is lower; the third layer key field: temperature, humidity, status code check: 3 consecutive failures trigger retransmission, key field error directly affects the effectiveness of monitoring, and needs to be strictly determined. The difference configuration of multiple times needs to be preset through firmware parameters during device initialization, and a person skilled in the art can flexibly adjust according to the importance of the field.
[0099] The technical scheme improves data reliability through hierarchical check and fault tolerance mechanism: CRC16 check as the basic layer, using polynomial operation to detect bit flip, shift and other errors in the data transmission process, covering most problems caused by random interference; data length matching check as the second layer, by comparing the received data length with the expected length, identifying data truncation, splicing errors and other CRC undetectable problems; key field range check is designed for cold chain core data, by presetting a reasonable range, such as temperature value within the working range of cold chain equipment, identifying error data that exceeds the physical logic, ensuring the effectiveness of key information; the mechanism of multiple independent failure thresholds and continuous failure triggering retransmission avoids misjudgment caused by single interference, and improves the fault tolerance of the check.
[0100] The technical effect achieved by the scheme is remarkable: the multi-layer verification mechanism covers multiple error types, solving the limitations of single verification method, so that bit errors, length errors and logic errors in data transmission can be accurately identified; key data special verification ensures the accuracy of cold chain core information, avoiding monitoring errors or decision errors caused by temperature and humidity, equipment state code errors; the strategy of continuous failure triggering retransmission reduces the impact of occasional errors on transmission, and through multiple verification to confirm the authenticity of the error, the probability of misjudgment is reduced; the setting of independent thresholds at each layer enhances the flexibility of verification, which can adjust the strictness according to the occurrence probability of different error types, such as setting a stricter threshold for range verification of key data, so that the verification system can effectively intercept errors and maintain the continuity of transmission, improving the reliability of cold chain data.
[0101] The traditional buffer monitoring has the problem of insufficient judgment accuracy: first, directly using real-time data volume to judge the transmission state is easy to be affected by the instantaneous fluctuation caused by sudden burst transmission of data, for example, the sudden increase and decrease of data volume in the buffer in a short time may be misjudged as the termination of data transmission; second, the detection period is fixed and lacks filtering processing, which cannot smooth the high-frequency noise interference, resulting in the judgment of data growth state to appear jitter, such as frequent switching between data and no data state; third, the threshold for judging no new data is single, without considering the characteristics of different transmission stages, for example, the buffer change law is different in the initial and final stages of data transmission, and a unified threshold is easy to cause misjudgment.
[0102] Therefore, the buffer monitoring of the adaptive cold chain equipment data transmission method adopts sliding window mean filtering processing, the filter window size is a preset number of continuous detection periods, each detection period is a preset length, the data growth state is judged by the change rate of the filtered buffer data volume, the change rate calculation formula is the ratio of the difference between the current data volume and the previous period data volume to the previous period data volume, and when the change rate is less than a preset value for multiple times in a row, it is determined that there is no new data.
[0103] The multiple times in the present scheme are defined as 3 times or more. The buffer monitoring adopts sliding window mean filtering, such as a window size of 5 detection periods and a period of 100 ms, the filtered change rate is calculated, the current data volume and the difference between the previous period, and the previous period data volume. When the change rate is less than a preset threshold for 3 times in a row, it is determined that there is no new data. For high-frequency transmission equipment, such as transmitting 100 frames of data per second, the number of times can be set to 5 to avoid misjudgment of transmission termination due to short data gap; for low-frequency transmission equipment, such as transmitting 1 frame per minute, it can be set to 3 times to reduce the waiting time.
[0104] The technical scheme improves monitoring accuracy through filtering and dynamic threshold: the sliding window mean filtering smoothes the buffer data volume of continuous multiple detection periods, effectively suppresses instantaneous fluctuations and high-frequency noise, makes the data volume trend clearer, avoids misjudgment caused by sudden data, and introduces a change rate index instead of an absolute data volume, which judges the data growth state through relative change, solves the adaptation problem of different transmission stages such as different data volume, for example, the absolute change is small but the relative change is large when the data volume is small, which can still be identified as new data; the judgment condition of continuous multiple times below the threshold further reduces the misjudgment probability caused by single fluctuation, and ensures that the judgment of no new data is based on stable trend instead of instantaneous state.
[0105] The technical effects realized by the scheme are outstanding: the sliding window filtering significantly improves the stability of data volume monitoring, smooths the jitter caused by instantaneous interference, and makes the buffer state judgment more reliable; the change rate index enhances the adaptability of different transmission stages, and can accurately identify the growth state through relative change regardless of the data volume; the continuous judgment mechanism reduces the misjudgment probability, ensures that the waiting is terminated only when the data growth is indeed stagnant, avoids data loss caused by premature termination or resource waste caused by late termination; the design of preset detection period and window size can be flexibly configured according to the data transmission rate of cold chain equipment, so that the monitoring mechanism adapts to the characteristics of different types of equipment, and improves the universality and practicality of the scheme.
[0106] Traditional cold chain data transmission lacks performance feedback and dynamic optimization mechanism: first, the key performance indicators are not evaluated in real time during transmission, which cannot timely discover the degradation trend of transmission quality, for example, the problems such as decrease of data packet reception success rate and increase of time delay are not detected until the transmission fails, missing the opportunity for early intervention; second, the performance evaluation index is single, and only the success rate is concerned, while the time delay, data integrity and other dimensions related to user experience are ignored, resulting in incomplete evaluation of transmission quality; third, there is no automatic optimization mechanism after performance degradation, when the transmission indicators do not meet the standard, manual intervention is needed to adjust the parameters, which has a lagging response and low efficiency, especially not suitable for unattended cold chain scenes.
[0107] Therefore, the adaptive cold chain equipment data transmission method further includes a transmission performance dynamic evaluation step, and the evaluation indexes include data packet reception success rate, average transmission time delay and data integrity score, the success rate is the ratio of the number of successfully received data packets to the total number of requested data packets, the average transmission time delay is the average time from sending a request to receiving a data packet, and the integrity score is the weighted sum of the number of fields passing the verification and the total number of fields, the weight is pre-configured according to the importance of the fields, and when any index does not meet the preset threshold for continuous multiple monitoring periods, the transmission parameter optimization process is automatically started.
[0108] The multiple definitions in the scheme are 3 or more monitoring periods. The monitoring period is set to 1 minute by default. When any of the indicators such as the data packet reception success rate, the average transmission delay, and the data integrity score does not meet the preset threshold for 3 consecutive periods, such as the success rate < 95%, the transmission parameter optimization is started, such as adjusting the fragmentation size and the retransmission coefficient. For scenarios with extremely high real-time requirements, such as cold chain alarm transmission, the multiple can be set to 2 periods to quickly respond to performance degradation; for scenarios with priority for stability, 5 periods are set to avoid invalid optimization triggered by transient fluctuations.
[0109] The technical scheme constructs an adaptive transmission system through multi-dimensional evaluation and closed-loop optimization: the multi-index evaluation system covers the reliability, real-time performance, and data quality of transmission, fully reflects the transmission performance, and avoids the limitations of a single index; the weighted design of the integrity score highlights the importance of key fields, making the evaluation results more in line with the cold chain business requirements; the threshold judgment mechanism for multiple consecutive periods avoids false optimization caused by transient fluctuations and ensures the necessity of starting optimization; the automatic parameter optimization process, such as adjusting the fragmentation size and the number of retransmissions, forms a closed-loop control, which can repair performance degradation without human intervention.
[0110] The technical effects achieved by the scheme are remarkable: dynamic evaluation realizes real-time monitoring of transmission performance and can discover degradation trends before transmission failure, providing a basis for early intervention; multi-dimensional indicators ensure the comprehensiveness of performance evaluation, avoiding ignoring potential problems due to a single indicator meeting the standard, such as high success rate but long delay; the weighted integrity score focuses on core data to ensure the transmission quality of key information; the automatic optimization mechanism improves the autonomy and response speed of the system, which can quickly adjust parameters to restore transmission quality when performance degrades, reducing the cost of manual maintenance, especially suitable for large-scale, distributed cold chain equipment networks, and improving the stability and adaptability of the overall transmission system.
[0111] The above is only a preferred embodiment of the present application, and does not limit the form of the present application in other forms. Any person skilled in the art can use the disclosed technical content to make changes or modifications to equivalent embodiments applied to other fields, but any simple modification, equivalent change, and modification made in accordance with the technical essence of the present application to the above embodiments still belongs to the protection scope of the present application technical solution.
Claims
1. An adaptive cold chain equipment data transmission method, comprising: The communication initialization phase involves opening the serial port corresponding to the cold chain equipment and setting connection parameters; the metadata acquisition phase involves sending metadata request packets, receiving and parsing the total number of data packets and total number of records returned by the equipment; the data packet request phase involves cyclically sending data requests according to packet sequence numbers; and the data reception and processing phase involves reading data and performing integrity verification. The feature is that it further includes: Dynamic buffer monitoring detects changes in buffer data volume in real time to replace fixed-delay waiting; Intelligent waiting adjustment: terminates the waiting and sets the maximum monitoring period when no new data is detected after multiple consecutive checks. Precise retransmission identifies the sequence number of the problematic packet in the event of a single packet error and retransmits only the failed data packet while retaining successfully received data packets. An interference-temperature coupling coefficient is introduced during data transmission to quantify the impact of low-temperature environments on transmission performance. The coupling coefficient is calculated using the following formula: ; in, The interference-temperature coupling coefficient, Indicates the intensity of the ambient electromagnetic field. Indicates the chip junction temperature. The electromagnetic susceptibility coefficient, This is the temperature compensation reference value. Temperature is a factor that affects the environment. The chip's reference operating temperature. The exponential function is used to characterize the effect of temperature on the chip's anti-interference capability. The setting is intended to keep the coupling coefficient within a reasonable range and prevent the denominator from approaching 0 at extremely low temperatures. This item reflects the nonlinear effects of electromagnetic interference, demonstrating the sharp increase in interference under strong electromagnetic environments, based on the currently calculated interference-temperature coupling coefficient. The value size, the optimized transmission strategy includes according to the... The value adjusts the packet fragment size and the number of packet retransmissions.
2. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The communication initialization phase also includes adaptive configuration of serial communication baud rate, data bits, stop bits and parity method. During the configuration process, the parameter compatibility is verified by sending test data packets. If multiple tests fail in a row, the system will automatically switch to the preset backup parameter combination and try to connect again.
3. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The metadata acquisition phase also includes verifying the total number of returned data packets and total number of records using a checksum. The checksum is calculated using a hash algorithm. If the verification fails, multiple retransmissions of the metadata request packets are performed. Only if the retransmissions still fail is the global termination and error reporting process executed.
4. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The packet sequence number management adopts a two-byte circular counting mechanism. When the low byte overflows, it triggers the carry of the high byte. The high byte has a limited range. When the high byte reaches the upper limit and the low byte overflows again, the high byte is reset to the initial value and the loop count is recorded. The loop count is used as an auxiliary parameter for data integrity verification.
5. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The packet fragment size is adjusted based on the coupling coefficient. The formula for calculating the fragment size is as follows: ; in, For packet fragment size, Maximum slice size, The preset baseline coupling coefficient is used when At that time, the fragment size remains at 1. , The interference-temperature coupling coefficient is currently calculated; subject to hardware limitations. The minimum value of S is ensured so that S is not less than 64 bytes, thus ensuring the integrity of the data frame structure.
6. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The number of retransmissions is dynamically determined based on the coupling coefficient, and the calculation formula is as follows: ; in, For the number of retransmissions, This is the interference-temperature coupling coefficient currently calculated. This is the retransmission coefficient. This indicates a rounding up operation. If the result is less than 1, the number of retransmissions will be forced to be 1.
7. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The integrity verification during the data reception and processing stage adopts a multi-layer verification mechanism. The first layer is CRC16 cyclic redundancy check, the second layer is data length matching check, and the third layer is key field range check. Key fields include temperature value, humidity value and equipment operating status code. Each layer of verification is set with an independent failure threshold. When any layer of verification fails multiple times in a row, the corresponding data packet retransmission process is triggered.
8. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, The buffer monitoring uses a sliding window mean filtering process. The size of the filtering window is the number of consecutive detection cycles, and each detection cycle is the preset duration. The data growth status is judged by the rate of change of the filtered buffer data. The rate of change is calculated by the ratio of the difference between the current data volume and the data volume of the previous cycle to the data volume of the previous cycle. When the rate of change is less than the preset value for several consecutive times, it is determined that there is no new data.
9. The adaptive cold chain equipment data transmission method according to claim 1, characterized in that, It also includes a dynamic evaluation step for transmission performance. Evaluation indicators include data packet reception success rate, average transmission latency, and data integrity score. The reception success rate is the ratio of the number of successfully received data packets to the total number of requested data packets. The average transmission latency is the average time from sending a request to receiving a data packet. The integrity score is the weighted sum of the number of fields that pass verification and the total number of fields. The weights are pre-configured according to the importance of the fields. When any indicator fails to meet the preset threshold for multiple consecutive monitoring periods, the transmission parameter optimization process is automatically started.
Citation Information
Patent Citations
Method, device and electronic equipment for retransmission of lost packet
CN107147481A
Adaptive packet data transmission system and method based on Beidou short message
CN120151815A