Data uploading method and device, and DTU device

CN122994837APending Publication Date: 2026-10-27GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611346854.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0031]应用本申请的技术方案,上述数据上传方法中,获取当前周期中采集的当前数据,将该当前数据与基准数据进行比对,以依据各数据类型的变化判定策略,筛选出需要上传的增量数据;将增量数据进行处理,得到包含数据变化信息的待上传数据;将待上传数据上传至云端服务器,实现了在DTU端建立本地基准数据缓存,针对模拟量、开关量及累计脉冲量分别采用差异化的变化判定策略,仅当数据发生变化时才进行轻量化编码并上传,解决了相关技术中DTU设备因高频采集产生大量冗余数据,导致嵌入式平台算力资源浪费的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122994837A_ABST
    Figure CN122994837A_ABST
Patent Text Reader

Abstract

The application discloses a data uploading method and device, and a DTU device. The method comprises the following steps: comparing current data collected currently with reference data to filter out incremental data which needs to be uploaded according to a change judgment strategy of each data type, wherein the reference data is data used as a reference in a current period, and the reference data comprises at least one of the following: analog data, switching data and cumulative pulse data; processing the incremental data to obtain to-be-uploaded data containing data change information; and uploading the to-be-uploaded data to a cloud server. The application solves the technical problem that a DTU device in the related art produces a large amount of redundant data due to high-frequency collection, thereby causing waste of computing resource of an embedded platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and more specifically, to a data uploading method and apparatus, and a DTU device. Background Technology

[0002] Terminal devices (data transmission units), as key hubs between the IoT sensing and network layers, are widely used in scenarios such as industrial IoT, environmental monitoring, power data collection, and vehicle-mounted data acquisition. They are primarily responsible for connecting field sensors and serial port devices, and transmitting raw data such as temperature, humidity, voltage, and current to the cloud platform via wireless networks such as 4G / 5G / NB. Currently, the industry generally adopts a raw data full-volume transmission mode, where various analog, switch, and cumulative data are uploaded directly and completely without any preprocessing. This mode is particularly prominent in applications requiring periodic, high-frequency data acquisition.

[0003] However, in high-frequency acquisition scenarios, the environmental data often exhibits high stability and minimal differences between adjacent data periods, leading to a large amount of repetitive and redundant data in traditional pass-through modes. This not only results in a severe waste of wireless communication traffic resources and an increase in long-term operating costs, but also exacerbates network transmission latency due to the large data packet size, easily causing packet loss or congestion in weak network environments. Furthermore, traditional general-purpose compression algorithms (such as ZIP and GZIP) are computationally complex and memory-intensive, making them difficult to run efficiently on resource-constrained embedded MCUs, resulting in significant data parsing and storage pressure on cloud servers as well.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a data uploading method and apparatus, and a DTU device, to at least solve the technical problem in the related art where DTU devices generate a large amount of redundant data due to high-frequency acquisition, resulting in a waste of computing resources on embedded platforms.

[0006] According to one aspect of the present invention, a data uploading method is provided, comprising: comparing currently collected data with reference data, and filtering incremental data to be uploaded based on a change determination strategy for each data type, wherein the reference data is data used as a reference in the current period, and the reference data includes at least one of the following: analog quantity data, switch quantity data, and cumulative pulse quantity data; processing the incremental data to obtain data to be uploaded containing data change information; and uploading the data to be uploaded to the cloud server.

[0007] Optionally, the currently collected data is compared with the baseline data, and incremental data that needs to be uploaded is selected based on the change determination strategy for each data type. This includes: determining the data type of the current data; determining the target change determination strategy based on the data type; and filtering the current data according to the target change determination strategy to obtain the incremental data.

[0008] Optionally, determining a target change determination strategy based on the data type includes: when the data type is determined to be analog data, determining the target change determination strategy as follows: calculating the absolute value of the difference between the current data and the reference data in the local cache, and calculating the relative change percentage, wherein the relative change percentage is the ratio of the absolute value of the difference to the reference data; if the absolute value is greater than a preset absolute deviation threshold and the relative change percentage is greater than a preset relative deviation threshold, determining that the data has changed, wherein the relative change percentage is the ratio of the absolute value of the difference to the reference data.

[0009] Optionally, determining a target change determination strategy based on the data type includes: when the data type is determined to be switch data, determining the target change determination strategy as follows: if the digital signal state corresponding to the current data is determined to have flipped relative to the reference digital signal state corresponding to the reference data, the data is determined to have changed.

[0010] Optionally, a corresponding change determination strategy is executed according to the data type to obtain the incremental data, including: when the data type is determined to be cumulative pulse quantity data, the target change determination strategy is determined to be: calculating the incremental net difference between the current data and the reference data in the local cache; if the absolute value of the incremental net difference is greater than a preset minimum measurement step size threshold, it is determined that the data has changed.

[0011] Optionally, the incremental data is processed to obtain data to be uploaded containing data change information, including: compressing the incremental data using lightweight fixed-point encoding to obtain encoded compressed data; concatenating the encoded compressed data and transmission control information according to a predetermined protocol format to obtain concatenated data; and encapsulating the concatenated data to obtain the data to be uploaded.

[0012] Optionally, after uploading the data to be uploaded to the cloud server, the data upload method further includes: extracting information from the data to be uploaded through the cloud server to obtain the incremental data; and fusing the baseline data in the cloud server with the incremental data to obtain the complete data for the current period.

[0013] Optionally, the data upload method further includes: updating the baseline data to the complete data on the cloud server; and storing the complete data in a local cache.

[0014] Optionally, after obtaining the incremental data, the data upload method further includes: if the amount of data change is greater than the physical maximum allowable mutation threshold, canceling the incremental data upload operation, and determining that all of the current data is the incremental data that needs to be uploaded.

[0015] Optionally, the data upload method further includes: if the amount of data change is less than or equal to the physical maximum allowable mutation threshold, performing the incremental data upload operation.

[0016] According to another aspect of the present invention, a data uploading device is also provided, comprising: a comparison unit, configured to compare currently collected data with reference data, and filter out incremental data to be uploaded based on a change determination strategy for each data type, wherein the reference data is data used as a reference in the current period, and the reference data includes at least one of the following: analog quantity data, switch quantity data, and cumulative pulse quantity data; a processing unit, configured to process the incremental data to obtain data to be uploaded containing data change information; and an uploading unit, configured to upload the data to be uploaded to the cloud server.

