Data transmission method, device, equipment, medium and product

The data transmission unit automatically identifies and analyzes the communication protocol of the terminal device, solving the problems of high maintenance costs and poor compatibility caused by the diversity of device communication protocols, and achieving efficient and secure data transmission and management.

CN120751038APending Publication Date: 2025-10-03GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510858879.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In the existing technology, the diversity of device communication protocols leads to difficulties in device communication, high maintenance costs, poor compatibility, and the data transmission unit needs to be manually configured and developed for specific protocols, which makes expansion difficult.

Method used

The target communication protocol of the terminal device is automatically identified through the data transmission unit, parsed using the protocol parsing engine, and supported by remote dynamic updates, thus achieving standardized data processing and adaptive parsing, reducing operation and maintenance costs and improving compatibility.

Benefits of technology

The data transmission unit can automatically identify and parse multiple communication protocols, reducing manual configuration and development costs, improving device compatibility and data transmission efficiency, and enhancing system security and remote management capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751038A_ABST
    Figure CN120751038A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method, device, equipment, medium and product, which are applied to the field of communication and applied to a data transmission unit, the data transmission unit is deployed on terminal equipment, and the method comprises the following steps: responding to access of the terminal equipment, and identifying a target communication protocol used by the terminal equipment; when communication data sent by the terminal equipment is received, calling a protocol analysis engine corresponding to the target communication protocol, and analyzing the communication data to obtain analysis result data; and transmitting the analysis result data to a server. Through the embodiment of the invention, the data transmission unit automatically identifies the communication protocol used by the terminal equipment and automatically analyzes the data, manual configuration and development for a specific protocol are not needed, the maintenance cost and the expansion difficulty are reduced, and the compatibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, equipment, medium and product for data transmission. Background Art

[0002] With the development of communication technologies such as the Internet of Things, the types of devices and communication protocols are increasing. Devices from different manufacturers usually use different communication protocols, causing difficulties in device communication.

[0003] In the prior art, devices are configured with a Data Transfer Unit (DTU), but the DTU usually needs to be manually configured and developed for a specific protocol, resulting in high maintenance costs, poor compatibility, and difficulty in expansion. Summary of the Invention

[0004] In view of the above problems, a method, apparatus, device, medium and product for data transmission are proposed to overcome the above problems or at least partially solve the above problems, including:

[0005] A data transmission method, applied to a data transmission unit, wherein the data transmission unit is deployed in a terminal device, the method comprising:

[0006] In response to the terminal device accessing, identifying a target communication protocol used by the terminal device;

[0007] Upon receiving the communication data sent by the terminal device, calling the protocol parsing engine corresponding to the target communication protocol to parse the communication data and obtain parsing result data;

[0008] The analysis result data is transmitted to the server.

[0009] Optionally, it also includes:

[0010] During the process of transmitting the analysis result data to the server, the data transmission strategy is adjusted according to the current network status and / or data update frequency.

[0011] Optionally, the data transmission strategy is adjusted according to the current network status and / or data update frequency, including:

[0012] When the data update frequency is less than or equal to the preset frequency, determining the data fields that have changed in the analysis result data, and transmitting the changed data fields to the cloud server;

[0013] When the data update frequency is greater than the preset frequency, the analysis result data is transmitted to the server.

[0014] Optionally, the data transmission strategy is adjusted according to the current network status and / or data update frequency, including:

[0015] When the network signal strength is less than the preset strength or the network bandwidth is less than the preset bandwidth in the current network condition, multiple data packets of the analysis result data are merged and transmitted to the server in batches.

[0016] Optionally, it also includes:

[0017] When the data transmission of the analysis result fails, determining the current number of retransmissions;

[0018] Determine the current retransmission interval duration based on the current number of retransmissions;

[0019] The analysis result data is resent according to the current resending interval.

[0020] Optionally, in response to the terminal device accessing, identifying a target communication protocol used by the terminal device includes:

[0021] In response to the terminal device accessing, determining key characteristics of communication data sent by the terminal device;

[0022] Comparing the key feature with candidate features in a preset protocol feature library; wherein the protocol feature library stores a correspondence between multiple communication protocols and candidate features;

[0023] According to the comparison result, the target communication protocol used by the terminal device is determined.

[0024] Optionally, before transmitting the parsing result data to the server, the method further includes: performing standardization processing on the parsing result data.

[0025] Optionally, standardizing the parsing result data includes: standardizing the fields where the data in the parsing result data is located; and / or standardizing the units used for the data in the parsing result data; and / or standardizing the time format in the parsing result data.

[0026] Optionally, it also includes:

[0027] Requesting the latest protocol parsing rules from the server, and using the latest protocol parsing rules to update the data transmission unit; wherein the protocol parsing rules are used by the protocol parsing engine when parsing the communication data.

[0028] A data transmission device, applied to a data transmission unit, wherein the data transmission unit is deployed in a terminal device, and the device comprises:

[0029] a target communication protocol identification module, configured to identify a target communication protocol used by the terminal device in response to access by the terminal device;

