Method and device for reducing point loss rate of industrial data transmission and electronic equipment
By dividing data into segments in industrial data transmission and combining segment and total cyclic redundancy checks, the problem of data loss caused by electromagnetic interference is solved, and the reliability and continuity of data in high-interference environments are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN KELIER IND AUTOMATION CONTROL TECH CO LTD
- Filing Date
- 2026-01-15
- Publication Date
- 2026-04-14
AI Technical Summary
In industrial real-time data acquisition systems, existing technologies lack fine-grained error localization and isolation methods, leading to the loss of entire data packets due to bit errors caused by electromagnetic interference. This affects the continuity and accuracy of equipment status analysis and visualization.
The collected data in the data packet to be sent is divided into multiple data segments according to the collection period, and a segment cyclic redundancy check (CRC) code is generated for each data segment. Combined with the total CRC code, the receiving end performs two-level verification to selectively use valid data segments.
It effectively isolates single-bit errors caused by electromagnetic interference, significantly improves data availability, reduces the data loss rate, and enhances the continuity of equipment status monitoring and the accuracy of data analysis. It is especially suitable for industrial real-time communication scenarios with large data volumes and strong interference conditions.
Smart Images

Figure CN121864261A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transmission technology in industrial control, and in particular to a method, apparatus and electronic device for reducing the data transmission loss rate in industrial data transmission. Background Technology
[0002] In industrial real-time data acquisition systems, devices periodically transmit large amounts of status monitoring data to the host via serial communication links. Each data packet contains raw data from multiple acquisition cycles and is typically 100 to 200 bytes in length. To ensure data integrity, existing technologies generally employ a single Cyclic Redundancy Check (CRC) mechanism to verify the entire data packet. However, electromagnetic interference such as motor start-up and shutdown during transmission can easily cause bit errors, leading to CRC check failures. Due to the lack of fine-grained error location and isolation methods, once the check fails, the entire data packet is discarded. Even if only one acquisition cycle's data is corrupted, the remaining correct data cannot be used, resulting in a high rate of effective data loss and affecting the continuity and accuracy of subsequent equipment status analysis and visualization. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, and electronic device for reducing the data loss rate in industrial data transmission, so as to alleviate the above-mentioned technical problems existing in the prior art.
[0004] In a first aspect, the present invention provides a method for reducing the data loss rate in industrial data transmission, comprising: The collected data in the data packet to be sent is divided into multiple data segments according to the collection period. Each data segment contains the raw data of multiple collection points within the same collection period. Cyclic redundancy check (CR) calculations are performed on the raw data of each data segment to generate the corresponding segment CR code. All segment CR codes are then appended to the continuous area following the total CR code in the data packet. Perform overall cyclic redundancy check calculation on the original data portion excluding the subsection cyclic redundancy check code to generate the total cyclic redundancy check code; After receiving the data packet, the receiving end performs integrity verification on the original data portion based on the total cyclic redundancy check (CRC) code. Once the total CRC check passes, the original data of each data segment and its corresponding segment CRC code are independently verified, and the corresponding data segment is selectively used based on the segment CRC check result and segment CRC code.
[0005] In an optional implementation, the collected data in the data packet to be sent is divided into multiple data segments according to the collection period, including: Get the number of valid collection points within the current collection period; When the number of valid collection points is lower than the preset minimum number of nodes, some collection points from adjacent collection cycles are merged into the current data segment to generate the corresponding data structure unit.
[0006] In an optional implementation, a total cyclic redundancy check (CRC) calculation is performed on the original data portion excluding the subsection CRC code to generate a total CRC code, including: Determine the range of data to be included in the total cyclic redundancy check (CRC). The data range includes the data header in the data packet and the original data of each data segment. Cyclic redundancy check is performed based on the data range, a total cyclic redundancy check code is generated, and the total cyclic redundancy check code is inserted into a specified field of the data packet for integrity verification at the receiving end.
[0007] In an optional implementation, cyclic redundancy check (CRC) calculations are performed on the original data of each data segment to generate corresponding segment CRC codes. All segment CRC codes are then appended to a continuous area following the total CRC code in the data packet, including: For the raw data of each data segment, a cyclic redundancy check operation is performed using a check field of preset byte length to generate the corresponding segment cyclic redundancy check code; All generated cyclic redundancy check (CRC) codes are arranged in order and appended to the reserved area after the total CRC code to form a complete check information segment.
[0008] In an optional implementation, for the original data of each data segment, a cyclic redundancy check (CRC) operation is performed using a check field of a preset byte length to generate the corresponding segment CRC code, including: The bit error rate, which is monitored in real time on the communication link, is input into a pre-built data transmission performance evaluation model. The data transmission performance evaluation model simulates the dropout rate and transmission efficiency of different cyclic redundancy check (CRC) lengths under the current interference intensity to determine the recommended configuration information. The recommended configuration information is used to indicate the length parameter of the CRC code using 2 bytes.
[0009] In an optional implementation, after the receiving end receives the data packet, it performs an integrity check on the original data portion based on the total cyclic redundancy check (CRC) code. Once the CRC check passes, it independently checks the original data of each data segment and its corresponding segment CRC code, and selectively uses the corresponding data segment based on the segment CRC check result and segment CRC code, including: After receiving the data packet, the receiving end parses the received data packet to obtain the data header and the original data of each data segment; The total cyclic redundancy check value is recalculated based on the original data of the data header and each data section, and the total cyclic redundancy check value is compared with the received total cyclic redundancy check code. If they match, the total cyclic redundancy check is deemed to have passed. Calculate the cyclic redundancy check value corresponding to the original data of each data segment, match the segment cyclic redundancy check value with the segment cyclic redundancy check code at the corresponding position, and submit the successfully matched segment data to the upper layer application for analysis and processing.
[0010] Secondly, the present invention provides an apparatus for reducing the data loss rate of industrial data transmission, comprising: The data segmentation module is used to divide the collected data in the data packet to be sent into multiple data segments according to the collection period, where each data segment contains the original data of multiple collection points within the same collection period; The subsection cyclic redundancy check generation module is used to perform cyclic redundancy check calculations on the original data of each data subsection, generate the corresponding subsection cyclic redundancy check code, and append all subsection cyclic redundancy check codes to the continuous area after the total cyclic redundancy check code in the data packet. The total cyclic redundancy check generation module is used to perform overall cyclic redundancy check calculations on the original data portion excluding the subsection cyclic redundancy check codes, and generate the total cyclic redundancy check code. The receiver verification control module is used to perform integrity verification on the original data portion according to the total cyclic redundancy check (CRC) code after the receiver receives the data packet. When the total CRC check passes, the original data of each data segment and its corresponding segment CRC code are independently verified, and the corresponding data segment is selectively used according to the segment CRC check result and segment CRC code.
[0011] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the method for reducing industrial data transmission loss rate according to any of the foregoing embodiments.
[0012] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for reducing industrial data transmission dropout rate according to any of the foregoing embodiments.
[0013] The method, apparatus, and electronic equipment provided in this application for reducing the data loss rate in industrial data transmission achieve fine-grained data integrity verification by dividing the collected data into multiple data segments periodically and generating segment CRC check codes for the raw data of each segment. If the total CRC check at the receiving end is inconsistent, each data segment is further checked independently, ensuring that local errors only affect the corresponding segment and do not lead to the loss of the entire data packet. This method effectively isolates the impact of single bit errors caused by electromagnetic interference on the overall data, significantly improving data availability in high-interference environments. Simultaneously, the segment CRC is appended to the total CRC, without affecting the main data segment structure, facilitating parsing and improving the verification success rate. While ensuring transmission reliability, selectively using data segments that pass verification avoids the problem of total data loss due to a single verification failure in traditional solutions, reducing the data loss rate and improving the continuity of equipment status monitoring and the accuracy of data analysis. This is particularly suitable for industrial real-time communication scenarios with large data volumes and strong interference conditions. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0015] Figure 1 A flowchart illustrating a method for reducing the data loss rate in industrial data transmission, provided in an embodiment of this application; Figure 2 A schematic diagram illustrating the original data and CRC-optimized data format provided in an embodiment of this application; Figure 3 A flowchart illustrating the analysis process provided in this application embodiment; Figure 4 A structural diagram of an apparatus for reducing the data loss rate in industrial data transmission, provided in an embodiment of this application; Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0017] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0018] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0019] This application provides a method for reducing the data loss rate in industrial data transmission. See [link to relevant documentation]. Figure 1 As shown, the method mainly includes the following steps: S110, the collected data in the data packet to be sent is divided into multiple data segments according to the collection period, and each data segment contains the raw data of multiple collection points within the same collection period.
[0020] The aforementioned acquisition cycle refers to the time unit within which a single data sampling is triggered uniformly in industrial control equipment. For example, it may involve acquiring multi-channel signals such as current, voltage, and temperature every 1ms. A data segment is a logical data unit divided based on this cycle, used to ensure the correlation and synchronization of data from different acquisition points within the same cycle.
[0021] In practice, the sending end packages the raw data from multiple sampling points (e.g., 8 points) obtained in each sampling session into a single data segment based on the preset sampling frequency and channel configuration. For example, if each sampling point occupies 2 bytes, then a segment is 16 bytes long. If there are insufficient sampling points in the current period (e.g., only 2 channels are enabled), data from adjacent periods can be dynamically merged to form a segment structure that meets the minimum effective length, thereby improving the efficiency of subsequent verification.
[0022] S120, Perform Cyclic Redundancy Check (CRC) calculations on the original data of each data segment, generate corresponding segment CRC codes, and append all segment CRC codes to the continuous area following the total CRC code in the data packet.
[0023] This step achieves fine-grained error detection by generating a CRC checksum independently for each data segment. The segment CRC checksum uses either the standard CRC-16 algorithm (2-byte output) or CRC-8 (1-byte output), with CRC-16 being preferred to reduce the probability of collisions.
[0024] During the encapsulation process, the system sequentially performs CRC calculations on each divided data segment, generates a corresponding check value, and caches these segment CRCs in order. After the total CRC is generated, it is appended to the reserved area after the total CRC field. For example, in a data packet containing 4 segments, four 2-byte segments totaling 8 bytes of CRC sequences are appended to form independent check information segments, facilitating parallel parsing by the receiving end.
[0025] S130: Perform overall cyclic redundancy check (CRC) calculation on the original data portion excluding the subsection CRC code to generate the total CRC code.
[0026] The above raw data section includes the data header and the raw data of all data sections, but does not contain any section CRC checksums to ensure that the total CRC only reflects the integrity of the main data.
[0027] In practice, the system uses the start address of the data header as the starting point and the end of the last data segment as the ending point, and calls the CRC-16-CCITT algorithm to calculate the check value of the entire data segment, generating a 2-byte total CRC checksum. This total CRC is inserted into the standard check field position of the data packet (usually located at the end of the data body and before the segment CRC), serving as the basis for the receiving end to initially determine whether the data is severely damaged.
[0028] S140: After receiving the data packet, the receiving end performs integrity verification on the original data portion according to the total cyclic redundancy check (CRC) code. When the total CRC check passes, the original data of each data segment and its corresponding segment CRC code are independently verified, and the corresponding data segment is selectively used according to the segment CRC check result and segment CRC code.
[0029] This step implements coordinated control of a two-level verification mechanism. First, the receiving end parses the data header and the content of each data segment, recalculates its total CRC value, and compares it with the received total CRC. If the total CRC check matches, all data is marked as valid, and the process directly enters the data analysis stage without further segmented CRC verification. If the total CRC check does not match, the second-level verification process begins, i.e., segmented CRC verification is performed. The CRC of each data segment is recalculated and matched against the corresponding segment's CRC checksum. For segments that match successfully, they are submitted to the upper-level analysis module for waveform plotting or status diagnosis; only failed segments are marked as invalid, without affecting the use of other periodic data. This strategy effectively curbs error propagation and improves data utilization in high-interference environments.
[0030] In summary, the above method effectively isolates the spread of errors caused by interference and significantly reduces the data loss rate by introducing an independent CRC check mechanism for data segments divided according to the acquisition cycle, based on the traditional whole-packet CRC check. Even if some data segments are corrupted, the remaining correct segments can still be used normally, improving data utilization and transmission reliability. Especially in high-interference environments, the data loss rate can be reduced by more than ten times compared to the traditional whole-packet discarding mechanism. Furthermore, by modeling and analyzing the balance between transmission efficiency and accuracy of different CRC lengths, a double-byte CRC is optimally selected. This ensures a low false positive rate while controlling additional overhead, achieving stable and efficient data acquisition under high data volumes, significantly improving the integrity of real-time monitoring in industrial control systems and enhancing user experience.
[0031] For ease of understanding, the above-mentioned methods provided in this application will be described in detail below.
[0032] In one implementation, the above-mentioned division of the collected data in the data packet to be sent into multiple data segments according to the collection period may include the following steps 1-1 and 1-2 in a specific implementation: Step 1-1: Obtain the number of valid collection points within the current collection period.
[0033] The number of valid sampling points refers to the number of sampling points corresponding to the monitoring channels that are actually activated and complete sampling within the current sampling period. Its value depends on the sampling channel range configured by the user. For example, in an industrial control device that supports 8 analog inputs, if only 2 channels are activated, the number of valid sampling points in this period is 2.
[0034] In practice, before each data encapsulation, the sending communication module first queries the list of activated acquisition channels for the current period and counts the number of valid acquisition points. This information comes from the device firmware configuration table or the sampling task instructions issued by the host computer, ensuring that the partitioning logic is consistent with the actual acquisition behavior.
[0035] Steps 1-2: When the number of valid collection points is lower than the preset minimum number of nodes, some collection points from adjacent collection cycles are merged into the current data segment to generate the corresponding data structure unit.
[0036] The aforementioned minimum number of nodes refers to a threshold set by the system (such as 4 or 5) to determine whether the data segments generated in the current period have sufficient data size to support the validity of subsequent segment-level CRC checks. When there are too few data collection points, generating CRC check codes for them individually will result in excessive check overhead, and short data is prone to check collisions, reducing reliability.
[0037] When the number of valid data collection points in the current period is determined to be less than the preset minimum number of nodes, the system dynamically adjusts its data organization strategy, selecting some data collection points from the next collection period to form a data segment that meets the minimum size requirement. For example, if the current period has only 2 data collection points, while the minimum number of nodes is 4, then 2 more data collection points will be added from the next period to form a data structure unit containing 4 data collection points. This unit still uses the timestamp of the first data collection point as its identifier to ensure that the time sequence is traceable.
[0038] This approach dynamically adjusts the composition of data segments based on the number of effective acquisition points, avoiding the problems of low CRC check efficiency or resource waste caused by excessively small data size in individual segments when there are few acquisition channels or only some are in use. Simultaneously, the cross-cycle merging mechanism ensures that each data segment has a reasonable data length, improving the stability and error detection capability of segment CRC checks. This enhances the adaptability and robustness of the solution in different application scenarios, meeting the actual needs of flexible configuration in industrial settings.
[0039] Furthermore, the above-mentioned calculation of overall cyclic redundancy check (CRC) for the original data portion excluding the subsection CRC code, generating the total CRC code, can, in specific implementation, include the following steps 2-1 and 2-2: Step 2-1: Determine the range of data to be included in the total cyclic redundancy check. The data range includes the data header in the data packet and the original data of each data segment.
[0040] The data range to be included in the total cyclic redundancy check (CRC) refers to the valid data area used to perform the total CRC check. This area consists of the data header and the original data of all data segments in the data packet, but does not include the CRC checksum of the subsequent appended segments.
[0041] In practice, after the sending end completes the data segmentation, it initiates the overall CRC generation process. First, it determines the start and end positions of the data to be checked through memory address mapping. A continuous data segment is formed, starting with the first byte of the data header and ending with the last byte of the last data segment. This data segment does not contain any checksum content, ensuring that the check logic is independent of additional information and improving the accuracy of error detection.
[0042] Step 2-2: Perform cyclic redundancy check based on the data range, generate a total cyclic redundancy check code, and insert the total cyclic redundancy check code into a specified field of the data packet for integrity verification at the receiving end.
[0043] The specified field refers to the predefined location of the total CRC in the data packet format. It is usually located at the end of the original data part and before the subsection CRC check code sequence. It conforms to the common check field layout specifications in industrial communication protocols, which facilitates quick location and parsing by the receiving end.
[0044] After determining the data range, the system calls the CRC-16 algorithm to perform a cyclic redundancy check operation on the continuous data segment, generating a total cyclic redundancy check code of 2 bytes. This total CRC value is then written to a preset check field in the data packet (e.g., at offset 168), serving as the basis for the receiver's initial verification of data integrity. The fixed and predictable position of this field facilitates efficient verification by the receiver.
[0045] This method explicitly limits the calculation scope of the total cyclic redundancy check (CRC) to only the original data of the data header and each data segment, eliminating interference from segment CRC checksums and ensuring that the total CRC accurately reflects the integrity of the core transmitted data. Combining standard algorithms with a fixed field writing mechanism improves the determinism and compatibility of the verification process, enabling the receiving end to quickly complete preliminary screening without parsing additional check information. This reduces processing latency while enhancing the system's ability to identify large-scale data errors, effectively supporting the stable operation of the two-level verification architecture.
[0046] Furthermore, the above-mentioned calculation of cyclic redundancy check (CRCD) is performed on the original data of each data segment to generate the corresponding segment CRCD code. All segment CRCD codes are then appended to the continuous area following the total CRCD code in the data packet. In specific implementation, this may include the following steps 3-1 and 3-2: Step 3-1: For the original data of each data segment, perform a cyclic redundancy check operation using a check field of preset byte length to generate the corresponding segment cyclic redundancy check code.
[0047] The preset byte length of the checksum field refers to the output length configuration used to generate the CRC checksum of the subsection. It is typically 1 byte (CRC-8) or 2 bytes (CRC-16), and this length is preset during system initialization based on the interference intensity and performance requirements of the communication environment. A shorter length reduces overhead but increases the probability of false positives, while a longer length improves error detection capability but increases transmission load. In most industrial scenarios, 2 bytes is the preferred choice to balance reliability and efficiency.
[0048] Step 3-2: Arrange all the generated subsection cyclic redundancy check codes in order and attach them to the reserved area after the total cyclic redundancy check code to form a complete check information segment.
[0049] The reserved area refers to the contiguous storage space in the data packet dedicated to storing the CRC checksum of the sub-sections. It is located after the total CRC field and before the end of the data packet. Its starting position and capacity are dynamically allocated according to the number of sub-sections and the length of a single CRC, ensuring that all sub-section CRCs are arranged in order and centrally managed, which facilitates batch reading and parsing by the receiving end.
[0050] After all CRC segments are generated, the system writes their corresponding checksums sequentially into the reserved area following the total CRC field, according to the order of the data segments in the packet, forming a continuous checksum segment. For example, if the data packet contains 4 segments and each segment has a 2-byte CRC, then 8 bytes of space are reserved for storing this sequence. This layout ensures that the receiving end can accurately extract and match the checksums of each segment based on a fixed offset relationship.
[0051] This approach achieves fine-grained integrity protection for data collected over a specific period by independently generating a cyclic redundancy check (CRC) code for each data segment and standardizing it using a uniform-length field. Combined with a sequential centralized storage mechanism, it reduces the complexity of managing verification information while ensuring efficient and accurate segment-by-segment verification at the receiving end. This design effectively avoids the "whole packet discard" problem of traditional single-point verification, significantly improves the retention rate of valid data in high-interference environments, enhances the robustness and availability of data transmission, and meets the dual requirements of industrial control systems for real-time performance and stability.
[0052] Furthermore, for each data segment's raw data, a cyclic redundancy check (CRC) operation is performed using a check field of a preset byte length to generate the corresponding segment CRC code. In specific implementation, this may include the following steps 4-1 and 4-2: Step 4-1: Based on the bit error rate monitored in real time on the communication link, input it into the pre-built data transmission performance evaluation model.
[0053] Bit error rate (BER) refers to the statistical probability of a bit flip occurring per unit time in a communication link. It is typically obtained through error counts returned by the receiver or through joint verification between the sender and receiver. This parameter is used to quantify the interference intensity of the current transmission environment and is a key input for dynamically adjusting data protection strategies.
[0054] In practice, the system periodically collects error statistics from the communication link, calculates the current average bit error rate, and sends it as input to the deployed data transmission performance evaluation model. This model evaluates the error propagation range and data availability under different CRC lengths based on a preset algorithm (such as probability derivation based on Poisson distribution), providing quantitative support for subsequent configuration selection.
[0055] Step 4-2: Simulate the dropout rate and transmission efficiency of different cyclic redundancy check (CRC) lengths under the current interference intensity using a data transmission performance evaluation model to determine the recommended configuration information. The recommended configuration information is used to indicate the length parameter of the CRC code using 2 bytes.
[0056] A data transmission performance evaluation model is a mathematical model built based on historical experimental data and theoretical analysis. It is used to simulate the comprehensive performance of different CRC lengths (such as 1 byte or 2 bytes) under a specific bit error rate. Its output indicators include the bit loss rate, effective data utilization, and transmission efficiency. This model can be pre-installed in the system firmware and supports real-time invocation to optimize configuration decisions.
[0057] After the model runs, it outputs the expected performance curves for each CRC length scheme. The system compares these curves with preset optimization goals (such as prioritizing reducing the data loss rate) and generates recommended configuration information. When the analysis results show that 2-byte CRC can significantly reduce the data misjudgment rate under the current interference conditions and the transmission efficiency loss is controllable, the system automatically configures the segment CRC length to 2 bytes and applies it to the segment-level check generation process of subsequent data packets.
[0058] This approach introduces a dynamic evaluation mechanism based on actual link conditions to achieve intelligent configuration of the CRC (Cyclic Redundancy Check) length. By utilizing a data transmission performance evaluation model to predict the performance of different check lengths under real interference environments, it ensures data integrity is prioritized in high-bit-error-rate scenarios. The reasonable selection of 2 bytes as the CRC length parameter effectively balances the conflict between error detection capability and transmission overhead. Overall, this improves the adaptive capability of the CRC strategy and enhances the system's stability and data availability in complex electromagnetic environments.
[0059] Furthermore, after receiving the data packet at the receiving end, the integrity of the original data portion is checked based on the total cyclic redundancy check (CRC) code. Once the CRC check passes, the original data of each data segment and its corresponding segment CRC code are independently checked. Based on the segment CRC check result, the corresponding data segment is selectively used. In specific implementation, this may include steps 5-1 and 5.3: Step 5-1: After receiving the data packet at the receiving end, the received data packet is parsed to obtain the data header and the original data of each data segment.
[0060] The header is the control field located at the beginning of the data packet. It contains metadata such as frame identifier, length information, and acquisition timestamp, which guides the receiving end to correctly parse subsequent content.
[0061] In practice, after receiving the data packet, the receiving end communication module first parses its structure according to the preset protocol format, extracts the data header content, and divides the main data into multiple logical data segments based on the number of cycles indicated in the header and the number of sampling points per cycle. This process is completed based on a fixed offset rule, ensuring strict correspondence with the encapsulation method of the sending end and providing an accurate data foundation for subsequent two-level verification.
[0062] Step 5-2: Recalculate the total cyclic redundancy check value based on the original data of the data header and each data section, and compare the total cyclic redundancy check value with the received total cyclic redundancy check code. If they match, the total cyclic redundancy check is deemed to have passed.
[0063] Recalculating the total cyclic redundancy check value means that the receiving end performs a CRC operation on the parsed data header and the original data of each data segment using the same algorithm and data range as the sending end. The result is then compared with the received total CRC checksum to determine whether an error occurred in the main data part during transmission.
[0064] The receiving end uses the same CRC algorithm as the sending end (such as CRC-16-CCITT), with the input range from the start address of the data header to the end of the last data segment, to calculate the total cyclic redundancy check value. This calculated value is then compared with the total CRC checksum in a specified field of the data packet. If they match, the original data is considered to be largely intact, allowing it to proceed to the next stage of segment-level verification; if they do not match, the entire data packet is marked as invalid and discarded.
[0065] Step 5-3: Calculate the cyclic redundancy check value corresponding to the original data of each data segment, match the segment cyclic redundancy check value with the segment cyclic redundancy check code at the corresponding position, and submit the successfully matched segment data to the upper layer application for analysis and processing.
[0066] Segment cyclic redundancy check (CRC) matching refers to the receiving end performing CRC calculation independently on each data segment and comparing the result with the corresponding segment CRC checksum in the data packet item by item. Only when the two match is the segment data considered complete and usable, reflecting fine-grained error isolation capabilities.
[0067] Upon receiving a data packet, the system first performs a total CRC check on the data portion. This total CRC calculation only includes the data header and the contents of each data segment, excluding subsequent appended segment CRC fields. If the total CRC check passes, the entire data packet is considered complete and highly reliable. The system directly uses all the data and pushes it to upper-level application modules such as device status analysis and waveform plotting for processing, without performing separate CRC checks on each segment. This approach is logically consistent with traditional single-level CRC schemes, but because the total CRC in this scheme does not cover the segment CRC fields, it avoids the situation where the main check fails due to errors in the check information itself, thereby increasing the probability of retaining valid data.
[0068] When the overall CRC check fails, it indicates a potential transmission error in the data portion. In this case, fine-grained verification is performed using independently appended CRC checksums for each data segment. The CRC calculation is performed sequentially on the content of each data segment, and the result is compared with the CRC checksum of the corresponding segment. For segments with a successful CRC match, it is determined that their local data has not been affected by interference, and the data in that segment is retained for subsequent analysis. For segments with a failed CRC match, they are marked as invalid and discarded, but this does not affect the use of data in other normal segments.
[0069] The above method employs a dual verification mechanism, using a phased processing strategy of "overall first, then local" to achieve coarse-to-fine data integrity verification. The total CRC serves as the first level for quickly filtering high-confidence data packets, maintaining an efficient processing flow in most low-interference scenarios. Only when the main verification fails is the sub-section CRC used for segment-by-segment recovery, avoiding the additional computational overhead of conventional full-segment verification. This design significantly reduces the risk of entire data packets being discarded due to a single bit flip, especially in high-interference industrial environments, effectively salvaging data from usable periods and reducing the data loss rate.
[0070] In an optional implementation, the above method further includes steps 6-1 and 6-2: Step 6-1: Periodically collect error statistics of the communication link and update the error probability model of the current transmission environment by combining historical interference data.
[0071] An error probability model is a probabilistic analysis model built based on historical bit error statistics. It is used to estimate the likelihood of errors occurring in data packets and data segments under different interference conditions. This model can be dynamically updated using methods such as exponentially weighted moving average (EWMA) to characterize real-time channel quality changes.
[0072] In practice, the system collects error event counts of the communication link at fixed time intervals (e.g., per second) and combines this with interference trends over a period of time (e.g., motor start-stop cycles). A filtering algorithm is then used to remove instantaneous fluctuation noise, generating a smooth bit error rate estimate. This value is then input into the error probability model to update the model's internal parameters, ensuring it accurately reflects the data transmission risk level under the current operating conditions.
[0073] Step 6-2: Based on the updated error probability model, call the optimization algorithm to dynamically adjust the granularity of data segment division and the length of segment cyclic redundancy check code, so that the optimized new configuration can be applied to the subsequent data packet encapsulation process.
[0074] Once the error probability model is updated, the system triggers the optimization algorithm. If strong interference (high bit error rate) is detected, it is recommended to increase the CRC length of each segment to 2 bytes to improve error detection capability; if the interference is weak, the number of segments can be appropriately reduced and the data size of each segment increased to improve transmission efficiency. After confirmation, the new configuration is written to the sending end encapsulation module for the format generation of all subsequent data packets, realizing closed-loop adaptive control of the transmission strategy.
[0075] This method achieves real-time perception of the complex electromagnetic environment in industrial settings by periodically collecting link error information and dynamically updating the error probability model. Combined with optimization algorithms, the granularity of data segmentation and the length of the segment cyclic redundancy check (CRC) code are adaptively adjusted, enabling the data protection mechanism to intelligently evolve with changes in interference intensity. Under high interference, it prioritizes data integrity while also considering transmission efficiency under low interference.
[0076] Figure 2 This diagram illustrates the original data and the CRC-optimized data format. In existing technologies, industrial control equipment typically organizes data acquisition in a periodic manner. Multiple acquisition points form a group of data segments (sections) within a sampling period, and multiple groups of data segments are combined into a complete data packet for transmission. Each data packet contains a data header, several data sections, and a total CRC checksum. This embodiment, while retaining the original total CRC checksum, further introduces an independent CRC checksum for each data section, i.e., section CRC, to achieve fine-grained data integrity judgment. Specifically, the data packet format adds a CRC field corresponding to each section to the original structure, forming the following structure: Data Header, Section 1 Data, Section 2 Data, ..., Section N Data, Total CRC, Section 1 CRC, Section 2 CRC, ..., Section N CRC. The numbers in this diagram are for illustrative purposes only and can be adapted to meet specific needs in practical applications.
[0077] Correspondingly, the data parsing process at the receiving end has also been optimized, such as... Figure 3As shown, the process includes the following steps: First, the data header is parsed and the data is cut into segments according to length; then, a total CRC calculation is performed to determine whether the overall data is severely damaged; if the total CRC check passes, all data is marked as valid and proceeds directly to subsequent data analysis; if the total CRC check fails, each segment of data is independently checked using the CRC of each segment, the segment data that failed the check is marked, and the remaining normal segment data is used for subsequent analysis.
[0078] It is important to note that the overall CRC calculation does not include the CRC fields of each subsection themselves; it only covers the original data portion (i.e., the data header and the data content of each subsection). This method avoids overall CRC check failure due to errors in the subsection CRC fields themselves, thereby improving overall data utilization. Furthermore, since subsequent local checks have been performed using independent subsection CRC, the main function of the overall CRC is to detect large-scale data corruption. Therefore, it is unnecessary to extend its calculation scope to auxiliary verification information, and this does not affect the accuracy of the final judgment result.
[0079] Furthermore, considering that users may only select a small number of sampling points for monitoring in practical applications, dividing each point into an independent segment and adding a CRC would significantly increase redundancy overhead and reduce transmission efficiency. Therefore, this invention also provides a dynamic adjustment mechanism: when the number of sampling points is small, multiple adjacent sampling points can be merged into a single logical segment, maintaining the number of segments at a moderate level, thereby balancing verification accuracy and communication overhead.
[0080] Furthermore, because a CRC length that is too short is prone to collisions (different data generating the same checksum), leading to misjudgments and misuse of erroneous data; while a length that is too long will increase the additional transmission burden and affect bandwidth utilization efficiency. Therefore, this embodiment also aims to determine how to reasonably select the CRC section length for performance optimization.
[0081] Based on this, the present invention establishes a mathematical model to compare and analyze the data transmission performance under the two modes. The system parameters involved include frame length: L bits (128 or 256), segment length: D bits (4, 8, or 16), number of segments: N = L / D, CRC check bit length: C bits (8 or 16), and bit error rate: e. This embodiment provides two schemes corresponding to the data structure and transmission order: Scheme A (Single-level CRC): Data + Overall CRC (length is C bits); Scheme B (Two-level CRC): Data + Overall CRC + N × Segment CRC (each segment CRC is C bits long).
[0082] The key point is that the receiving end first checks the overall CRC. If the overall CRC is correct, the entire data frame is accepted and segmented CRC is not checked. If the overall CRC is incorrect, segmented CRC is used, and only segments of data with correct CRC are accepted.
[0083] When performing calculations, the calculation methods for the two schemes mentioned above are as follows: 1. Efficiency formula for Scheme A (single-level CRC) Total transmitted bits: L + C Successful transmission probability: The overall CRC check must pass, requiring both the data portion and the overall CRC to be error-free. The formula for the successful transmission probability is: Pglobal _ success =(1 e ) L+C Expected data volume to be received: L ×(1 e ) L+C Transmission efficiency formula:
[0084] 2. Efficiency formula for Scheme B (Two-level CRC) Total transmitted bits: L+C+N C Overall CRC success rate: PG =(1 e ) L+C Probability of a single segment CRC success: PS =(1 e ) D+C Expected data volume to be received:
[0085] The second item indicates the expected amount of segmented data to be received when the overall CRC fails.
[0086] Transmission efficiency formula:
[0087] Simplified transmission efficiency formula:
[0088] Tables 1 and 2 below show a comparison of the two configurations. Table 1 shows the optimal configuration with L=128 bits and C=8 bits, and Table 2 shows the optimal configuration with L=128 bits and C=16 bits.
[0089] Table 1
[0090] Table 2
[0091] Further comparison of the impact of single-byte and double-byte CRC segments reveals that the difference in performance improvement is small, but double-byte CRC is more effective in reducing the risk of checksum collisions and improving data security. Therefore, when resources permit, double-byte CRC should be preferred as the segment check length.
[0092] In summary, this invention significantly improves the reliability of data transmission in industrial control systems with large data volumes and high interference scenarios by introducing a segmented CRC mechanism. Its core lies in combining overall verification with local verification, improving data utilization and system robustness without affecting overall protocol compatibility. It is particularly suitable for industrial control systems with high requirements for real-time performance and data integrity.
[0093] Based on the above method embodiments, this application also provides an apparatus for reducing the data loss rate in industrial data transmission, see [link to relevant documentation]. Figure 4 As shown, the device mainly includes the following parts: The data segmentation module 410 is used to divide the collected data in the data packet to be sent into multiple data segments according to the collection period, wherein each data segment contains the original data of multiple collection points within the same collection period; The subsection cyclic redundancy check generation module 420 is used to perform cyclic redundancy check calculations on the original data of each data subsection, generate the corresponding subsection cyclic redundancy check code, and append all subsection cyclic redundancy check codes to the continuous area after the total cyclic redundancy check code in the data packet. The total cyclic redundancy check generation module 430 is used to perform overall cyclic redundancy check calculation on the original data part excluding the subsection cyclic redundancy check code, and generate the total cyclic redundancy check code. The receiving end verification control module 440 is used to perform integrity verification on the original data part according to the total cyclic redundancy check code after the receiving end receives the data packet. When the total cyclic redundancy check passes, the original data of each data segment and its corresponding segment cyclic redundancy check code are independently verified, and the corresponding data segment is selectively used according to the segment cyclic redundancy check result and segment cyclic redundancy check code.
[0094] In one feasible implementation, the data segmentation module 410 is specifically used for: Get the number of valid collection points within the current collection period; When the number of valid collection points is lower than the preset minimum number of nodes, some collection points from adjacent collection cycles are merged into the current data segment to generate the corresponding data structure unit.
[0095] In one feasible implementation, the cyclic redundancy check generation module 420 described above is used for: Determine the range of data to be included in the total cyclic redundancy check (CRC). The data range includes the data header in the data packet and the original data of each data segment. Cyclic redundancy check is performed based on the data range, a total cyclic redundancy check code is generated, and the total cyclic redundancy check code is inserted into a specified field of the data packet for integrity verification at the receiving end.
[0096] In one feasible implementation, the cyclic redundancy check generation module 420 described above is used for: For the raw data of each data segment, a cyclic redundancy check operation is performed using a check field of preset byte length to generate the corresponding segment cyclic redundancy check code; All generated cyclic redundancy check (CRC) codes are arranged in order and appended to the reserved area after the total CRC code to form a complete check information segment.
[0097] In one feasible implementation, the cyclic redundancy check generation module 420 described above is used for: The bit error rate, which is monitored in real time on the communication link, is input into a pre-built data transmission performance evaluation model. The data transmission performance evaluation model simulates the dropout rate and transmission efficiency of different cyclic redundancy check (CRC) lengths under the current interference intensity to determine the recommended configuration information. The recommended configuration information is used to indicate the length parameter of the CRC code using 2 bytes.
[0098] In one feasible implementation, the aforementioned receiver verification control module 440 is specifically used for: After receiving the data packet, the receiving end parses the received data packet to obtain the data header and the original data of each data segment; The total cyclic redundancy check value is recalculated based on the original data of the data header and each data section, and the total cyclic redundancy check value is compared with the received total cyclic redundancy check code. If they match, the total cyclic redundancy check is deemed to have passed. Calculate the cyclic redundancy check value corresponding to the original data of each data segment, match the segment cyclic redundancy check value with the segment cyclic redundancy check code at the corresponding position, and submit the successfully matched segment data to the upper layer application for analysis and processing.
[0099] The device for reducing industrial data transmission loss rate provided in this application has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the embodiment of the device for reducing industrial data transmission loss rate can be referred to the corresponding content in the aforementioned method embodiment for reducing industrial data transmission loss rate.
[0100] This application also provides an electronic device, such as... Figure 5 The diagram shows the structure of the electronic device 100, which includes a processor 51 and a memory 50. The memory 50 stores computer-executable instructions that can be executed by the processor 51. The processor 51 executes the computer-executable instructions to implement any of the above-mentioned methods for reducing the loss rate of industrial data transmission.
[0101] exist Figure 5 In the illustrated embodiment, the electronic device further includes a bus 52 and a communication interface 53, wherein the processor 51, the communication interface 53, and the memory 50 are connected via the bus 52.
[0102] The memory 50 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 53 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 52 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0103] The processor 51 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 51 or by instructions in software form. The processor 51 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory. The processor 51 reads the information in the memory and, in conjunction with its hardware, completes the steps of the method for reducing the loss rate of industrial data transmission in the aforementioned embodiment.
[0104] This application also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-described method for reducing the dropout rate of industrial data transmission. For specific implementation details, please refer to the foregoing method embodiments, which will not be repeated here.
[0105] The computer program product for the method, apparatus, and electronic device for reducing industrial data transmission loss rate provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0106] Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of this application.
[0107] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for reducing the data loss rate in industrial data transmission, characterized in that, include: The collected data in the data packet to be sent is divided into multiple data segments according to the collection period. Each data segment contains the raw data of multiple collection points within the same collection period. Cyclic redundancy check (CR) calculations are performed on the original data of each data segment to generate corresponding segment CR codes, and all segment CR codes are appended to a continuous area following the total CR code in the data packet. Perform overall cyclic redundancy check calculation on the original data portion excluding the subsection cyclic redundancy check code to generate the total cyclic redundancy check code; After receiving the data packet, the receiving end performs integrity verification on the original data portion according to the total cyclic redundancy check (CRC) code. When the total CRC check passes, the original data of each data segment and its corresponding segment CRC code are independently verified, and the corresponding data segment is selectively used according to the segment CRC check result and segment CRC code.
2. The method for reducing industrial data transmission loss rate according to claim 1, characterized in that, The collected data in the data packet to be sent is divided into multiple data segments according to the collection period, including: Get the number of valid collection points within the current collection period; When the number of valid collection points is lower than the preset minimum number of nodes, some collection points from adjacent collection cycles are merged into the current data segment to generate the corresponding data structure unit.
3. The method for reducing industrial data transmission loss rate according to claim 1, characterized in that, Perform overall cyclic redundancy check (CRC) calculation on the original data portion excluding the subsection CRC codes to generate the total CRC code, including: Determine the range of data to be included in the total cyclic redundancy check (CRC) test. The range of data includes the data header in the data packet and the original data of each data segment. Cyclic redundancy check is performed based on the data range to generate a total cyclic redundancy check code, which is then inserted into a designated field of the data packet for integrity verification at the receiving end.
4. The method for reducing industrial data transmission loss rate according to claim 1, characterized in that, Cyclic redundancy check (CRC) calculations are performed on the original data of each data segment to generate corresponding segment CRC codes. All segment CRC codes are then appended to a continuous region following the total CRC code in the data packet, including: For the raw data of each data segment, a cyclic redundancy check operation is performed using a check field of preset byte length to generate the corresponding segment cyclic redundancy check code; All generated cyclic redundancy check (CRC) codes are arranged in order and appended to the reserved area after the total CRC code to form a complete check information segment.
5. The method for reducing industrial data transmission loss rate according to claim 4, characterized in that, For each data segment's raw data, a cyclic redundancy check (CRC) operation is performed using a check field of preset byte length to generate the corresponding segment CRC code, including: The bit error rate, which is monitored in real time on the communication link, is input into a pre-built data transmission performance evaluation model. The data transmission performance evaluation model simulates the dropout rate and transmission efficiency of different cyclic redundancy check (CRC) lengths under the current interference intensity to determine recommended configuration information. The recommended configuration information is used to indicate the use of 2 bytes as the length parameter of the CRC code.
6. The method for reducing industrial data transmission loss rate according to claim 1, characterized in that, After receiving the data packet, the receiving end performs integrity verification on the original data portion based on the total cyclic redundancy check (CRC) code. Once the total CRC check passes, each data segment's original data and its corresponding segment CRC code are independently verified. Based on the segment CRC check result, the corresponding data segment is selectively used, including: After receiving the data packet, the receiving end parses the received data packet to obtain the data header and the original data of each data segment; The total cyclic redundancy check value is recalculated based on the original data of the data header and each data section, and the total cyclic redundancy check value is compared with the received total cyclic redundancy check code. If they match, the total cyclic redundancy check is deemed to have passed. Calculate the cyclic redundancy check value corresponding to the original data of each data segment, match the cyclic redundancy check value of the segment with the cyclic redundancy check code of the corresponding position, and submit the successfully matched segment data to the upper layer application for analysis and processing.
7. A device for reducing the data loss rate in industrial data transmission, characterized in that, include: The data segmentation module is used to divide the collected data in the data packet to be sent into multiple data segments according to the collection period, where each data segment contains the original data of multiple collection points within the same collection period; The segment cyclic redundancy check generation module is used to perform cyclic redundancy check calculations on the original data of each data segment, generate the corresponding segment cyclic redundancy check code, and append all segment cyclic redundancy check codes to the continuous area after the total cyclic redundancy check code in the data packet. The total cyclic redundancy check generation module is used to perform overall cyclic redundancy check calculations on the original data portion excluding the subsection cyclic redundancy check codes, and generate the total cyclic redundancy check code. The receiving end verification control module is used to perform integrity verification on the original data portion according to the total cyclic redundancy check code after the receiving end receives the data packet. When the total cyclic redundancy check passes, the original data of each data segment and its corresponding segment cyclic redundancy check code are independently verified, and the corresponding data segment is selectively used according to the segment cyclic redundancy check result and segment cyclic redundancy check code.
8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the method for reducing industrial data transmission dropout rate as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for reducing industrial data transmission loss rate as described in any one of claims 1 to 6.