[0017] Optionally, the comparison unit includes: a first determining module, configured to determine the data type of the current data; a second determining module, configured to determine a target change judgment strategy based on the data type; and an execution module, configured to filter the current data according to the target change judgment strategy to obtain the incremental data.

[0018] Optionally, the second determining module includes: a first determining submodule, configured to determine the target change judgment strategy as follows when the data type is determined to be analog data: calculate the absolute value of the difference between the current data and the reference data, and calculate the relative change percentage; if the absolute value is greater than a preset absolute deviation threshold and the relative change percentage is greater than a preset relative deviation threshold, determine that the data has changed, wherein the relative change percentage is the ratio of the absolute value of the difference to the reference data.

[0019] Optionally, the second determining module includes: a second determining submodule, configured to determine the target change judgment strategy as follows when the data type is determined to be switch data: if the digital signal state corresponding to the current data is determined to have flipped relative to the reference digital signal state corresponding to the reference data, the data is determined to have changed.

[0020] Optionally, the second determining module includes: a second determining submodule, used to determine the target change judgment strategy as follows when the data type is determined to be cumulative pulse data: calculate the incremental net difference between the current data and the reference data, and if the absolute value of the incremental net difference is greater than a preset minimum measurement step size threshold, determine that the data has changed.

[0021] Optionally, the processing unit includes: a compression module for compressing the incremental data using lightweight fixed-point coding to obtain coded compressed data; a splicing module for splicing the coded compressed data and transmission control information according to a predetermined protocol format to obtain spliced ​​data; and an encapsulation module for encapsulating the spliced ​​data to obtain the data to be uploaded.

[0022] Optionally, the data uploading device further includes: an extraction unit, configured to extract information from the data to be uploaded through the cloud server after uploading the data to be uploaded to the cloud server, to obtain the incremental data; and a calculation unit, configured to fuse the baseline data and the incremental data in the cloud server to obtain the complete data of the current period.

[0023] Optionally, the data uploading device further includes: an update unit for updating the baseline data to the complete data on the cloud server; and a storage unit for storing the complete data in a local cache.

[0024] Optionally, the data uploading device further includes: the processing unit, which, after obtaining incremental data, cancels the incremental data uploading operation if the amount of data change is greater than the maximum allowable mutation threshold, and determines that all of the current data is the incremental data that needs to be uploaded.

[0025] Optionally, the data uploading device further includes: the processing unit, which is further configured to perform the incremental data uploading operation if the amount of data change is less than or equal to the physical maximum allowable mutation threshold.

[0026] According to one aspect of the present invention, a data uploading system is provided, wherein the data uploading system uses the data uploading method described in any one of the above embodiments.

[0027] According to one aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the data upload method described in any one of the above embodiments.

[0028] According to one aspect of the present invention, a processor is provided for running a program, wherein the program executes the data upload method described in any one of the above embodiments.

[0029] According to one aspect of the present invention, a computer program product is provided, including computer instructions that, when executed by a processor, perform the data upload method described in any one of the above embodiments.

[0030] According to one aspect of the present invention, a DTU device is provided, wherein the DTU device uses the data upload method described in any one of the above embodiments.

[0031] By applying the technical solution of this application, the above data upload method involves obtaining the current data collected in the current cycle, comparing the current data with the reference data, and filtering out the incremental data to be uploaded based on the change judgment strategy of each data type. The incremental data is then processed to obtain the data to be uploaded containing data change information. The data to be uploaded is then uploaded to the cloud server. This achieves the establishment of a local reference data cache at the DTU end, and adopts differentiated change judgment strategies for analog quantities, switch quantities, and cumulative pulse quantities. Lightweight encoding is only performed and uploaded when the data changes, solving the technical problem in related technologies where DTU devices generate a large amount of redundant data due to high-frequency acquisition, leading to a waste of computing resources on the embedded platform. Attached Figure Description

[0032] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0033] Figure 1 This is a hardware structure block diagram of a mobile terminal according to an embodiment of the present invention, which describes a data uploading method.

[0034] Figure 2 This is a flowchart of a data upload method according to an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of the appearance of the vehicle-mounted terminal according to an embodiment of the present invention;

[0036] Figure 4 This is a flowchart of an optional data upload method according to an embodiment of the present invention;

[0037] Figure 5 This is a schematic diagram of a data uploading device according to an embodiment of the present invention.

[0038] The above figures include the following reference numerals:

[0039] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device; 301. 4G antenna interface; 302. GPS antenna interface; 303. 17597-2 interface; 304. Screw post; 305. LED indicator. Detailed Implementation

[0040] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0041] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0042] As described in the background section, in related technologies, when DTU devices adopt the raw data full-volume transparent transmission mode, a large amount of redundant data is generated due to high-frequency acquisition, resulting in excessive wireless traffic consumption, increased network transmission latency, and wasted computing resources of the embedded platform. The embodiments of this invention provide a data uploading method and apparatus, a data uploading system, a computer-readable storage medium, a processor, a computer program product, and a DTU device.

[0043] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0044] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a data upload method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0045] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data upload method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0046] Example 1

[0047] According to an embodiment of the present invention, a method embodiment for data uploading is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0048] Figure 2 This is a flowchart of a data upload method according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:

[0049] Step S202: Compare the currently collected data with the baseline data to filter out the incremental data that needs to be uploaded based on the change judgment strategy of each data type. The baseline data is the data used as a reference in the current cycle, and the baseline data includes at least one of the following: analog data, switch data, and cumulative pulse data.

[0050] In this embodiment, the reference data may include at least one of the following: analog data, digital data, and cumulative pulse data; it should be noted that the reference data may also be set to other types of data according to actual conditions. It should also be noted that before comparing the currently acquired data (i.e., the actual data acquired in the current period) with the reference data, the reference data from the previous period (i.e., the complete data reported in the previous period) will be retrieved from the local cache. This reference data can be used as a comparison benchmark for the current data in the current period.

[0051] For example, when the device powers on and collects data for the first time, the complete data from the first collection is recorded as Data1, stored in the local cache, and uploaded to the cloud server. During the second collection, the obtained data, Data2, is compared with Data1 in the local cache. If the difference between Data2 and the data in the local cache exceeds a threshold, the difference is calculated to obtain incremental data, which is then uploaded to the cloud. Simultaneously, Data2 is stored in the local cache as the comparison object for the third collection, Data3.