[0030] a parsing result data obtaining module, configured to, upon receiving communication data sent by the terminal device, call a protocol parsing engine corresponding to the target communication protocol, parse the communication data, and obtain parsing result data;

[0031] The analysis result data transmission module is used to transmit the analysis result data to the server.

[0032] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method described above when executed by the processor.

[0033] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0034] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the computer program implements the method described above.

[0035] The embodiments of the present invention have the following advantages:

[0036] In an embodiment of the present invention, the data transmission unit identifies the target communication protocol used by the terminal device in response to the access of the terminal device. When receiving the communication data sent by the terminal device, the protocol parsing engine corresponding to the target communication protocol is called to parse the communication data to obtain parsing result data, and the parsing result data is transmitted to the server. This enables the data transmission unit to automatically identify the communication protocol used by the terminal device and automatically parse the data, without the need for manual configuration and development for specific protocols, reducing maintenance costs and expansion difficulties, and improving compatibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 is a flowchart of the steps of a data transmission method provided by some embodiments of the present invention;

[0039] Figure 2is a flowchart of another method for data transmission provided by some embodiments of the present invention;

[0040] Figure 3 is a flowchart of the steps of another method for data transmission provided by some embodiments of the present invention;

[0041] Figure 4 is a flowchart of the steps of another method for data transmission provided by some embodiments of the present invention;

[0042] Figure 5 is a flowchart of steps of a data transmission method provided by some embodiments of the present invention;

[0043] Figure 6 This is a structural block diagram of a data transmission device provided by some embodiments of the present invention. DETAILED DESCRIPTION

[0044] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.

[0045] In related technologies, data transmission units are developed for a single protocol and require manual configuration, failing to automatically adapt to various communication standards, resulting in a large development and maintenance workload. In the embodiments of the present invention, automated protocol recognition and adaptive parsing are used to identify and adapt to multiple communication protocols, simplifying the access process.

[0046] Furthermore, data uploaded from different devices can vary significantly in fields, units, and formats, making data integration and subsequent analysis difficult. In this embodiment of the present invention, a unified data standardization solution is introduced to achieve consistency across multiple data formats through technologies such as field mapping, unit conversion, and time synchronization.

[0047] Furthermore, once the protocol parsing rules of the data transmission unit are fixed, they must be upgraded on-site when new protocols emerge or when they change, which is costly and inflexible. In this embodiment of the present invention, a remote dynamic update mechanism is supported to automatically obtain the latest parsing rules from the cloud, reducing operation and maintenance costs and maintaining long-term system adaptability.

[0048] This embodiment of the present invention proposes a unified access method for multi-protocol compatible data transmission units. It automatically identifies device communication protocols, performs data standardization, and supports remote dynamic updates. This improves the compatibility and intelligence of data transmission units, enhancing device compatibility and data transmission efficiency. Furthermore, this embodiment not only reduces operational costs but also enhances system security and remote management capabilities, providing a more stable and efficient solution for IoT applications.

[0049] The embodiments of the present invention mainly include the following aspects:

[0050] 1. Protocol adaptive parsing mechanism:

[0051] In an embodiment of the present invention, data frame feature extraction and pattern matching are combined with a machine learning model to achieve automatic recognition and analysis of multiple communication protocols, simplify the device access process and improve compatibility.

[0052] 2. Data standardization and transmission optimization mechanism:

[0053] In an embodiment of the present invention, data from different devices are converted into a unified standard format through field mapping, unit conversion and time synchronization; at the same time, differential coding, data compression and batch transmission technology are used to optimize data transmission efficiency and reduce network load.

[0054] 3. Remote dynamic update and security mechanism:

[0055] In an embodiment of the present invention, the data transmission unit is supported to automatically update the parsing rules through the cloud protocol library to achieve remote maintenance, and adopts TLS (Transport Layer Security) encryption, AES (Advanced Encryption Standard) data protection and identity authentication to ensure data transmission security and improve the scalability and intelligence level of the system.

[0056] In the embodiment of the present invention, at least the following effects are achieved:

[0057] 1. Improved compatibility: Automatically identify and adaptively analyze various communication protocols, enabling the data transmission unit to seamlessly connect to devices from different manufacturers, greatly reducing manual configuration and development costs.

[0058] 2. Optimize transmission efficiency: Through standardized data formats, differential coding and compression technology, reduce data redundancy, reduce bandwidth usage, and improve data transmission efficiency and reliability.

[0059] 3. Enhanced security: TLS encryption, AES data protection and identity authentication are used to prevent data leakage and attacks, while supporting remote updates to improve system scalability.

[0060] like Figure 1 The embodiments of the present invention mainly include device access and protocol identification, data analysis and standardization, intelligent data transmission optimization, remote dynamic update, security authentication and data encryption.

[0061] The present invention will be further described below:

[0062] Reference Figure 2 , shows a step flow chart of data transmission provided by some embodiments of the present invention, which can be applied to a data transmission unit. The data transmission unit is deployed in a terminal device. The data transmission unit is a key component responsible for data exchange between the terminal device and the server, and is used to convert serial port data into IP data or convert IP data into serial port data, and transmit it through a communication network.

[0063] In some examples, the data transmission unit is mainly aimed at commercial and industrial scenarios, and can be integrated into the control panels of terminal devices such as outdoor units, heat pump hosts, hot water equipment, and electrical control cabinets.

[0064] In some specific occasions, the data transmission unit can also be used as an external communication module, connected to the main control MCU (Microcontroller Unit) through a serial port (such as RS485, CAN) to achieve data interaction and remote communication with the device.

[0065] Specifically, the following steps may be included:

[0066] Step 201: In response to the terminal device accessing, identifying the target communication protocol used by the terminal device.

[0067] When a device is connected to the data transmission unit for the first time, the data transmission unit can automatically detect and identify the communication protocol used by the device, ensuring that the data transmission unit can accurately understand and process communication data from different devices, thereby improving the compatibility of the data transmission unit.

[0068] In some examples, the target communication protocol may be Modbus (Modbus protocol), MQTT (Message Queuing Telemetry Transport, message queue telemetry transmission protocol), or HTTP (Hypertext Transfer Protocol, hypertext transfer protocol).

[0069] In some embodiments of the present invention, in response to the terminal device accessing, identifying the target communication protocol used by the terminal device includes:

[0070] In response to the terminal device accessing, key features of the communication data sent by the terminal device are determined; the key features are compared with candidate features of a preset protocol feature library; and based on the comparison results, a target communication protocol used by the terminal device is determined.

[0071] The protocol feature library stores the correspondence between multiple communication protocols and candidate features.

[0072] In actual applications, the data transmission unit can monitor the data stream sent by the device and extract key features from the data frame, such as the start character, data length, check bit, frame structure, etc.

[0073] After determining the key features, a feature matching algorithm can be used to compare the data frame features with the protocol feature library of the threshold, thereby automatically identifying the communication protocol used by the device.

[0074] In some examples, the feature matching algorithm can be a feature matching algorithm based on hash comparison, which calculates the hash value of the data frame feature and the candidate feature in the protocol feature library, and compares whether the hash values ​​are consistent. If they are consistent, the target communication protocol used by the terminal device is determined.

[0075] To further improve the accuracy and efficiency of protocol identification, embodiments of the present invention can also employ machine learning models for protocol identification. Specifically, a large number of data samples from different communication protocols can be collected, features from these data samples can be extracted, and a machine learning model can be constructed for training. After training, when the data transmission unit receives communication data from a terminal device, the features of the communication data can be extracted and input into the trained machine learning model for prediction, resulting in the target communication protocol used by the terminal device.

[0076] After identifying the protocol type, the data transmission unit can load the corresponding protocol parsing rules and establish a mapping relationship between the device and the protocol. In some examples, the protocol parsing rules are a set of data structures and parsing logic definitions for different protocols loaded by the data transmission unit after identifying the protocol, including the following:

[0077] 1. Frame structure definition: start character, frame length, frame type, address field, function code, data field, checksum and other field positions and lengths;

[0078] 2. Field extraction rules: the business meaning of each byte (such as temperature, humidity, pressure, etc.);

[0079] 3. Data verification and decoding algorithms: such as CRC16, XOR check, BCD to decimal conversion, two’s complement restoration, etc.

[0080] 4. Data classification and label mapping: such as which fields are real-time data, alarm information, control feedback, etc.

[0081] 5. Parsing script or binary library: can be hot-loaded through remote updates and supports user-defined protocol parsing logic.

[0082] Step 202: upon receiving the communication data sent by the terminal device, calling the protocol parsing engine corresponding to the target communication protocol, parsing the communication data, and obtaining parsing result data.

[0083] In actual applications, a terminal device can send communication data to the data transmission unit. The data transmission unit then invokes the corresponding protocol parsing engine to parse the communication data based on the identified target communication protocol. The protocol parsing engine parses the communication data byte by byte according to predefined parsing rules, such as frame structure definitions, field extraction rules, and data verification and decoding algorithms. It extracts useful service data and generates parsed result data. For example, this parsed result data may include sensor readings such as temperature, humidity, and pressure, or device status information and alarm information.

[0084] In some embodiments of the present invention, the present invention further includes:

[0085] Requesting the latest protocol parsing rules from the server, and using the latest protocol parsing rules to update the data transmission unit; wherein the protocol parsing rules are used by the protocol parsing engine when parsing the communication data.

[0086] To improve the maintainability of the data transmission unit, an embodiment of the present invention incorporates a remote dynamic update mechanism that periodically requests the latest protocol parsing rules from the cloud protocol library. Upon receiving an update, the data transmission unit automatically loads the new parsing rules, enabling remote updates without manual intervention. This reduces operational costs and maintains the system's long-term adaptability, ensuring the data transmission unit can promptly adapt to new communication protocols or protocol changes, thereby increasing the system's flexibility and scalability.

[0087] In some examples, the server can use an incremental update method to push only newly added or modified protocol rules, reducing bandwidth consumption and speeding up updates. In some examples, the data transmission unit can perform version verification during the update process to ensure the compatibility and correctness of the new parsing rules, avoid problems that may be introduced during the update process, and further improve the stability and reliability of the system.