[0052] In this embodiment of the invention, after transmitting data (whether incremental or full), the DTU device immediately stores the currently collected value as a new baseline value in its local cache for use in the next cycle. This method of maintaining baseline data through local caching can significantly reduce wireless communication traffic, saving costs and power consumption. For example, if the data remains unchanged (change < minimum threshold), 0 bytes are sent; if the data changes only slightly, only the compressed increment (e.g., 1-2 bytes) is uploaded. It also reduces the load and storage costs of the cloud server, as the cloud does not need to store massive amounts of historical raw data, but only the current baseline value for each channel. Moreover, after receiving the data, the cloud server only needs to perform simple addition operations, resulting in extremely low CPU utilization, enabling support for a larger scale of device access.

[0053] In addition, after receiving incremental data in the previous cycle, the cloud server will overlay it with the current data (i.e., the data stored by the cloud server itself in the previous cycle) to obtain the complete data of the previous cycle, which will be used as the base data for the current cycle.

[0054] In other words, in this embodiment of the invention, the local cache stores the reference data as the data stored by the DTU device after it has finished sending data (i.e., the complete data collected in the current cycle); while the reference data maintained by the cloud server is calculated by the cloud server itself based on the incremental data uploaded by the DTU device in each cycle. For example, when the device powers on and collects data for the first time, the complete data collected in the first cycle is uploaded to the cloud server as Data1; after the second data collection, the incremental data of Data2 and Data1 is transmitted to the cloud server, and the cloud server can perform algebraic calculations on Data1 and the incremental data to obtain the complete data of the current cycle (i.e., the second data collection), which is the reference data stored in the cloud; for the third data collection cycle, after receiving the incremental data, the cloud server will perform algebraic calculations on the incremental data received in this cycle and the reference data calculated in the second data collection cycle to obtain the complete data of the current cycle, and so on to update and maintain the reference data of the cloud server.

[0055] That is, the embedded DTU master controller can collect the raw values ​​of analog data, switch data and cumulative pulse quantity according to a preset cycle through serial port, RS-485 interface, network card or CAN bus; a local buffer area is opened in the on-chip RAM of the embedded MCU. If the device is in the first power-on state, the currently collected complete data is used as the initial reference data and stored in the corresponding channel storage location in the local buffer area and marked as pending upload; if it is not the first run, the reference data of the previous cycle stored in the local buffer area is read as the comparison basis.

[0056] Analog data can be analog quantities that the terminal device periodically collects from field devices during the initialization phase via interfaces such as serial port, RS485, network card, or CAN bus, such as temperature, humidity, pressure, and voltage. Switching data refers to data representing actions such as switch on / off, valve opening / closing, relay activation / disengagement, and button press / release. Cumulative data refers to numerical data that continuously accumulates or decreases over time. For example, in embedded DTU applications, cumulative pulse data typically corresponds to the following types of physical signals: cumulative flow value: such as the total flow rate (cubic meters, liters, etc.) displayed by water meters, gas meters, and oil meters; cumulative electrical energy value: such as the total electricity consumption (kilowatt-hours / kWh) displayed by an electricity meter; and other cumulative pulse quantities: cumulative volume, cumulative number of times, etc., measured by a pulse sensor.

[0057] Furthermore, each data item in the complete dataset collected in the current cycle is categorized into three types based on its type: analog data, digital data, and cumulative pulse data. For analog data, the absolute difference and relative percentage deviation between the current value and the reference value are calculated. The analog data is considered to need to be uploaded only if both the absolute difference and the relative percentage deviation exceed the set lower limit of absolute deviation; otherwise, it is determined that it does not need to be uploaded. For digital data, a logical XOR operation is performed between the current value and the reference value. If the result is true (i.e., the level state has flipped), the digital data is considered to need to be uploaded; otherwise, it is determined that it does not need to be uploaded. For cumulative pulse data, the net increment between the current value and the reference value is calculated. The cumulative data is considered to need to be uploaded only if the net increment exceeds the set minimum metering step size or reporting threshold; otherwise, it is determined that it does not need to be uploaded. Finally, a filtered subset of data that needs to be uploaded is obtained (containing analog, digital, and cumulative data that meet the triggering conditions).

[0058] In this embodiment, the terminal device master controller periodically collects current data from multiple field devices through serial port, RS485, network card and CAN interface; a local cache area is established in the embedded MCU on-chip RAM to store the reference data corresponding to each data channel in the previous cycle.

[0059] It should be noted that, in this embodiment of the invention, when the device is powered on for the first time, the complete data collected initially is uploaded to the cloud server as initial reference data (the cloud server uses this as the basis for calculating its own maintained reference data) and stored in the local cache (used as a comparison reference for the current data in the next cycle). This initial reference data can be used as the comparison object for the next data acquisition cycle corresponding to the device's initial power-on phase. In subsequent data acquisition cycles, the comparison object is the reference data updated in the previous cycle, that is, the complete data of the previous cycle read from the local cache.

[0060] Figure 3 This is a schematic diagram of the appearance of the vehicle-mounted terminal according to an embodiment of the present invention, such as... Figure 3 As shown, the terminal housing has four corner screw posts 304 for mounting and fixing. The front of the housing has a 4G antenna interface 301, a GPS antenna interface 302, and a 17597-2 interface 303 arranged sequentially. A set of LED indicator lights 305 are configured on the upper surface of the housing, respectively displaying mobile communication antenna access, positioning antenna access, external line connection, and device operating status. This vehicle-mounted terminal, by integrating the 4G antenna interface 301, GPS antenna interface 302, and external line interface, provides the necessary hardware communication foundation and physical connection support for performing lightweight DTU data transmission based on data changes, ensuring that the device can stably collect and upload optimized data in actual vehicle scenarios.

[0061] In this method, during the initialization phase, the terminal device periodically collects raw data such as analog quantities (e.g., temperature, humidity, pressure, voltage), switch quantities (e.g., DI status), and cumulative quantities (e.g., flow rate, electrical energy) from the field device through interfaces such as serial port, RS485, network card, or CAN bus. The first complete data collected is used as the initial reference data and uploaded to the cloud server through the wireless communication module. At the same time, the complete data is stored in the local cache area within the embedded MCU to ensure that the local and cloud have completely consistent data states at the initial moment, providing a reliable comparison benchmark for subsequent differential incremental uploads.

[0062] By implementing this control method, the data handshake and benchmark alignment between the DTU device and the cloud server were completed, and the reference origin for subsequent periodic differential operations was established. This not only ensured the integrity of the first reported data to eliminate initial errors, but also provided hardware storage support for quickly judging data changes in subsequent periods by storing benchmark data in the local cache, thereby avoiding cloud parsing errors caused by missing or out-of-synchronization initial data.

[0063] In this embodiment, in each new acquisition cycle, the acquired data (which may be the data acquired at the current moment) is processed one by one with the historical reference data of the corresponding channel to determine which data from each channel needs to be uploaded.

[0064] In each new acquisition cycle, the main control chip compares the latest data read from the field device with the historical reference data pre-stored in the local RAM cache. Specific change judgment strategies are applied to analog quantities, digital quantities, and cumulative pulse quantities respectively (such as dual threshold joint judgment for analog quantities, state transition judgment for digital quantities, and incremental threshold judgment for cumulative quantities) to filter out data that has undergone valid changes and calculate the difference between it and the reference value or the state change indicator, thus obtaining the incremental data.

[0065] By implementing this control method, data filtering and preprocessing at the edge are achieved using the limited computing power of embedded devices. Incremental information that needs to be uploaded is only generated when the data change exceeds the set physical or logical threshold. This significantly reduces redundant data caused by sensor noise jitter or minor environmental changes at the source, significantly reduces the load on subsequent data encapsulation and wireless transmission, and ensures that only truly meaningful state changes are triggered for reporting.

[0066] Step S204: Process the incremental data to obtain the data to be uploaded, which contains information about data changes.

[0067] In this embodiment, incremental data specifically refers to analog, switch, or cumulative data that has been confirmed to have undergone valid changes after being filtered by the aforementioned change determination strategy; formatting processing refers to performing lightweight edge computing processing on the filtered incremental data, specifically including using fixed-point encoding technology to convert decimals into integers to save storage bandwidth, and combining frame sequence number, checksum, and other protocol fields for simplified encapsulation, thereby forming a structured data packet that conforms to the communication protocol standard; data to be uploaded refers to the final transmission payload that has been significantly reduced in size and has integrity verification capability after the above encoding and encapsulation processing, and its content only contains the data that has changed within this cycle and its corresponding difference information.

[0068] In this method, the terminal device first performs fixed-point encoding compression on the incremental data to be uploaded, that is, fixes the decimal point at a specific position and converts it into integer form for storage to reduce storage space occupation. Then, it combines information such as frame sequence number and check code to perform structured encapsulation of simplified data packets, and finally generates data to be uploaded that conforms to the communication protocol specifications.

[0069] By implementing this control method, the size of data packets is further compressed, and the number of bytes in the wireless transmission process is reduced, thereby effectively saving communication traffic and reducing network transmission latency. At the same time, the addition of the checksum ensures the integrity and reliability of data during transmission, enabling efficient and accurate data uploading even in weak network or high packet loss environments.

[0070] Step S206: Upload the data to be uploaded to the cloud server.

[0071] In this embodiment, the terminal device (embedded DTU) uploads the encapsulated data packet to the cloud server. The encapsulated data packet specifically refers to the structured communication payload formed in the previous step after incremental data lightweight fixed-point encoding and strict combination of frame sequence number and check code for simplified encapsulation. Its content only contains the data that has been determined to have changed and its corresponding difference or status information, rather than the original full data.

[0072] This method utilizes the wireless communication module of the DTU device to establish a network channel with the cloud server, and uses the simplified data packets, which have been preprocessed, encoded, compressed, and encapsulated at the edge, as the payload, and sends them to the designated data access point or API interface in the cloud through the standard IoT communication protocol.

[0073] By implementing this control method, the transmit power and online time of the wireless module can be significantly reduced, thereby extending the battery life of the DTU device or reducing power consumption. At the same time, it reduces the risk of network congestion and improves the transmission success rate in scenarios with weak signals or limited bandwidth.

[0074] That is, in this embodiment of the invention, after each data upload (whether it is complete data or differential data), the DTU device immediately writes the currently collected complete raw data to the reference address in the local RAM cache. This means that regardless of whether a data upload occurs, the local reference data can always reflect the most recently collected true physical state. For the cloud server, after parsing the received data packet, the cloud server performs the following operations: if the received data is complete raw data (such as when it is first powered on or when overflow protection is triggered), the cloud server directly uses this data to overwrite the corresponding historical reference field; if the received data is differential data (incremental data), the cloud server reads the historical reference field value corresponding to the data, adds the difference to the historical reference value to obtain the current complete data, and overwrites and updates the historical reference field with this calculation result.

[0075] For example, if temperature data is collected, at time T1: 25.0℃ is collected, and the data is uploaded as 25.0 (complete data, as this is the first time); the local cache is updated to 25.0. At time T2: 25.1℃ is collected; comparison: 25.1 - 25.0 = 0.1, assuming the threshold is 0.5, 0.1 < 0.5, so no upload; the local cache is updated to 25.1. At time T3: 26.0℃ is collected, comparison: subtract the local cache baseline value 25.1 from the current value 26.0, calculate the difference: 26.0 - 25.1 = 0.9; judgment: 0.9 > 0.5, upload the difference 0.9; the local cache is updated to 26.0 (complete original data).

[0076] It should be noted that regardless of whether data upload is triggered in the current cycle (i.e., whether the uploaded data is differential or complete data), the embedded DTU master controller must perform a baseline update operation: writing the complete raw data value acquired in the current acquisition cycle to the baseline address in the local RAM cache. This operation ensures that when determining changes in the next acquisition cycle, the comparison object is always the most recently acquired complete value of the actual physical quantity, thereby avoiding accumulated errors and ensuring that the change relative to the latest state can be correctly calculated after a silent cycle.

[0077] As described above, in this embodiment, the current data of the current period is obtained, and the current data is compared with the reference data to obtain incremental data; the incremental data is processed to obtain data to be uploaded containing data change information; the data to be uploaded is uploaded to the cloud server. This achieves the goal of establishing a local reference data cache at the DTU end, adopting differentiated change judgment strategies for analog quantities, switch quantities, and cumulative quantities, and performing lightweight encoding and uploading only when the data changes. This achieves the technical effect of significantly reducing wireless traffic consumption and network transmission latency while ensuring data integrity.

[0078] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art of DTU devices generating a large amount of redundant data due to high-frequency acquisition, resulting in a waste of computing resources of embedded platforms.