[0088] In some examples, a user interface may be provided, through which a user may remotely adjust parameters of the data transmission unit (such as data upload frequency, transmission mode, etc.), thereby improving the flexibility of the system.

[0089] In some embodiments of the present invention, before transmitting the parsing result data to the server, the method further includes: performing standardization processing on the parsing result data.

[0090] In actual applications, the data transmission unit calls the corresponding protocol parsing engine to parse the data according to the identified protocol type, and the parsed data may contain fields in multiple formats.

[0091] To ensure data consistency, data standardization can be performed, which mainly includes field mapping (converting data fields of different devices into unified standard fields), unit conversion (automatically identifying data units and performing conversions), and time synchronization (standardizing device data timestamps to ensure that data from all devices can be stored and analyzed in a unified time format).

[0092] In some examples, the parsing result data is standardized, including:

[0093] Standardize the fields where the data in the parsing result data is located; and / or standardize the units used for the data in the parsing result data; and / or standardize the time format in the parsing result data.

[0094] For example, for temperature data, Celsius (°C) can be converted to Fahrenheit (°F) or Kelvin (K), and vice versa, to meet the needs of different application scenarios. For time format, timestamps can be uniformly converted to UTC (Coordinated Universal Time) or local time to ensure data time consistency. Through data standardization, data from different devices can be integrated into a unified data platform, facilitating subsequent data analysis and mining.

[0095] Step 203: Transmit the analysis result data to a server.

[0096] After obtaining the parsing result data, the data transmission unit transmits the parsing result data to the server via the communication network. The server, acting as a data processing and storage center, can receive data from various terminal devices and perform further analysis and processing. In some examples, the server can send the processed parsing result data to another terminal device, enabling interoperability between devices.

[0097] In some embodiments of the present invention, the present invention further includes:

[0098] During the process of transmitting the analysis result data to the server, the data transmission strategy is adjusted according to the current network status and / or data update frequency.

[0099] During the data transmission process, the data transmission unit may optimize the data transmission strategy according to the current network status, or the data update frequency, or the current network status and the data update frequency.

[0100] In some embodiments of the present invention, adjusting the data transmission strategy according to the current network status and / or data update frequency includes:

[0101] When the data update frequency is less than or equal to the preset frequency, determining the data fields that have changed in the analysis result data, and transmitting the changed data fields to the cloud server;

[0102] When the data update frequency is greater than the preset frequency, the analysis result data is transmitted to the server.

[0103] In practice, you can set a differential encoding transmission strategy. This is essentially an optimization method based on data update frequency. This determines whether it's necessary to upload the entire data or only partially modified fields. Specifically, you can compare the current data with the previous one and upload only the modified fields, or upload the entire data.

[0104] For example, when a device experiences minimal data changes over a short period of time (low data update frequency), differential mode can be proactively enabled to upload only the changed fields. In scenarios with high-frequency changes (such as when the temperature or pressure of a monitored device fluctuates dramatically), full-frame or compressed upload can be automatically switched to ensure data integrity and real-time performance. This mechanism improves bandwidth utilization and data processing efficiency.

[0105] In some embodiments of the present invention, adjusting the data transmission strategy according to the current network status and / or data update frequency includes:

[0106] When the network signal strength is less than the preset strength or the network bandwidth is less than the preset bandwidth in the current network condition, multiple data packets of the analysis result data are merged and transmitted to the server in batches.

[0107] In actual applications, a batch transmission strategy can be set. When the network signal is poor or the bandwidth is limited, multiple data packets can be merged and sent again to reduce communication overhead.

[0108] Specifically, the data transmission unit splits the parsing result data to be transmitted into multiple packets. Based on network conditions, these packets are then combined into a larger packet for simultaneous transmission to the server. This approach reduces transmission failures and data retransmissions caused by poor network conditions, improving data transmission stability and efficiency. Furthermore, the batch transmission strategy can reduce network communication overhead and conserve network resources.

[0109] In some embodiments of the present invention, the present invention further includes:

[0110] When the analysis result data transmission fails, the current retransmission number is determined; according to the current retransmission number, the current retransmission interval is determined; and according to the current retransmission interval, the analysis result data is retransmitted.

[0111] In practice, you can set an exponential backoff policy. This is a mechanism that automatically adjusts the retransmission strategy when a transmission failure occurs during data transmission. When the data transmission unit encounters a failure while attempting to transmit the parsed result data to the server, it can record the current number of retransmissions and then calculate an appropriate retransmission interval based on this number of retransmissions. This interval typically increases exponentially with the number of retransmissions, meaning that the waiting time increases with each retransmission failure.

[0112] This design avoids excessive retransmission requests that would further increase the network burden in the event of network congestion or instability, while also giving the network a certain amount of recovery time. This not only improves the reliability of data transmission, but also optimizes the utilization of network resources, ensuring the efficiency and stability of the data transmission process.

[0113] For lost data packets, an exponential backoff strategy can be used for retransmission. Specifically, this mechanism gradually extends the retransmission interval after each retransmission failure, thereby reducing network congestion and data conflicts while ensuring that important data is eventually delivered successfully.