[0079] According to the above embodiments of the present invention, the currently collected data is compared with the baseline data, and the incremental data that needs to be uploaded is selected based on the change determination strategy of each data type. This includes: determining the data type of the current data; determining the target change determination strategy based on the data type; and filtering the current data according to the target change determination strategy to obtain the incremental data.

[0080] In practical applications of embedded DTUs, data types are typically predefined by the hardware interface type or software configuration table. For hardware interfaces: Analog channels: These are usually connected to voltage / current signals (e.g., 4-20mA, 0-5V, 0-10V); the DTU's ADC (Analog-to-Digital Converter) module or analog acquisition module converts these physical signals into digital values, and the system defaults these channels to analog type; Digital input channels: These are usually connected to digital input (DI) ports, such as GPIO pins, relay contacts, etc., and the system defaults these channels to digital type; Cumulative input channels: These are usually connected to pulse counters or high-frequency pulse input pins, and the system defaults these channels to cumulative input type.

[0081] Specifically, the MCU reads the raw value of a channel, then queries the pre-configured table based on the channel's ID to obtain the data type label (analog / switching / cumulative) and the corresponding parameter configuration (such as the absolute threshold for analog quantities, XOR logic for switching quantities, and minimum metering step size for cumulative quantities). Based on the found type label, the MCU calls the corresponding judgment rule function: if it is an analog quantity → perform absolute difference + relative percentage judgment; if it is a switching quantity → perform XOR operation judgment; if it is a cumulative quantity → perform incremental net difference judgment.

[0082] In this embodiment, specific change determination strategies are defined for the three types of data accessed by the terminal device: analog quantities (including temperature, humidity, pressure, and voltage), switch quantities (DI status), and cumulative pulse quantities (flow rate and electrical energy).

[0083] In this method, the terminal device first identifies the type of the currently acquired data (analog, digital, or cumulative), and then calls the corresponding preset strategy: for analog data, it calculates the absolute difference and relative percentage between the current value and the reference value, and determines a change only when both exceed the set threshold; for digital data, it detects the flip or jump of the level state; for cumulative data, it calculates the net increment of the cumulative value, and determines a change only when it exceeds the minimum metering step size, thereby generating structured incremental data.

[0084] By implementing this control method, invalid data generated by sensor noise jitter, minor environmental fluctuations, and pulse interference are effectively filtered out, avoiding false alarms or missed alarms caused by a single threshold. This ensures that only data changes with actual business significance are converted into incremental data, thereby minimizing redundant transmission while ensuring data authenticity.

[0085] According to the above embodiments of the present invention, the target change determination strategy is determined based on the data type, including: when the data type is determined to be analog data, the target change determination strategy is determined as follows: calculate the absolute value of the difference between the current data and the reference data, and calculate the relative change percentage. If the absolute value is greater than a preset absolute deviation threshold and the relative change percentage is greater than a preset relative deviation threshold, the data is determined to have changed, wherein the relative change percentage is the ratio of the absolute value of the difference to the reference data.

[0086] In this embodiment, the analog quantity adopts a dual threshold judgment strategy of absolute difference and relative percentage (i.e., target change judgment strategy). Data upload is triggered only when the absolute value of the difference between the current sampled value and the previous reported value exceeds the set absolute deviation threshold and the relative change percentage exceeds the set relative deviation threshold.

[0087] In this method, when the data type is identified as analog, the embedded MCU first calculates the absolute value of the difference between the current sampled value and the historical benchmark value in the local cache, and then divides the absolute value of the difference by the benchmark value to calculate the relative change percentage. Only when both of these indicators exceed the preset absolute deviation threshold and relative deviation threshold at the same time, it is determined that the data has undergone substantial change, and then incremental data is extracted from the current data to trigger the upload.

[0088] By implementing this control method, the slight noise jitter of the sensor when the value is small and the meaningless fluctuation when the value is large are effectively shielded. False alarms in the low range or missed alarms in the high range caused by a fixed single threshold are avoided. Thus, while ensuring the real-time performance and integrity of the data, the uploading of invalid data is significantly reduced, and the utilization efficiency of communication resources is optimized.

[0089] According to the above embodiments of the present invention, the target change determination strategy is determined based on the data type, including: when the data type is determined to be switch data, the target change determination strategy is determined to be: if the digital signal state corresponding to the current data is determined to have flipped relative to the reference digital signal state corresponding to the reference data, the data is determined to have changed.

[0090] In this embodiment, the switch quantity adopts a state transition determination rule, and data upload is only triggered when the DI input state undergoes a level flip or state change.

[0091] In this method, when the data type is identified as a switch quantity (such as DI state), the terminal device performs a logical comparison between the currently acquired digital signal level state and the reference digital signal state stored in the local buffer. Only when the current state is detected to have flipped relative to the reference state (i.e., a change in rising or falling edge, such as from 0 to 1 or from 1 to 0) is it determined that the data has undergone a substantial change, thereby triggering the incremental data upload logic and extracting the incremental data representing the state change from the current data.

[0092] By implementing this control method, the problem of continuous reporting of redundant data by switch quantities in a stable state is completely eliminated, ensuring that communication traffic is only generated when the device state actually changes. This greatly reduces the congestion of the wireless network and the transmission frequency of data packets, while ensuring the real-time nature and accuracy of state changes.

[0093] According to the above embodiments of the present invention, the target change determination strategy is determined based on the data type, including: when the data type is determined to be cumulative pulse quantity data, the target change determination strategy is determined to be: calculate the incremental net difference between the current data and the reference data; if the absolute value of the incremental net difference is greater than the preset minimum measurement step size threshold, it is determined that the data has changed.

[0094] In this embodiment, the cumulative amount uses an incremental threshold determination rule. Data upload is triggered only when the increment between the current cumulative value and the previously reported value exceeds a set incremental threshold. The minimum measurement step size refers to a user-configurable threshold; data is uploaded once the user-defined threshold is reached.

[0095] In this method, when the data type is identified as cumulative pulse quantity (such as the cumulative pulse value of flow rate, power energy, etc.), the terminal device calculates the difference between the currently collected cumulative value and the baseline cumulative value in the local buffer, and takes the absolute value of the difference as the incremental net difference value. Then, the incremental net difference value is compared with the preset minimum metering step size threshold. Only when the absolute value of the incremental net difference value exceeds the threshold is it determined that the cumulative quantity has undergone a valid cumulative change, thereby triggering the incremental data upload and extracting the data representing the valid increment from the current data.

[0096] By implementing this control method, false count changes caused by sensor zero-point drift, pulse signal jitter, or electromagnetic interference are effectively shielded, avoiding frequent reporting caused by small or invalid increments. This ensures that only cumulative changes with actual physical significance are transmitted, thereby significantly reducing communication traffic and network load while ensuring measurement accuracy.

[0097] According to the above embodiments of the present invention, the incremental data is formatted to obtain data to be uploaded containing data change information, including: compressing the incremental data using a lightweight fixed-point encoding method to obtain encoded compressed data; concatenating the encoded compressed data and transmission control information according to a predetermined protocol format to obtain concatenated data; and encapsulating the concatenated data to obtain data to be uploaded.

[0098] In this embodiment, the data to be uploaded is compressed using lightweight fixed-point encoding, and simplified data packets are encapsulated by combining frame sequence number and check code. Fixed-point encoding refers to an encoding method that fixes the decimal point at a specific position and stores and calculates it in integer form, aiming to reduce storage space usage for general compression.

[0099] In this method, the terminal device first performs lightweight fixed-point encoding on the selected incremental data, that is, maps floating-point numbers or high-precision decimals to integers with fixed decimal point positions, thereby eliminating floating-point operation overhead and reducing the number of bytes occupied by the data, resulting in encoded compressed data; for example, data formatting and fixed-point encoding are performed first, that is, before putting the data into the packet queue, it is converted into a standard fixed-point integer format; then, variable-length encoding or bit packing is performed: for variable-length encoding: if the value is very small (e.g., a switch state change, the value is 1 or 0), only 1 bit or 1 byte needs to be transmitted, if the value is large (e.g., a cumulative increment of 50000), it may only require 2 or 3 bytes; for bit packing: if a frame contains multiple status bits (e.g., multiple switch states), they can be compressed into one byte; finally, frame encapsulation is performed, that is, the compressed data is combined with the packet header and checksum to form the final data packet.

[0100] Subsequently, the system logically concatenates the encoded compressed data with transmission control information such as frame sequence number and check code according to the predefined IoT communication protocol format, and finally performs complete data frame encapsulation to generate data to be uploaded that conforms to network transmission standards.

[0101] By implementing this control method, the size of the data itself is significantly reduced through fixed-point coding. Combined with the simplified splicing of the protocol header, the overall data packet size is further compressed. This not only saves wireless communication traffic and storage space, but also ensures the integrity and order of data transmission through checksums and frame sequence numbers, enabling more efficient and reliable data uploading in bandwidth-limited or weak network environments.

[0102] According to the above embodiments of the present invention, after uploading the data to be uploaded to the cloud server, the data uploading method further includes: extracting information from the data to be uploaded through the cloud server to obtain incremental data; and fusing the baseline data and the incremental data in the cloud server to obtain the complete data for the current period.

[0103] In this embodiment, the cloud server receives the data packet to be uploaded, parses the incremental information, and reverse-engineers the complete data of the current period based on the baseline data stored in the cloud.

[0104] In this method, after receiving the data packet to be uploaded from the edge side, the cloud server parses out the incremental data field and queries the latest reference data corresponding to the DTU device stored in the cloud database. The cloud reference data and the received incremental data are then algebraically added (or the corresponding state restoration operation is performed according to the data type) to reverse calculate the complete original acquisition data of the current period.

[0105] By implementing this control method, seamless connection and integrity restoration of cloud data are achieved. The latest status consistent with the field can be obtained in the cloud without retransmitting the full data. This not only reduces the cloud storage's dependence on historical full data, but also ensures that the business system can conduct subsequent analysis and decision-making based on accurate and continuous current data, while maintaining the consistency of data status between the edge side and the cloud.

[0106] According to the above embodiments of the present invention, the data upload method further includes: updating the baseline data of the cloud server to the complete data of the current period; and storing the complete data of the current period in the local cache.

[0107] In this embodiment, after the data upload is completed, the reference data cached locally on the terminal device is updated synchronously with the reference data stored in the cloud, and the current data collected in the current period is updated to the reference value for the differential operation in the next period.

[0108] In this method, after the cloud server completes the parsing and storage of the complete data collected in the current period, it marks the complete data as the new cloud benchmark data and updates the storage. At the same time, after confirming that the data upload is successful, the embedded DTU device also writes the complete data collected this time into the local RAM cache, replacing the original historical benchmark data, thereby completing the refresh of the local benchmark value.

[0109] By implementing this control method, it is ensured that the reference system at the edge and the cloud side remains strictly consistent, providing the correct reference value for the differential operation of the next data cycle. This avoids calculation errors or data gaps caused by asynchronous references, thereby ensuring the accuracy of data change detection and the integrity of cloud data restoration in long-term continuous operation scenarios.

[0110] According to the above embodiments of the present invention, after obtaining incremental data, the data upload method further includes: if the data change is greater than the physical maximum allowable mutation threshold, canceling the incremental data upload operation and determining that all current data is incremental data that needs to be uploaded. If the data change is less than or equal to the physical maximum allowable mutation threshold, performing the incremental data upload operation.

[0111] The data change refers to the difference between the currently collected data value and the historical baseline data value cached locally. The specific calculation method depends on the data type (analog, digital, or cumulative). It is a component of incremental data. When differential upload (i.e., uploading incremental / difference) mode is adopted, the data change itself is the incremental data that needs to be encoded and compressed for transmission. Furthermore, the data change is also used to determine whether to use incremental upload or full upload.

[0112] In addition, the maximum allowable mutation threshold is a fixed value or range that is pre-set during the system configuration phase based on the characteristics of the physical device and common sense of the business scenario.

[0113] In this embodiment, a difference overflow protection mechanism is set up. When the absolute value of a single difference exceeds the preset overflow range, the difference transmission is abandoned, and the complete data is directly uploaded and the reference is updated. The preset overflow range is the maximum allowable change value set according to the physical meaning of the sensor or the collected data, rather than being calculated based on the binary bit width. For example, the temperature change does not exceed 5°C, the voltage change does not exceed 2V, the pressure change does not exceed 10kPa, and the current change does not exceed 0.5A. As long as the absolute value of the difference between the current data and the reference value of the previous period exceeds the maximum allowable change value of the service, it is determined to be a difference overflow.