[0114] For example, when the data transmission unit sends a device power data packet to the cloud server, if the upload fails due to signal fluctuations, the system will temporarily cache the packet locally. Thereafter, the system will retry every 5 seconds. If unsuccessful, the next retry will increase the interval to 10 seconds, 20 seconds, 40 seconds, and so on (exponentially increasing). If the retransmission is successful, the system will clear the local cache. If multiple attempts fail, the system will log the anomaly and report an error status, waiting for manual intervention or network recovery before retransmitting again. This mechanism prevents network congestion caused by frequent retransmissions.

[0115] In some examples, a data compression strategy may also be set to use a lightweight lossless compression algorithm (such as LZ77 or Huffman coding) to compress data packets and improve transmission efficiency.

[0116] In some examples, you can also set a breakpoint resume policy. If data transmission fails, you can automatically record the data that was not successfully uploaded and retransmit it after the network is restored to ensure data integrity.

[0117] In an embodiment of the present invention, the data transmission unit identifies the target communication protocol used by the terminal device in response to the access of the terminal device. When receiving the communication data sent by the terminal device, the protocol parsing engine corresponding to the target communication protocol is called to parse the communication data to obtain parsing result data, and the parsing result data is transmitted to the server. This enables the data transmission unit to automatically identify the communication protocol used by the terminal device and automatically parse the data, without the need for manual configuration and development for specific protocols, reducing maintenance costs and expansion difficulties, and improving compatibility.

[0118] Reference Figure 3 , shows a step flow chart of another data transmission method provided by some embodiments of the present invention, applied to a data transmission unit, and the data transmission unit is deployed in a terminal device.

[0119] Specifically, the following steps may be included:

[0120] Step 301: In response to the terminal device accessing, determine key features of the communication data sent by the terminal device.

[0121] In actual applications, the data transmission unit can monitor the data stream sent by the device and extract key features from the data frame, such as the start character, data length, check bit, frame structure, etc.

[0122] Step 302: Compare the key feature with candidate features in a preset protocol feature library; wherein the protocol feature library stores a correspondence between multiple communication protocols and candidate features.

[0123] Step 303: Determine the target communication protocol used by the terminal device based on the comparison result.

[0124] After determining the key features, a feature matching algorithm can be used to compare the data frame features with the protocol feature library of the threshold, thereby automatically identifying the communication protocol used by the device.

[0125] In some examples, the feature matching algorithm can be a feature matching algorithm based on hash comparison, which calculates the hash value of the data frame feature and the candidate feature in the protocol feature library, and compares whether the hash values ​​are consistent. If they are consistent, the target communication protocol used by the terminal device is determined.

[0126] To further improve the accuracy and efficiency of protocol identification, embodiments of the present invention can also employ machine learning models for protocol identification. Specifically, a large number of data samples from different communication protocols can be collected, features from these data samples can be extracted, and a machine learning model can be constructed for training. After training, when the data transmission unit receives communication data from a terminal device, the features of the communication data can be extracted and input into the trained machine learning model for prediction, resulting in the target communication protocol used by the terminal device.

[0127] After identifying the protocol type, the data transmission unit can load the corresponding protocol parsing rules and establish a mapping relationship between the device and the protocol. In some examples, the protocol parsing rules are a set of data structures and parsing logic definitions for different protocols loaded by the data transmission unit after identifying the protocol, including the following:

[0128] 1. Frame structure definition: start character, frame length, frame type, address field, function code, data field, checksum and other field positions and lengths;

[0129] 2. Field extraction rules: the business meaning of each byte (such as temperature, humidity, pressure, etc.);

[0130] 3. Data verification and decoding algorithms: such as CRC16, XOR check, BCD to decimal conversion, two’s complement restoration, etc.

[0131] 4. Data classification and label mapping: such as which fields are real-time data, alarm information, control feedback, etc.

[0132] 5. Parsing script or binary library: can be hot-loaded through remote updates and supports user-defined protocol parsing logic.

[0133] Step 304: upon receiving the communication data sent by the terminal device, calling the protocol parsing engine corresponding to the target communication protocol, parsing the communication data, and obtaining parsing result data.

[0134] In actual applications, a terminal device can send communication data to the data transmission unit. The data transmission unit then invokes the corresponding protocol parsing engine to parse the communication data based on the identified target communication protocol. The protocol parsing engine parses the communication data byte by byte according to predefined parsing rules, such as frame structure definitions, field extraction rules, and data verification and decoding algorithms. It extracts useful service data and generates parsed result data. For example, this parsed result data may include sensor readings such as temperature, humidity, and pressure, or device status information and alarm information.

[0135] Step 305: Transmit the analysis result data to the server.

[0136] After obtaining the parsing result data, the data transmission unit transmits the parsing result data to the server via the communication network. The server, acting as a data processing and storage center, can receive data from various terminal devices and perform further analysis and processing. In some examples, the server can send the processed parsing result data to another terminal device, enabling interoperability between devices.

[0137] Reference Figure 4 , shows a step flow chart of another data transmission method provided by some embodiments of the present invention, applied to a data transmission unit, and the data transmission unit is deployed in a terminal device.