[0114] In this method, after calculating the incremental data, the terminal device compares its absolute value with a preset maximum allowable physical change threshold. This threshold is set according to the sensor type and physical characteristics (e.g., the temperature cannot change by more than 5°C within 1 second, and the voltage cannot change by more than 2V). If the incremental data exceeds the threshold, it is determined to be an abnormal jump or a state reset after communication interruption. At this time, differential upload is abandoned, and complete data is uploaded to restore state synchronization. If the incremental data is within a reasonable range, the normal incremental upload process is executed.

[0115] By implementing this control method, differential overflow errors caused by sensor failure, communication packet loss and retransmission, or data overflow are effectively prevented, ensuring that the data received by the cloud always conforms to physical laws, avoiding erroneous data from polluting the database, and ensuring the accuracy and eventual consistency of the data link through the full reporting mechanism in case of anomalies.

[0116] Figure 4 This is a flowchart of an optional data upload method according to an embodiment of the present invention, such as... Figure 4As shown, after the process starts, data change conditions are first set, and the DTU collects data from the lower-level machine. If it is the first collection, all collected data is cached and uploaded to the platform completely. If it is not the first collection, the previous historical data is read and compared to determine whether the current data has changed. If the data has not changed, the data is directly cached and uploaded completely. If the data has changed, all collected data is cached, and only the changed data is packaged and uploaded to the platform. Finally, the platform completes the data parsing and storage, and the process ends. This process achieves a smooth transition from initial full synchronization to normal incremental upload by differentiating between the first collection and subsequent changes, minimizing redundant transmission while ensuring data integrity.

[0117] As can be seen from the above, the technical solution provided by the above embodiments of the present invention uses data change as the sole core for uploading, integrates multi-parameter adaptive dynamic thresholds and embedded lightweight edge judgment; defines exclusive change judgment strategies for three different types of data: analog, switch, and cumulative; and triggers uploading only when the data change exceeds a specific threshold. Combined with the cloud-based mechanism for reverse restoration of complete data based on historical benchmark data, invalid transmission is reduced from the source, achieving accurate uploading of non-stationary data with low traffic, low power consumption, and high reliability.

[0118] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0120] Example 2

[0121] According to embodiments of the present invention, a data uploading apparatus for implementing the above-described data uploading method is also provided. Figure 5 This is a schematic diagram of a data uploading device according to an embodiment of the present invention, such as... Figure 5As shown, the device includes a comparison unit 501, a processing unit 503, and an uploading unit 505. The device will now be described in detail.

[0122] The comparison unit 501 is used to compare the currently collected data with the reference data, and to filter out the incremental data that needs to be uploaded based on the change judgment strategy of each data type. The reference data is the data used as a reference in the current cycle, and the reference data includes at least one of the following: analog data, switch data, and cumulative pulse data.

[0123] The processing unit 503 is used to process the incremental data to obtain the data to be uploaded, which contains data change information.

[0124] Upload unit 505 is used to upload the data to be uploaded to the cloud server.

[0125] It should be noted that the comparison unit 501, processing unit 503 and uploading unit 505 mentioned above correspond to steps S202 to S206 in the above embodiments. The three units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.

[0126] As can be seen from the above, in the scheme described in the above embodiments of the present invention, the comparison unit can be used to compare the currently collected data with the reference data, and the incremental data that needs to be uploaded can be selected according to the change judgment strategy of each data type. The reference data is the data used as a reference in the current period, and the reference data includes at least one of the following: analog quantity data, switch quantity data, and cumulative pulse quantity data; the processing unit is used to format the incremental data to obtain the data to be uploaded containing data change information; and the uploading unit is used to upload the data to be uploaded to the cloud server. Through the above technical solution, the goal of establishing a local reference data cache at the DTU end and adopting differentiated change judgment strategies for analog quantities, switch quantities, and cumulative quantities is achieved. Lightweight encoding and uploading are only performed when the data changes, thus achieving the technical effect of significantly reducing wireless traffic consumption and network transmission latency while ensuring data integrity.

[0127] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art of DTU devices generating a large amount of redundant data due to high-frequency acquisition, resulting in a waste of computing resources of embedded platforms.

[0128] Optionally, the comparison unit includes: a first determining module for determining the data type of the current data; a second determining module for determining the target change judgment strategy based on the data type; and an execution module for filtering the current data according to the target change judgment strategy to obtain incremental data.

[0129] Optionally, the second determining module includes: a first determining submodule, used to determine the target change judgment strategy when the data type is determined to be analog data: calculate the absolute value of the difference between the current data and the benchmark data, and calculate the relative change percentage. If the absolute value is greater than a preset absolute deviation threshold and the relative change percentage is greater than a preset relative deviation threshold, the data is determined to have changed, wherein the relative change percentage is the ratio of the absolute value of the difference to the benchmark data.

[0130] Optionally, the second determining module includes: a second determining submodule, used to determine the target change judgment strategy when the data type is determined to be switch data: if the state of the digital signal corresponding to the current data is determined to be flipped relative to the state of the reference digital signal corresponding to the reference data, the data is determined to have changed.

[0131] Optionally, the second determining module includes: a second determining submodule, used to determine the target change judgment strategy when the data type is determined to be cumulative pulse quantity data: calculate the incremental net difference between the current data and the benchmark data, and if the absolute value of the incremental net difference is greater than the preset minimum measurement step size threshold, determine that the data has changed.

[0132] Optionally, the processing unit includes: a compression module for compressing incremental data using lightweight fixed-point coding to obtain encoded compressed data; a splicing module for splicing the encoded compressed data and transmission control information according to a predetermined protocol format to obtain spliced ​​data; and an encapsulation module for encapsulating the spliced ​​data to obtain data to be uploaded.

[0133] Optionally, the data uploading device further includes: an extraction unit, used to extract information from the data to be uploaded through the cloud server after the data to be uploaded is uploaded to the cloud server, to obtain incremental data; and a calculation unit, used to fuse the baseline data and incremental data in the cloud server to obtain the complete data for the current period.

[0134] Optionally, the data uploading device further includes a processing unit, which, after obtaining incremental data, cancels the incremental data uploading operation if the amount of data change exceeds the physical maximum allowable mutation threshold, and determines that all current data is incremental data that needs to be uploaded.

[0135] Optionally, the data uploading device further includes a processing unit, which is also used to perform incremental data uploading operations if the amount of data change is less than or equal to the physical maximum allowable mutation threshold.

[0136] According to one aspect of the present invention, a data uploading system is provided, wherein the data uploading system uses any of the data uploading methods described above.