[0138] Specifically, the following steps may be included:

[0139] Step 401: In response to the terminal device accessing, identifying the target communication protocol used by the terminal device.

[0140] When a device is connected to the data transmission unit for the first time, the data transmission unit can automatically detect and identify the communication protocol used by the device, ensuring that the data transmission unit can accurately understand and process communication data from different devices, thereby improving the compatibility of the data transmission unit.

[0141] Step 402: upon receiving the communication data sent by the terminal device, calling the protocol parsing engine corresponding to the target communication protocol, parsing the communication data, and obtaining parsing result data.

[0142] In actual applications, a terminal device can send communication data to the data transmission unit. The data transmission unit then invokes the corresponding protocol parsing engine to parse the communication data based on the identified target communication protocol. The protocol parsing engine parses the communication data byte by byte according to predefined parsing rules, such as frame structure definitions, field extraction rules, and data verification and decoding algorithms. It extracts useful service data and generates parsed result data. For example, this parsed result data may include sensor readings such as temperature, humidity, and pressure, or device status information and alarm information.

[0143] Step 403: Standardize the parsing result data.

[0144] In actual applications, the data transmission unit calls the corresponding protocol parsing engine to parse the data according to the identified protocol type, and the parsed data may contain fields in multiple formats.

[0145] To ensure data consistency, data standardization can be performed, which mainly includes field mapping (converting data fields of different devices into unified standard fields), unit conversion (automatically identifying data units and performing conversions), and time synchronization (standardizing device data timestamps to ensure that data from all devices can be stored and analyzed in a unified time format).

[0146] In some examples, the parsing result data is standardized, including:

[0147] Standardize the fields where the data in the parsing result data is located; and / or standardize the units used for the data in the parsing result data; and / or standardize the time format in the parsing result data.

[0148] For example, for temperature data, Celsius (°C) can be converted to Fahrenheit (°F) or Kelvin (K), and vice versa, to meet the needs of different application scenarios. For time format, timestamps can be uniformly converted to UTC (Coordinated Universal Time) or local time to ensure data time consistency. Through data standardization, data from different devices can be integrated into a unified data platform, facilitating subsequent data analysis and mining.

[0149] Step 404: Transmit the standardized parsing result data to the server.

[0150] After obtaining the parsing result data, the data transmission unit transmits the parsing result data to the server via the communication network. The server, acting as a data processing and storage center, can receive data from various terminal devices and perform further analysis and processing. In some examples, the server can send the processed parsing result data to another terminal device, enabling interoperability between devices.

[0151] Reference Figure 5 , shows a step flow chart of another data transmission method provided by some embodiments of the present invention, applied to a data transmission unit, and the data transmission unit is deployed in a terminal device.

[0152] Specifically, the following steps may be included:

[0153] Step 501: In response to the terminal device accessing, identifying the target communication protocol used by the terminal device.

[0154] When a device is connected to the data transmission unit for the first time, the data transmission unit can automatically detect and identify the communication protocol used by the device, ensuring that the data transmission unit can accurately understand and process communication data from different devices, thereby improving the compatibility of the data transmission unit.

[0155] Step 502: upon receiving the communication data sent by the terminal device, calling a protocol parsing engine corresponding to the target communication protocol to parse the communication data and obtain parsing result data;

[0156] In actual applications, a terminal device can send communication data to the data transmission unit. The data transmission unit then invokes the corresponding protocol parsing engine to parse the communication data based on the identified target communication protocol. The protocol parsing engine parses the communication data byte by byte according to predefined parsing rules, such as frame structure definitions, field extraction rules, and data verification and decoding algorithms. It extracts useful service data and generates parsed result data. For example, this parsed result data may include sensor readings such as temperature, humidity, and pressure, or device status information and alarm information.

[0157] Step 503: Transmit the analysis result data to the server, and in the process of transmitting the analysis result data to the server, adjust the data transmission strategy according to the current network status and / or data update frequency.

[0158] After obtaining the parsing result data, the data transmission unit transmits the parsing result data to the server via the communication network. The server, acting as a data processing and storage center, can receive data from various terminal devices and perform further analysis and processing. In some examples, the server can send the processed parsing result data to another terminal device, enabling interoperability between devices.

[0159] During the data transmission process, the data transmission unit may optimize the data transmission strategy according to the current network status, or the data update frequency, or the current network status and the data update frequency.

[0160] In some embodiments of the present invention, adjusting the data transmission strategy according to the current network status and / or data update frequency includes:

[0161] When the data update frequency is less than or equal to the preset frequency, determining the data fields that have changed in the analysis result data, and transmitting the changed data fields to the cloud server;

[0162] When the data update frequency is greater than the preset frequency, the analysis result data is transmitted to the server.

[0163] In practice, you can set a differential encoding transmission strategy. This is essentially an optimization method based on data update frequency. This determines whether it's necessary to upload the entire data or only partially modified fields. Specifically, you can compare the current data with the previous one and upload only the modified fields, or upload the entire data.