[0137] According to one aspect of the present invention, a DTU device is provided, wherein the DTU device uses the data upload method described in any one of the above embodiments.

[0138] According to one aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes any of the above-described data upload methods.

[0139] According to one aspect of the present invention, a processor is provided for running a program, wherein the program executes any of the above-described data upload methods during runtime.

[0140] According to one aspect of the present invention, a computer program product is provided, including computer instructions, which, when executed by a processor, perform any of the above-described data upload methods.

[0141] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any communication device in a group of communication devices.

[0142] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: comparing the currently collected data with the reference data to filter out the incremental data to be uploaded based on the change determination strategy of each data type, wherein the reference data is the data used as a reference in the current period, and the reference data includes at least one of the following: analog data, switch data, and cumulative pulse data; formatting the incremental data to obtain the data to be uploaded containing data change information; and uploading the data to be uploaded to the cloud server.

[0143] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the data type of the current data; determining a target change determination strategy based on the data type; and filtering the current data according to the target change determination strategy to obtain incremental data.

[0144] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: when the data type is determined to be analog data, the target change determination strategy is: calculate the absolute value of the difference between the current data and the reference data, and calculate the relative change percentage. If the absolute value is greater than a preset absolute deviation threshold and the relative change percentage is greater than a preset relative deviation threshold, the data is determined to have changed, wherein the relative change percentage is the ratio of the absolute value of the difference to the reference data.

[0145] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: when the data type is determined to be switch data, the target change determination strategy is: if it is determined that the digital signal state corresponding to the current data has flipped relative to the reference digital signal state corresponding to the reference data, the data is determined to have changed.

[0146] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: when the data type is determined to be cumulative pulse quantity data, the target change determination strategy is: calculate the incremental net difference between the current data and the reference data; if the absolute value of the incremental net difference is greater than the preset minimum measurement step size threshold, it is determined that the data has changed.

[0147] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: compressing incremental data using lightweight fixed-point coding to obtain encoded compressed data; concatenating the encoded compressed data and transmission control information according to a predetermined protocol format to obtain concatenated data; and encapsulating the concatenated data to obtain data to be uploaded.

[0148] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: extracting information from the data to be uploaded through a cloud server to obtain incremental data; and fusing the baseline data and incremental data in the cloud server to obtain the complete data for the current period.

[0149] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: updating the baseline data of the cloud server to the complete data of the current period; and storing the complete data of the current period in a local cache.

[0150] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: if the amount of data change is greater than the physical maximum allowable mutation threshold, cancel the incremental data upload operation and determine that all current data is incremental data that needs to be uploaded. If the amount of data change is less than or equal to the physical maximum allowable mutation threshold, perform the incremental data upload operation.

[0151] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0152] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0153] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0154] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0155] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0156] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part 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 the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0157] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A data uploading method, characterized in that, include: The currently collected data is compared with the baseline data. Based on the change judgment strategy of each data type, the incremental data that needs to be uploaded is selected. The baseline data is the data used as a reference in the current period. The baseline data includes at least one of the following: analog data, switch data, and cumulative pulse data. The incremental data is processed to obtain the data to be uploaded, which contains information about data changes; The data to be uploaded is uploaded to the cloud server.

2. The data uploading method according to claim 1, characterized in that, The currently collected data is compared with the baseline data. Based on the change judgment strategy for each data type, the incremental data that needs to be uploaded is selected, including: Determine the data type of the current data; Determine the target change judgment strategy based on the data type described; The current data is filtered according to the target change determination strategy to obtain the incremental data.

3. The data uploading method according to claim 2, characterized in that, Determine the target change judgment strategy based on the data type, including: When the data type is determined to be analog data, the target change determination strategy is as follows: calculate the absolute value of the difference between the current data and the benchmark data, and calculate the relative change percentage. If the absolute value is greater than a preset absolute deviation threshold and the relative change percentage is greater than a preset relative deviation threshold, the data is determined to have changed. The relative change percentage is the ratio of the absolute value of the difference to the benchmark data.

4. The data uploading method according to claim 2, characterized in that, Determine the target change judgment strategy based on the data type, including: When the data type is determined to be switch data, the target change determination strategy is as follows: if the digital signal state corresponding to the current data is determined to have flipped relative to the reference digital signal state corresponding to the reference data, the data is determined to have changed.

5. The data upload method according to claim 2, characterized in that, Determine the target change judgment strategy based on the data type, including: When the data type is determined to be cumulative pulse data, the target change determination strategy is as follows: calculate the incremental net difference between the current data and the benchmark data. If the absolute value of the incremental net difference is greater than the preset minimum measurement step size threshold, it is determined that the data has changed.

6. The data uploading method according to claim 1, characterized in that, The incremental data is processed to obtain data to be uploaded that contains data change information, including: The incremental data is compressed using a lightweight fixed-point coding method to obtain coded compressed data; The encoded compressed data and transmission control information are concatenated according to a predetermined protocol format to obtain concatenated data; The spliced ​​data is encapsulated to obtain the data to be uploaded.

7. The data uploading method according to claim 1, characterized in that, After uploading the data to be uploaded to the cloud server, the data upload method further includes: The incremental data is obtained by extracting information from the data to be uploaded through the cloud server; The baseline data and the incremental data in the cloud server are fused to obtain the complete data for the current period.

8. The data uploading method according to claim 7, characterized in that, The data upload method also includes: The cloud server updates the baseline data to the complete data. The complete data is stored in the local cache.

9. The data uploading method according to any one of claims 1 to 8, characterized in that, After obtaining the incremental data, the data upload method further includes: If the amount of data change exceeds the physical maximum allowable mutation threshold, cancel the incremental data upload operation and determine that all of the current data is the incremental data that needs to be uploaded.

10. The data uploading method according to claim 9, characterized in that, The data upload method also includes: If the amount of data change is less than or equal to the physical maximum allowable mutation threshold, the incremental data upload operation is performed.

11. A data uploading device, characterized in that, include: The comparison unit is used to compare the currently collected data with the reference data, and to filter out the incremental data that needs to be uploaded based on the change judgment strategy of each data type. The reference data is the data used as a reference in the current period, and the reference data includes at least one of the following: analog data, switch data, and cumulative pulse data. The processing unit is used to process the incremental data to obtain data to be uploaded containing data change information; The upload unit is used to upload the data to be uploaded to the cloud server.

12. A DTU device, characterized in that, The DTU device uses the data upload method described in any one of claims 1 to 10.