[0164] For example, when a device experiences minimal data changes over a short period of time (low data update frequency), differential mode can be proactively enabled to upload only the changed fields. In scenarios with high-frequency changes (such as when the temperature or pressure of a monitored device fluctuates dramatically), full-frame or compressed upload can be automatically switched to ensure data integrity and real-time performance. This mechanism improves bandwidth utilization and data processing efficiency.

[0165] In some embodiments of the present invention, adjusting the data transmission strategy according to the current network status and / or data update frequency includes:

[0166] When the network signal strength is less than the preset strength or the network bandwidth is less than the preset bandwidth in the current network condition, multiple data packets of the analysis result data are merged and transmitted to the server in batches.

[0167] In actual applications, a batch transmission strategy can be set. When the network signal is poor or the bandwidth is limited, multiple data packets can be merged and then sent to reduce communication overhead.

[0168] Specifically, the data transmission unit splits the parsing result data to be transmitted into multiple packets. Based on network conditions, these packets are then combined into a larger packet for simultaneous transmission to the server. This approach reduces transmission failures and data retransmissions caused by poor network conditions, improving data transmission stability and efficiency. Furthermore, the batch transmission strategy can reduce network communication overhead and conserve network resources.

[0169] In some embodiments of the present invention, the present invention further includes:

[0170] When the analysis result data transmission fails, the current retransmission number is determined; according to the current retransmission number, the current retransmission interval is determined; and according to the current retransmission interval, the analysis result data is retransmitted.

[0171] In practice, you can set an exponential backoff policy. This is a mechanism that automatically adjusts the retransmission strategy when a transmission failure occurs during data transmission. When the data transmission unit encounters a failure while attempting to transmit the parsed result data to the server, it can record the current number of retransmissions and then calculate an appropriate retransmission interval based on this number of retransmissions. This interval typically increases exponentially with the number of retransmissions, meaning that the waiting time increases with each retransmission failure.

[0172] This design avoids excessive retransmission requests that would further increase the network burden in the event of network congestion or instability, while also giving the network a certain amount of recovery time. This not only improves the reliability of data transmission, but also optimizes the utilization of network resources, ensuring the efficiency and stability of the data transmission process.

[0173] For lost data packets, an exponential backoff strategy can be used for retransmission. Specifically, this mechanism gradually extends the retransmission interval after each retransmission failure, thereby reducing network congestion and data conflicts while ensuring that important data is eventually delivered successfully.

[0174] For example, when the data transmission unit sends a device power data packet to the cloud server, if the upload fails due to signal fluctuations, the system will temporarily cache the packet locally. Thereafter, the system will retry every 5 seconds. If unsuccessful, the next retry will increase the interval to 10 seconds, 20 seconds, 40 seconds, and so on (exponentially increasing). If the retransmission is successful, the system will clear the local cache. If multiple attempts fail, the system will log the anomaly and report an error status, waiting for manual intervention or network recovery before retransmitting again. This mechanism prevents network congestion caused by frequent retransmissions.

[0175] In some examples, a data compression strategy may also be set to employ a lightweight lossless compression algorithm (such as LZ77 or Huffman coding) to compress data packets and improve transmission efficiency.

[0176] In some examples, you can also set a breakpoint resume policy. If data transmission fails, you can automatically record the data that was not successfully uploaded and retransmit it after the network is restored to ensure data integrity.

[0177] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0178] Reference Figure 6 , shows a structural schematic diagram of a data transmission device provided by some embodiments of the present invention, which is applied to a data transmission unit, and the data transmission unit is deployed in a terminal device.

[0179] Specifically, the following modules may be included:

[0180] a target communication protocol identification module 601, configured to identify a target communication protocol used by the terminal device in response to the terminal device accessing the terminal device;

[0181] The parsing result data obtaining module 602 is configured to, upon receiving communication data sent by the terminal device, call a protocol parsing engine corresponding to the target communication protocol to parse the communication data and obtain parsing result data;

[0182] The analysis result data transmission module 603 is used to transmit the analysis result data to the server.

[0183] In some embodiments of the present invention, the present invention further includes:

[0184] The data transmission strategy adjustment module is used to adjust the data transmission strategy according to the current network status and / or data update frequency during the process of transmitting the analysis result data to the server.

[0185] In some embodiments of the present invention, adjusting the data transmission strategy according to the current network status and / or data update frequency includes:

[0186] When the data update frequency is less than or equal to the preset frequency, determining the data fields that have changed in the analysis result data, and transmitting the changed data fields to the cloud server;

[0187] When the data update frequency is greater than the preset frequency, the analysis result data is transmitted to the server.

[0188] In some embodiments of the present invention, adjusting the data transmission strategy according to the current network status and / or data update frequency includes:

[0189] When the network signal strength is less than the preset strength or the network bandwidth is less than the preset bandwidth in the current network condition, multiple data packets of the analysis result data are merged and transmitted to the server in batches.

[0190] In some embodiments of the present invention, the present invention further includes:

[0191] A current retransmission number determination module, configured to determine the current retransmission number when the data transmission of the analysis result fails;

[0192] A current retransmission interval duration determination module, configured to determine the current retransmission interval duration based on the current number of retransmissions;

[0193] The data resending module is used to resend the analysis result data according to the current resending interval.

[0194] In some embodiments of the present invention, in response to the terminal device accessing, identifying the target communication protocol used by the terminal device includes:

[0195] In response to the terminal device accessing, determining key characteristics of communication data sent by the terminal device;

[0196] Comparing the key feature with candidate features in a preset protocol feature library; wherein the protocol feature library stores a correspondence between multiple communication protocols and candidate features;

[0197] According to the comparison result, the target communication protocol used by the terminal device is determined.

[0198] In some embodiments of the present invention, the present invention further includes:

[0199] The standardization processing module is used to perform standardization processing on the analysis result data.

[0200] In some embodiments of the present invention, the parsing result data is standardized, including: standardizing the fields where the data in the parsing result data is located; and / or standardizing the units used for the data in the parsing result data; and / or standardizing the time format in the parsing result data.

[0201] In some embodiments of the present invention, the present invention further includes:

[0202] The data transmission unit update module is used to request the latest protocol parsing rules from the server and use the latest protocol parsing rules to update the data transmission unit; wherein, the protocol parsing rules are used by the protocol parsing engine when parsing the communication data.

[0203] In an embodiment of the present invention, the data transmission unit identifies the target communication protocol used by the terminal device in response to the access of the terminal device. When receiving the communication data sent by the terminal device, the protocol parsing engine corresponding to the target communication protocol is called to parse the communication data to obtain parsing result data, and the parsing result data is transmitted to the server. This enables the data transmission unit to automatically identify the communication protocol used by the terminal device and automatically parse the data, without the need for manual configuration and development for specific protocols, reducing maintenance costs and expansion difficulties, and improving compatibility.

[0204] Some embodiments of the present invention further provide an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the above method when executed by the processor.

[0205] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.

[0206] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above method when executed by a processor.

[0207] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0208] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0209] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0210] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0211] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0212] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0213] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0214] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0215] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the above elements.

[0216] The above is a detailed introduction to the provided method, device, equipment, medium and product for data transmission. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A data transmission method, characterized in that: Applied to a data transmission unit, the data transmission unit being deployed in a terminal device, the method comprising: In response to the terminal device accessing, identifying a target communication protocol used by the terminal device; Upon receiving the communication data sent by the terminal device, calling the protocol parsing engine corresponding to the target communication protocol to parse the communication data and obtain parsing result data; The analysis result data is transmitted to the server.

2. The method according to claim 1, characterized in that Also includes: During the process of transmitting the analysis result data to the server, the data transmission strategy is adjusted according to the current network status and / or data update frequency.

3. The method according to claim 2, characterized in that Adjust the data transmission strategy based on the current network conditions and / or data update frequency, including: When the data update frequency is less than or equal to the preset frequency, determining the data fields that have changed in the analysis result data, and transmitting the changed data fields to the cloud server; When the data update frequency is greater than the preset frequency, the analysis result data is transmitted to the server.

4. The method according to claim 2, characterized in that Adjust the data transmission strategy based on the current network conditions and / or data update frequency, including: When the network signal strength is less than the preset strength or the network bandwidth is less than the preset bandwidth in the current network condition, multiple data packets of the analysis result data are merged and transmitted to the server in batches.

5. The method according to claim 1, wherein Also includes: When the data transmission of the analysis result fails, determining the current number of retransmissions; Determine the current retransmission interval duration based on the current number of retransmissions; The analysis result data is resent according to the current resending interval.

6. The method according to any one of claims 1 to 5, characterized in that In response to the terminal device accessing, identifying a target communication protocol used by the terminal device, including: In response to the terminal device accessing, determining key characteristics of communication data sent by the terminal device; Comparing the key feature with candidate features in a preset protocol feature library; wherein the protocol feature library stores a correspondence between multiple communication protocols and candidate features; According to the comparison result, the target communication protocol used by the terminal device is determined.

7. The method according to any one of claims 1 to 5, characterized in that Before transmitting the analysis result data to the server, the method further includes: performing standardization processing on the analysis result data.

8. The method according to claim 7, characterized in that Standardizing the parsing result data includes: standardizing the fields where the data in the parsing result data is located; and / or standardizing the units used for the data in the parsing result data; and / or standardizing the time format in the parsing result data.

9. The method according to any one of claims 1 to 5, characterized in that Also includes: Requesting the latest protocol parsing rules from the server, and using the latest protocol parsing rules to update the data transmission unit; wherein the protocol parsing rules are used by the protocol parsing engine when parsing the communication data.

10. A data transmission device, characterized in that: Applied to a data transmission unit, the data transmission unit being deployed in a terminal device, the apparatus comprising: a target communication protocol identification module, configured to identify a target communication protocol used by the terminal device in response to access by the terminal device; a parsing result data obtaining module, configured to, upon receiving communication data sent by the terminal device, call a protocol parsing engine corresponding to the target communication protocol, parse the communication data, and obtain parsing result data; The analysis result data transmission module is used to transmit the analysis result data to the server.

11. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 9 when executed by the processor.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 9.