Modbus multi-device convergence forwarding method and system based on RK3588

By utilizing the RK3588 chip's dynamic register mapping and AI anomaly detection, the problem of unstable Modbus device communication was resolved, enabling dynamic management of device addresses and improving data quality reliability, thereby enhancing the system's real-time performance and reliability.

CN122268701APending Publication Date: 2026-06-23DEQING DUSUN ELECTRON
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610358918.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing PC-based Modbus data acquisition gateways are complex to configure and prone to errors when dealing with multi-device communication, resulting in unstable data acquisition, difficulty in adapting to dynamic changes in devices, and impact on system reliability and real-time performance.

Method used

The Modbus multi-device aggregation and forwarding method based on the RK3588 chip is adopted. By allocating continuous TCP slave register address space through the dynamic register mapping module, and combining the retransmission mechanism of the data forwarding and fault tolerance module with the AI ​​anomaly detection of the embedded neural network processor, dynamic management of device addresses and reliability improvement of data quality are achieved.

Benefits of technology

It improves data transmission efficiency and system operating efficiency, reduces the impact of communication failures on system performance, ensures data real-time performance and accuracy, adapts to hot-swapping of equipment and communication anomalies, and optimizes resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122268701A_ABST
    Figure CN122268701A_ABST
Patent Text Reader

Abstract

A Modbus multi-device convergence forwarding method and system based on RK3588, in the method, according to the device information, a continuous TCP slave register address space is allocated for each sub-device; a mapping table is generated and stored in the local storage; the data of each sub-device is collected; if a temporary cyclic redundancy check error is detected, a preset number of retransmissions are performed; if the retransmission fails, the corresponding sub-device is marked as a communication abnormal state, and the sub-device is skipped in the next polling cycle; the successfully transmitted data is written into the corresponding TCP slave register address space according to the mapping table and sent to the remote server; the mapping table is updated when the device hot plug is detected, and the remote server is synchronized through the heartbeat packet; based on the pre-trained time series data model, the successfully transmitted data is detected; when it is detected that the successfully transmitted data deviates from the prediction confidence interval, it is determined that the data is abnormal, and the abnormal data is marked and added to the heartbeat packet. The present application is used for improving the reliability of data acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of digital information transmission, and in particular relates to a Modbus multi-device aggregation and forwarding method and system based on RK3588. Background Technology

[0002] With the development of industrial automation, industrial sites often need to connect various types of industrial equipment, which typically communicate using the Modbus protocol. However, due to differences in communication parameters and protocol formats among different devices, directly acquiring and forwarding data can lead to problems such as communication instability and data loss, affecting the reliability and real-time performance of the entire system.

[0003] Currently, a common solution is to use a PC-based data acquisition gateway, which uses dedicated data acquisition software to acquire and forward data from multiple Modbus devices. This solution establishes communication mapping relationships between devices through software configuration and provides basic data caching functionality, thus mitigating the problem of unstable device communication to some extent.

[0004] However, due to the complex hardware architecture, this PC-based solution requires a lot of manual configuration for static mapping when there are a large number of devices. This not only involves a large workload but is also prone to configuration errors, reducing the reliability of data collection. Summary of the Invention

[0005] This application provides a Modbus multi-device aggregation and forwarding method and system based on RK3588 to improve the reliability of data acquisition.

[0006] In the first aspect, this application provides a Modbus multi-device aggregation and forwarding method based on RK3588, wherein the hardware base layer scans the sub-devices on the bus through the RS485 interface in the peripheral interface to obtain the device information of each sub-device;

[0007] Based on the device information, the dynamic register mapping module allocates a contiguous TCP slave register address space to each sub-device using a built-in preset algorithm;

[0008] The dynamic register mapping module generates a mapping table and stores it in the local memory of the RK3588 chip;

[0009] The data forwarding and fault tolerance module is based on a mapping table and collects data from each sub-device through the RS485 interface according to a preset polling cycle.

[0010] If the data forwarding and fault tolerance module detects a transmission error and the transmission error is a temporary cyclic redundancy check error, it will perform a preset number of retransmissions at a preset interval.

[0011] If retransmission fails, the data forwarding and fault tolerance module will mark the corresponding sub-device as having a communication abnormal state and skip the sub-device in the next polling cycle;

[0012] The data forwarding and fault tolerance module writes the successfully transmitted data into the corresponding TCP slave register address space according to the mapping table and sends it to the remote server;

[0013] The dynamic register mapping module updates the mapping table when it detects a device hot-plugging and synchronizes it to a remote server via a heartbeat packet.

[0014] The AI ​​anomaly detection module driven by the embedded neural network processor detects successfully transmitted data based on a pre-trained time-series data model deployed on the RK3588 chip embedded neural network processor.

[0015] When successfully transmitted data deviates from the predicted confidence interval, it is identified as abnormal data and marked as such, then added to the heartbeat packet.

[0016] By adopting the above technical solutions, the dynamic register mapping module allocates continuous TCP slave register address spaces based on device information and generates a mapping table, realizing dynamic management of device addresses. The data forwarding and fault tolerance module collects data according to a preset polling cycle and executes a retransmission mechanism when a temporary cyclic redundancy check error is detected, improving overall data transmission efficiency by skipping communication failure devices. The system synchronizes the mapping table updates caused by device hot-plugging to the remote server through a heartbeat mechanism, improving the real-time performance and accuracy of server-side data. The AI ​​anomaly detection module driven by the embedded neural network processor uses a pre-trained time-series data model to detect anomalies in transmitted data, marking abnormal data that deviates from the predicted confidence interval and reporting it via heartbeat packets, thus improving the reliability of data quality. This method, through the synergistic effect of dynamic mapping, fault tolerance mechanisms, and AI anomaly detection, improves data acquisition reliability while enhancing system operating efficiency and reducing the impact of communication failures on overall system performance.

[0017] In conjunction with some embodiments of the first aspect, in some embodiments, the dynamic register mapping module updates the mapping table when a device hot-plug is detected, specifically including:

[0018] The dynamic register mapping module acquires bus level signals and records the number of devices responding to broadcast commands, generating a bus status record.

[0019] When the number of responding devices changes based on the status records of two adjacent buses, the dynamic register mapping module determines that a device hot-plug has occurred.

[0020] The dynamic register mapping module sends a pause polling instruction to the data forwarding and fault tolerance module and stores the mapping table as a mapping backup.

[0021] The dynamic register mapping module controls the hardware base layer to perform device scanning through the RS485 interface to obtain the current device information of online sub-devices;

[0022] The dynamic register mapping module compares the device information in the mapping backup with the current device information to determine newly added devices and disconnected devices.

[0023] The dynamic register mapping module calculates the length of the register address space required for the new device;

[0024] When it is determined that there is an unallocated TCP slave register address space that matches the length of the register address space, the dynamic register mapping module allocates the unallocated TCP slave register address space to the newly added device, and obtains the allocation result;

[0025] When it is determined that there is no unallocated TCP slave register address space that matches the length of the register address space, the dynamic register mapping module allocates a continuous TCP slave register address space for each online sub-device according to a preset algorithm, and obtains the allocation result;

[0026] The dynamic register mapping module updates the mapping table based on the allocation results.

[0027] By employing the above technical solution, hot-plug events are monitored by acquiring bus level signals and recording the number of devices responding to broadcast commands. When a change in the number of devices is detected, polling is paused and a mapping backup is saved. After the system rescans online devices, it determines the device changes by comparing device information and updates the mapping table with an appropriate allocation strategy based on the space required by the newly added devices. This process protects data integrity through the pause polling and backup mechanisms, improves address space utilization efficiency through a flexible address allocation strategy, and enables the system to smoothly respond to changes in device configuration.

[0028] In conjunction with some embodiments of the first aspect, in some embodiments, the pre-trained time series data model includes several layers of self-attention mechanism and feedforward neural network. The self-attention mechanism layer is used to extract long and short-term time series features from the input data sequence, and the feedforward neural network layer is used for feature fusion and nonlinear transformation. The training dataset of the pre-trained time series data model consists of continuous time series data collected by each sub-device under normal operating conditions. After segmented sampling and normalization preprocessing, the continuous time series data is divided into training set and test set according to a preset ratio. The input of the pre-trained time series data model is a fixed-length historical data sequence. The pre-trained time series data model uses mean squared error and confidence interval coverage as training objectives. The model parameters are optimized through backpropagation algorithm. Training is completed after the prediction accuracy on the test set reaches a preset threshold. The AI ​​anomaly detection module driven by the embedded neural network processor inputs the successfully transmitted data into the pre-trained time series data model and outputs the detection result, which is either within the predicted confidence interval or deviating from the predicted confidence interval.

[0029] By employing the above technical solution, this pre-trained time-series data model uses a self-attention mechanism layer to extract time-series features, and a feedforward neural network layer for feature fusion and nonlinear transformation. It is trained based on continuous time-series data from normal operating conditions. The model takes a fixed-length historical data sequence as input, and uses mean squared error and confidence interval coverage as training objectives. Training is completed after the model reaches a preset accuracy on the test set. This structural design and training method enable the model to more accurately identify data anomalies and provide more reliable detection results.

[0030] In conjunction with some embodiments of the first aspect, in some embodiments, before the data forwarding and fault tolerance module collects data from each sub-device according to a preset polling period via the RS485 interface based on the mapping table, the method further includes:

[0031] The data forwarding and fault tolerance module sets the initial polling time point for each sub-device based on the device information of the sub-device. The initial polling time point is the remaining time before the next polling collection for the sub-device.

[0032] When the data forwarding and fault tolerance module detects a change in successfully transmitted data, it records the time difference between the current time and the initial polling time and updates the polling time of the corresponding sub-device.

[0033] The data forwarding and fault tolerance module calculates the dynamic collection period based on the time difference, and the dynamic collection period is the waiting time for the next polling collection.

[0034] The data forwarding and fault tolerance module updates the dynamic collection cycle to the preset polling cycle.

[0035] By adopting the above technical solution, a dynamic acquisition cycle is calculated and updated by setting an initial polling time point and recording the time difference when data changes. The acquisition frequency is dynamically adjusted according to actual data changes, avoiding resource waste or data lag issues that may occur with fixed-cycle acquisition. When data changes frequently, the system can promptly adjust the acquisition cycle to follow the rhythm of data changes, while appropriately extending the acquisition interval when the data is relatively stable. This adaptive acquisition mechanism based on data change characteristics optimizes system resource utilization efficiency, reduces unnecessary acquisition operations while ensuring data timeliness, and lowers system load while improving data real-time performance.

[0036] In conjunction with some embodiments of the first aspect, in some embodiments, the data forwarding and fault tolerance module calculates the dynamic acquisition period based on the time difference, specifically including:

[0037] The average time difference is obtained by averaging the time differences calculated by the data forwarding and fault tolerance modules.

[0038] The data forwarding and fault tolerance module compares the average time difference with a preset baseline period, which is the preset minimum polling interval.

[0039] When the average time difference is less than the preset baseline period, the data forwarding and fault tolerance module sets the preset baseline period to the dynamic acquisition period.

[0040] When the average time difference is not less than the preset baseline period, the data forwarding and fault tolerance module sets the average time difference to the dynamic acquisition period.

[0041] By adopting the above technical solution, the dynamic acquisition period is determined by calculating the average time difference and comparing it with a preset benchmark period. This allows the system to adaptively adjust the acquisition frequency while ensuring the minimum polling interval. When the average time difference is less than the preset benchmark period, the preset benchmark period is used as the dynamic acquisition period, reducing the waste of system resources caused by excessively high acquisition frequencies. When the average time difference is not less than the preset benchmark period, the average time difference is used as the dynamic acquisition period, ensuring that the acquisition frequency matches the actual data change pattern, reducing invalid acquisitions, lowering system resource consumption, and improving the real-time performance and completeness of data acquisition, thereby increasing system operating efficiency.

[0042] In conjunction with some embodiments of the first aspect, in some embodiments, after the data forwarding and fault tolerance module updates the dynamic collection period to the preset polling period, the method further includes:

[0043] The data forwarding and fault tolerance module records the number of data changes of the sub-device within a fixed sampling time.

[0044] The data forwarding and fault tolerance module calculates the ratio of the number of data changes to the fixed sampling time to obtain the data change frequency per unit time.

[0045] The data forwarding and fault tolerance module marks sub-devices whose data change frequency exceeds a preset frequency threshold as high-frequency change devices;

[0046] The data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of high-frequency changing devices based on preset attenuation parameters.

[0047] By employing the above technical solution, the frequency of data change per unit time is calculated by statistically analyzing the number of changes within a fixed sampling period. Devices exceeding a preset frequency threshold are marked as high-frequency changing devices, and their dynamic acquisition cycle is then adjusted based on a preset attenuation parameter. This differentiated processing mechanism can identify devices with frequent data changes and employ more targeted acquisition strategies for them. By dynamically adjusting the acquisition cycle of high-frequency changing devices, the timeliness of data acquisition is ensured while avoiding excessive concentration of acquisition resources on individual devices, achieving a balanced allocation of acquisition resources. This adaptive adjustment based on data change characteristics improves the efficiency of acquiring high-frequency changing data while reducing system resource consumption.

[0048] In conjunction with some embodiments of the first aspect, in some embodiments, the data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of the high-frequency changing device based on a preset attenuation parameter, specifically including:

[0049] The data forwarding and fault tolerance module records the moment of the most recent data change from the frequently changing device;

[0050] The data forwarding and fault tolerance module calculates the time interval between the current moment and the moment of the most recent data change;

[0051] The data forwarding and fault tolerance module divides the time interval by the preset base time to obtain the attenuation parameter;

[0052] The data forwarding and fault tolerance module multiplies the dynamic acquisition period by the attenuation parameter to obtain the dynamic acquisition period after adjustment for high-frequency changing devices.

[0053] By adopting the above technical solution, the system can automatically adjust the acquisition frequency according to the real-time nature of data changes. When data changes frequently, a higher acquisition frequency is maintained, while the acquisition frequency is appropriately reduced when data changes tend to stabilize. This gradual frequency adjustment method ensures the system's rapid response to data changes while avoiding drastic fluctuations in the acquisition frequency, making the system operation more stable and reliable.

[0054] Secondly, embodiments of this application provide a Modbus multi-device aggregation and forwarding system based on RK3588. The system includes: a memory and one or more processors; the memory is coupled to one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to cause the system to perform the method described in the first aspect and any possible implementation thereof.

[0055] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a system, cause the system to perform the method described in the first aspect and any possible implementation thereof.

[0056] Fourthly, embodiments of this application provide a computer program product that, when run on a system, causes the system to execute the method described in any possible implementation of the first aspect.

[0057] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0058] 1. This application provides a Modbus multi-device aggregation and forwarding method based on RK3588. The dynamic register mapping module allocates continuous TCP slave register address spaces based on device information and generates a mapping table, realizing dynamic management of device addresses. The data forwarding and fault tolerance module collects data according to a preset polling cycle and executes a retransmission mechanism when a temporary cyclic redundancy check error is detected, improving overall data transmission efficiency by skipping communication failure devices. The system uses a heartbeat mechanism to synchronize mapping table updates caused by device hot-plugging to the remote server, improving the real-time performance and accuracy of server-side data. An AI anomaly detection module driven by an embedded neural network processor uses a pre-trained time-series data model to detect anomalies in transmitted data, marking abnormal data that deviates from the predicted confidence interval and reporting it via heartbeat packets, improving data quality reliability. This method, through the synergistic effect of dynamic mapping, fault tolerance mechanisms, and AI anomaly detection, improves data acquisition reliability while enhancing system operating efficiency and reducing the impact of communication failures on overall system performance.

[0059] 2. This application provides a Modbus multi-device aggregation and forwarding method based on RK3588. By setting an initial polling time point and recording the time difference when data changes, a dynamic acquisition cycle is calculated to update the preset polling cycle. The acquisition frequency is dynamically adjusted according to actual data changes, avoiding resource waste or data lag issues that may occur with fixed-cycle acquisition. When data changes frequently, the system can promptly adjust the acquisition cycle to follow the rhythm of data changes, while appropriately extending the acquisition interval when the data is relatively stable. This adaptive acquisition mechanism based on data change characteristics optimizes system resource utilization efficiency, reduces unnecessary acquisition operations while ensuring data timeliness, and lowers system load while improving data real-time performance.

[0060] 3. This application provides a Modbus multi-device aggregation and forwarding method based on RK3588. It calculates the data change frequency per unit time by counting the number of data changes within a fixed sampling time period, and marks devices exceeding a preset frequency threshold as high-frequency changing devices. Then, it dynamically adjusts the acquisition cycle of these devices based on preset attenuation parameters. This differentiated processing mechanism can identify devices with frequent data changes and employ more targeted acquisition strategies. By dynamically adjusting the acquisition cycle of high-frequency changing devices, it ensures timely data acquisition while avoiding excessive concentration of acquisition resources on individual devices, achieving a balanced allocation of acquisition resources. This adaptive adjustment based on data change characteristics improves the acquisition efficiency of high-frequency changing data while reducing system resource consumption. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating a Modbus multi-device aggregation and forwarding method based on RK3588 in an embodiment of this application.

[0062] Figure 2 This is another flowchart illustrating a Modbus multi-device aggregation and forwarding method based on RK3588 in an embodiment of this application.

[0063] Figure 3 This is another flowchart illustrating a Modbus multi-device aggregation and forwarding method based on RK3588 in an embodiment of this application.

[0064] Figure 4 This is a schematic diagram of the physical device structure of a Modbus multi-device aggregation and forwarding system based on RK3588 provided in an embodiment of this application. Detailed Implementation

[0065] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0066] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0067] First, let's explain the terms used in this application:

[0068] Modbus is a communication protocol located at layer 7 (application layer) of the OSI model, mainly used for data transmission between electronic devices in industrial automation systems.

[0069] TCP stands for Transmission Control Protocol. It is one of the most fundamental and important communication protocols in the internet world.

[0070] In the current context of smart manufacturing, industrial sites are often equipped with a large number of sensors, actuators, controllers, and other devices. These devices communicate via the Modbus protocol, forming a complex Industrial Internet of Things (IIoT) system. Traditional Modbus gateway devices typically use fixed address mapping, requiring pre-configuration of each device's address information, making it difficult to adapt to dynamically changing device scenarios. Furthermore, traditional solutions lack effective fault tolerance mechanisms when facing communication failures; communication anomalies in a single device can easily impact the data acquisition efficiency of the entire system. In addition, existing solutions lack intelligent analysis capabilities for the collected data, making it difficult to detect equipment malfunctions in a timely manner.

[0071] This application primarily focuses on industrial environments requiring real-time monitoring of multiple Modbus devices, such as production line monitoring in smart factories, equipment data acquisition in energy management systems, and equipment status monitoring in building automation systems. In these scenarios, the number of devices is large and they may change frequently, placing high demands on the real-time performance and reliability of data acquisition. When implemented in the application scenarios of this application, related technologies struggle to perform real-time anomaly detection on the acquired data, reducing the reliability of data acquisition. Based on the aforementioned technical problems, this application proposes a Modbus multi-device aggregation and forwarding method based on RK3588. An embodiment is described below, combined with… Figure 1 This application describes a Modbus multi-device aggregation and forwarding method based on RK3588 in its embodiments:

[0072] Please see Figure 1 This is a flowchart illustrating a Modbus multi-device aggregation and forwarding method based on RK3588 in an embodiment of this application.

[0073] S101, the hardware base layer scans the sub-devices on the bus through the RS485 interface in the peripheral interface to obtain the device information of each sub-device;

[0074] The hardware foundation layer is a low-level hardware platform built on the RK3588 chip. The RK3588 is a high-performance processor that integrates a quad-core Cortex-A76 and quad-core Cortex-A55 CPU architecture, as well as a high-performance embedded neural network processor unit. The RS485 interface is a commonly used industrial communication interface that supports multi-point communication and long-distance transmission, making it suitable for industrial environments. The device scanning process is implemented by sending broadcast query commands to the bus. Each online sub-device returns its own device information upon receiving the query command. This device information includes, but is not limited to, device address, device type, number of registers, function code support, and communication parameters. Parameters such as the broadcast address, scan interval, and timeout during the scanning process can be configured according to actual application requirements and are not limited here.

[0075] The following technical solutions can be used to implement device scanning: The first solution is Modbus broadcast scanning. The hardware base layer sends a broadcast query command with address 0 to the bus via an RS485 interface. Devices supporting broadcast responses will return their own information after a random delay. The online device list is determined through multiple broadcasts and statistical responses. The second solution is address traversal scanning. The hardware base layer sends point-to-point query commands one by one according to a preset address range (e.g., 1-247). The presence of a device at that address is determined by whether a response is received. Although this method is more time-consuming, it is more reliable. The third solution is a hybrid scanning method. First, a broadcast method is used to quickly obtain the list of devices supporting broadcast responses. Then, an address traversal method is used to scan for devices that do not support broadcast responses, combining the advantages of both methods to improve scanning efficiency.

[0076] S102. Based on the device information, the dynamic register mapping module allocates a continuous TCP slave register address space to each sub-device using a built-in preset algorithm;

[0077] The dynamic register mapping module is one of the core components of the system, responsible for managing and maintaining the mapping relationship between device addresses and TCP register addresses. The preset algorithm refers to a pre-designed address allocation algorithm that considers factors such as the number of registers, data types, and access frequency of the devices. A contiguous TCP slave register address space refers to a continuous range of register addresses allocated to each RS485 slave device in the Modbus TCP protocol, allowing remote clients to access data from all slave devices through a unified address space. The allocation process needs to consider factors such as address space utilization, access efficiency, and scalability. The specific implementation, optimization objectives, and constraints of the preset algorithm can be adjusted according to application requirements and are not limited here.

[0078] Specific technical solutions for implementing dynamic address allocation include: The first solution uses the first-fit algorithm. The dynamic register mapping module maintains a linked list of free address space. When an address needs to be allocated to a new device, it searches from the head of the list to find the first free interval that meets the device's register requirement. This method is simple to implement and fast. The second solution uses the best-fit algorithm. The dynamic register mapping module selects the interval with the closest size among all free intervals that meet the requirements for allocation. This method reduces address space fragmentation and improves space utilization. The third solution uses the buddy system algorithm. It divides the entire address space into address blocks of different sizes according to powers of 2. During allocation, it selects the smallest address block that meets the requirements. This method has high efficiency in both allocation and deallocation.

[0079] S103, The dynamic register mapping module generates a mapping table and stores it in the local memory of the RK3588 chip;

[0080] The mapping table is a data structure that records the correspondence between RS485 sub-device addresses and TCP register addresses. It includes fields such as device ID, device address, starting register address, number of registers, data type, and update timestamp. The RK3588 chip's local storage can be its built-in RAM, external DDR memory, or onboard Flash memory. The process of generating the mapping table includes data structure initialization, field filling, index creation, verification, and calculation. Factors such as data persistence, access speed, and storage capacity need to be considered during storage. The specific format, storage location, and backup strategy of the mapping table can be configured according to system requirements and are not limited here.

[0081] Technical solutions for generating and storing mapping tables include: The first solution uses a hash table structure to store the mapping relationship, with the device address as the key and the TCP register address information as the value. A hash function is used to achieve O(1) time complexity for lookup operations, suitable for scenarios with frequent queries. The second solution uses a B+ tree structure to store the mapping relationship, organizing devices into a tree structure according to address size. This supports range queries and sequential traversal, suitable for scenarios requiring batch operations. For storage, a double buffering mechanism can be used, maintaining two copies of the mapping table in memory: one for the current operation and one for updates. Seamless updates are achieved through atomic switching operations.

[0082] S104. The data forwarding and fault tolerance module collects data from each sub-device according to a preset polling cycle via an RS485 interface based on a mapping table.

[0083] The data forwarding and fault tolerance module is the core module responsible for data acquisition and transmission, possessing functions such as data reading, protocol conversion, and error handling. The preset polling period refers to the time interval required for the system to traverse all sub-devices for one data acquisition cycle. This period needs to comprehensively consider factors such as data real-time requirements, device response time, and bus load. The data acquisition process includes steps such as constructing read commands, sending commands, receiving responses, data parsing, and format conversion. The polling order can be adjusted according to device address order, priority order, or adaptively; no limitation is made here.

[0084] Technical solutions for achieving periodic data acquisition include: The first solution uses a timer-driven polling mechanism. The data forwarding and fault-tolerance module sets a high-precision timer, triggering an interrupt at the beginning of each polling cycle. Read commands are sent sequentially according to the device order in the mapping table. This method offers high time accuracy and is suitable for scenarios with strict real-time requirements. The second solution uses an event-driven polling mechanism. The module listens for the idle state of the RS485 bus and immediately begins data acquisition from the next device when the bus is idle. This method fully utilizes bus bandwidth and improves acquisition efficiency. The third solution uses a multi-threaded concurrent acquisition mechanism, creating multiple acquisition threads, each responsible for acquiring data from a group of devices. A reasonable scheduling strategy avoids bus conflicts.

[0085] S105. If the data forwarding and fault tolerance module detects a transmission error and the transmission error is a temporary cyclic redundancy check error, it shall perform a preset number of retransmissions at a preset interval.

[0086] Cyclic Redundancy Check (CRBC) is a mechanism in the Modbus protocol used to detect data transmission errors. It determines whether an error occurred during transmission by calculating the checksum of the data frame. Temporary CRBC errors are usually caused by factors such as electromagnetic interference, instantaneous high bus load, and device response delays, and can be effectively recovered through retransmission. The preset interval refers to the time interval between two retransmissions, which needs to consider bus recovery time and avoid excessive bus resource consumption. The preset number of retransmissions refers to the maximum number of retransmissions; exceeding this number is considered a communication failure. The specific values ​​of the retransmission parameters can be adjusted according to the network environment and reliability requirements, and are not limited here.

[0087] Technical solutions for error detection and retransmission include: The first solution uses a fixed-interval retransmission strategy. When a cyclic redundancy check (CRC) error is detected, the module waits a fixed time interval (e.g., 100 milliseconds) before retransmitting the original command. This method is simple to implement and suitable for scenarios with relatively stable network environments. The second solution uses an exponential backoff retransmission strategy. The initial retransmission interval is short, and subsequent retransmission intervals increase exponentially (e.g., 100ms, 200ms, 400ms). This method strikes a balance between rapid recovery and avoiding network congestion. The third solution uses an adaptive retransmission strategy, dynamically adjusting the retransmission interval and number of retransmissions based on historical error rates and successful retransmission rates.

[0088] S106. If retransmission fails, the data forwarding and fault tolerance module will mark the corresponding sub-device as having a communication abnormal state and skip the sub-device in the next polling cycle.

[0089] A communication anomaly is a state in the device state machine that indicates the device is currently unable to communicate normally. The marking process includes updating the device status flag, recording the anomaly time, and counting the number of anomalies. The skip mechanism means temporarily suspending data collection from this device in subsequent polling cycles to avoid impacting overall collection efficiency due to timeouts. The device recovery detection strategy, the duration of the anomaly state, and the conditions for rejoining polling can be configured according to actual needs and are not limited here.

[0090] Technical solutions for implementing device anomaly marking and skipping include: The first solution uses a state machine to manage device communication states, defining multiple states such as normal, abnormal, and recovery. State transitions are performed based on communication results; data acquisition is skipped in the abnormal state, and the acquisition frequency is reduced for detection in the recovery state. The second solution uses a scoring mechanism to manage device reliability. Points are added for each successful communication and deducted for each failed communication. When the score falls below a threshold, the device is marked as abnormal and skipped. This method avoids misjudgments caused by occasional errors. The third solution uses a time window statistical method, calculating the communication success rate within a fixed time window. When the success rate falls below a threshold, the device is marked as abnormal.

[0091] S107. The data forwarding and fault tolerance module writes the successfully transmitted data into the corresponding TCP slave register address space according to the mapping table and sends it to the remote server.

[0092] The TCP slave register address space is a virtual register space simulated in the Modbus TCP protocol stack. Remote clients can access these registers using standard Modbus TCP commands. Data writing requires address translation, data format conversion, and byte order adjustment. Sending data to the remote server can be done using either an active push or a passive response mode. The atomicity and consistency guarantee mechanisms for data updates, as well as the choice of transmission protocol, can be determined based on application requirements and are not limited here.

[0093] Technical solutions for implementing data forwarding include: The first solution employs a double-mapped buffer mechanism, maintaining two data buffers: one for receiving data from RS485 devices and the other for TCP client access. Atomic operations are used to switch buffer pointers, ensuring data consistency. The second solution uses a publish-subscribe pattern, where the data forwarding module acts as the publisher, publishing updated data to a message queue, and the remote server acts as the subscriber, receiving data update notifications. This method supports multiple servers receiving data simultaneously. The third solution uses an incremental update mechanism, transmitting only changed register data to reduce network bandwidth consumption.

[0094] S108: The dynamic register mapping module updates the mapping table when it detects a hot plugging of a device and synchronizes it to the remote server via a heartbeat packet.

[0095] The Dynamic Register Mapping (DRM) module updates the mapping table upon detecting a device hot-plug. Specifically, the DRM module acquires bus level signals and records the number of responding devices to broadcast commands, generating a bus status record. When the number of responding devices changes based on two adjacent bus status records, the DRM module determines that a device hot-plug has occurred. The DRM module sends a pause polling command to the data forwarding and fault tolerance module and stores the mapping table as a backup. The DRM module controls the hardware infrastructure layer to perform a device scan via the RS485 interface to obtain the current device information of online sub-devices. The DRM module then compares the device information with the backup mapping information. Based on current device information, the system identifies newly added and disconnected devices. The dynamic register mapping module calculates the required register address space length for the new device. If an unallocated TCP slave register address space matching the length exists, the module allocates it to the new device. If no matching unallocated TCP slave register address space exists, the module allocates contiguous TCP slave register address space to each online sub-device according to a preset algorithm. The module updates the mapping table based on the allocation results and synchronizes this information to the remote server via heartbeat packets.

[0096] The process of updating the mapping table when a device hot-plug is detected by the dynamic register mapping module involves the coordinated work of multiple technical aspects. Bus level signal acquisition is implemented through the analog front-end circuitry of the hardware base layer, which includes a differential signal receiver, an analog-to-digital converter (ADC), and signal conditioning circuitry. The differential signal receiver converts the A and B differential signals on the RS485 bus into single-ended signals. The ADC samples the level signals at a sampling rate of at least 1MHz, and the signal conditioning circuitry performs filtering and amplification. The acquired level signals are processed by digital signal processing algorithms to extract feature values, including parameters such as average level, level fluctuation range, and rise / fall slope.

[0097] The broadcast command is implemented using Modbus protocol function code 0x11 (Report Slave ID). This command is sent to address 0, and all devices supporting this function code will return their own device identification information upon receiving the command. To avoid conflicts caused by multiple devices responding simultaneously, the module employs a time slot allocation mechanism, dividing the response time window into multiple time slots. Each device calculates its response time slot based on its own address. The number of responding devices is counted by parsing response frames. Each valid response frame contains information such as device address, device type, and vendor code.

[0098] Bus status records are stored in structured data format, including the following fields: record timestamp (accurate to milliseconds), number of responding devices, device address list, average response time, level feature vector, and exception flags. Comparison of adjacent bus status records uses set operations; newly added and removed devices are identified by calculating the difference between the device address lists. A change in the number of devices is determined when the difference in the number of responding devices is not zero, or when there are discrepancies in the device address lists.

[0099] The pause polling instruction is implemented through an inter-process communication mechanism. The dynamic register mapping module sends a message containing the instruction type and timestamp to the data forwarding and fault tolerance module. Upon receiving the pause instruction, the data forwarding and fault tolerance module completes data acquisition for the current device and then enters a waiting state. Mapping backup is implemented using a deep copy method, copying all data structures of the current mapping table to an independent memory area, including device information, address mapping relationships, status flags, etc.

[0100] The optimized device scanning implementation employs a segmented scanning strategy. First, known device addresses are quickly probed, followed by a full scan of potential new address ranges. The quick probe uses function code 0x03 (Read Holding Register) to read the first register of the device, with a timeout of 50 milliseconds. The full scan uses function code 0x11, with a timeout of 200 milliseconds. During the scan, the response status of each address is recorded, forming a list of online devices.

[0101] The device information comparison algorithm uses a hash table for efficient lookup. The hash table is built with the device address as the key. By traversing the current device information and the device information in the backup, three types of devices are identified: devices that are online (exist in both lists), newly added devices (exist only in the current list), and disconnected devices (exist only in the backup list).

[0102] The calculation of register address space length considers several factors: the number of registers in the device, data types (coil, discrete input, holding register, input register), reserved expansion space, etc. The calculation formula is: required space = Σ(number of registers of each type × type coefficient) × (1 + expansion coefficient), where the type coefficient reflects the storage requirements of different data types, and the expansion coefficient is usually set to 0.2.

[0103] The management of unallocated TCP slave register address space uses a free list data structure, where each node records the starting address and length of a free interval. A matching algorithm traverses the free list, searching for intervals with a length greater than or equal to the required space. If a perfectly matching interval is found, it is allocated directly; if a larger interval is found, it is split, and the remaining portion is kept in the free list.

[0104] When no matching free space exists, a global reallocation process is triggered. The default algorithm adopts a compact arrangement strategy, reallocating address space according to the device address order to eliminate fragmentation. The specific implementation steps are: (1) Calculate the total space requirement of all online devices; (2) If the total requirement exceeds the available space, perform space compression to reduce the reserved space of each device; (3) Starting from address 0, allocate continuous space to each device in sequence; (4) Generate a new address mapping relationship.

[0105] The mapping table update uses a transaction mechanism to ensure atomicity. The update process includes: (1) creating a new mapping table; (2) filling in device information and address mapping; (3) calculating the checksum; (4) atomically replacing the old mapping table pointer; and (5) releasing the old mapping table memory. After the update is completed, an update log is generated to record the changes.

[0106] The heartbeat synchronization mechanism uses incremental updates to improve efficiency. The heartbeat packet data structure includes: a header (version number, packet type, timestamp), a mapping table version number, a change type (full / incremental), change content (added / deleted / modified mapping entries), and a checksum. For mapping table updates caused by hot-plugging devices, the heartbeat packet only contains the changed mapping entries, reducing network transmission volume. After receiving the heartbeat packet, the remote server updates its local mapping table copy according to the changes and returns an acknowledgment message. If the server version is significantly outdated, the module will send a full update packet.

[0107] S109, The AI ​​anomaly detection module driven by the embedded neural network processor detects successfully transmitted data based on a pre-trained time-series data model deployed on the RK3588 chip embedded neural network processor.

[0108] The pre-trained time series data model comprises several layers of self-attention mechanisms and feedforward neural networks. The self-attention mechanism layers are used to extract long-term and short-term time series features from the input data sequence, while the feedforward neural network layers are used for feature fusion and nonlinear transformation. The training dataset of the pre-trained time series data model consists of continuous time series data collected by each sub-device under normal operating conditions. After segmented sampling and normalization preprocessing, the continuous time series data is divided into training and test sets according to a preset ratio. The input of the pre-trained time series data model is a fixed-length historical data sequence. The pre-trained time series data model uses mean squared error and confidence interval coverage as training objectives. The model parameters are optimized through the backpropagation algorithm. Training is completed after the prediction accuracy on the test set reaches a preset threshold. The AI ​​anomaly detection module driven by the embedded neural network processor inputs the successfully transmitted data into the pre-trained time series data model and outputs the detection results, which indicate whether the data is within or deviates from the predicted confidence interval.

[0109] The implementation of the AI ​​anomaly detection module driven by the embedded neural network processor is based on the RK3588 chip's embedded neural network processor hardware architecture. The RK3588's embedded neural network processor employs a tri-core design, achieving a computing power of 6 TOPS and supporting multiple precision operations such as INT4 / INT8 / INT16 / FP16. The embedded neural network processor driver layer provides a complete API interface, including functions such as model loading, memory management, inference execution, and performance monitoring.

[0110] The architecture of the pre-trained time-series data model fully considers the characteristics of industrial data. The model adopts an encoder-decoder structure. The encoder layer contains six self-attention mechanism layers, each containing a multi-head attention sub-layer and a feedforward network sub-layer. The multi-head attention mechanism uses eight attention heads, each with a dimension of 64, resulting in a total hidden layer dimension of 512. The self-attention calculation formula is: Attention(Q, K, V) = softmax(QK^T / √d_k)V, where Q, K, and V are the query, key, and value matrices, respectively, and d_k is the dimension of the key.

[0111] The implementation details of the self-attention mechanism layer include: position encoding uses a learnable parameter matrix with the same dimension as the input embedding; layer normalization is applied before the residual connection; the dropout rate is set to 0.1 to prevent overfitting; the attention weight matrix is ​​saved during training for interpretability analysis. The extraction of long-term and short-term temporal features is achieved through different levels of attention patterns: shallow layers focus on local patterns, while deeper layers capture global dependencies.

[0112] The feedforward neural network employs a two-layer fully connected structure, with the intermediate layer having a dimension of 2048, and uses GELU as the activation function. Feature fusion is achieved through a weighted combination of multiple feature layers, with the weights dynamically calculated using a gating mechanism. Nonlinear transformations enhance the model's expressive power, enabling it to learn complex data patterns.

[0113] The construction of the training dataset strictly adhered to data quality requirements. Data acquisition covered the entire operating cycle of the equipment, including startup, stable operation, load changes, and shutdown. The acquisition frequency was determined based on the equipment characteristics; high-frequency acquisition (100Hz) was used for rapidly changing parameters (such as current), while low-frequency acquisition (1Hz) was used for slowly changing parameters (such as temperature). Data cleaning steps included outlier detection and handling, missing value imputation, and noise filtering.

[0114] The segmented sampling strategy considers both the continuity of time-series data and computational efficiency. The sampling window length is set to 128 time steps, with a sliding step size of 32, resulting in 75% overlap. This overlapping sampling increases the number of training samples and improves the model's generalization ability. Normalization is performed using the Z-score standardization method, calculating the mean and standard deviation of each feature to transform the data into a distribution with a mean of 0 and a standard deviation of 1.

[0115] The training and test sets are partitioned using a time-series-specific method. Instead of random partitioning, the first 80% of the data is used as the training set, and the last 20% as the test set, following a chronological order. This partitioning approach better reflects real-world application scenarios where the model needs to predict the future based on historical data.

[0116] The specific implementation of the model training process includes the following key technologies:

[0117] Loss function design: Mean squared error loss calculates the L2 distance between the predicted and true values, while confidence interval coverage loss ensures the accuracy of prediction uncertainty. The total loss function is: L = αL_MSE + βL_coverage, where α and β are balancing coefficients.

[0118] Optimizer configuration: The AdamW optimizer is used, with a cosine annealing learning rate strategy, an initial learning rate of 1e-4, and a minimum learning rate of 1e-6. The weight decay coefficient is set to 0.01, and the gradient clipping threshold is 1.0.

[0119] Training strategy: A course-based learning approach is adopted, initially using a shorter sequence length (32), which is gradually increased to 128 as training progresses. The model is evaluated on the validation set after each epoch, and the best-performing model is saved. An early stopping mechanism monitors the validation loss; training is stopped if there is no improvement after 10 consecutive epochs.

[0120] Data augmentation: The diversity of the training data is increased by adding Gaussian noise, time warp, amplitude scaling, etc. The noise standard deviation is set to 5% of the original signal, and the time warp factor is randomly selected between 0.9 and 1.1.

[0121] The process of deploying a model to an embedded neural network processor includes the following steps:

[0122] Model conversion: The PyTorch model is converted to RKNN format using the RKNN-Toolkit2 tool. Graph optimization is performed during the conversion process, including operator fusion, constant folding, and dead code elimination.

[0123] Quantization: Post-training quantization is employed, using a representative dataset to calculate quantization parameters. Asymmetric quantization is chosen to maximize model accuracy. INT8 quantization reduces model size by 75% and improves inference speed by 3-4 times.

[0124] Memory optimization: Zero-copy inference is achieved, with input data directly mapped to the embedded neural network processor's memory, avoiding data transfer overhead between the CPU and the embedded neural network processor. Dynamic allocation is managed using a memory pool to reduce memory fragmentation.

[0125] Batch processing optimization: Based on the parallel processing capabilities of the embedded neural network processor, the optimal batch size is set to 16. This enables dynamic batch processing, flexibly adjusting the batch size according to the arrival of data.

[0126] Anomaly detection inference process implementation:

[0127] Data preprocessing: The received real-time data is first normalized using the mean and standard deviation parameters saved during training. A fixed-length input sequence is constructed, with insufficient parts padded with historical data.

[0128] Embedded neural network processor inference: Inference is performed by calling the RKNN runtime API, taking preprocessed data as input, and obtaining the model output. The output includes predicted values ​​and uncertainty estimates.

[0129] Confidence interval calculation: Based on the uncertainty estimate of the model output, a 95% confidence interval is calculated. The upper and lower bounds of the confidence interval are: predicted value ± 1.96 × prediction standard deviation.

[0130] Anomaly detection: Compare the actual observed value with the confidence interval. If it falls outside the interval, it is considered an anomaly. Calculate the anomaly score: score = |observed value - predicted value| / prediction standard deviation. The higher the score, the more severe the anomaly.

[0131] Post-processing of results: The detection results are smoothed to avoid false alarms caused by instantaneous fluctuations. A sliding window method is used, and an abnormal state is finally confirmed only when three consecutive points are identified as abnormal.

[0132] The model's online update mechanism ensures long-term accuracy.

[0133] Incremental learning: Regularly collect new, operational data and update the model using experience replay methods. Retain a certain proportion of historical data and mix it with new data for training.

[0134] Concept drift detection: Monitors the statistical characteristics of model prediction errors and triggers model updates when the error distribution changes significantly. The ADWIN algorithm is used to detect concept drift.

[0135] Model version management: Maintain multiple versions of the model. The new model will only replace the production model after it has passed verification. Historical versions are retained for rollback.

[0136] Performance optimization measures ensure real-time requirements:

[0137] Pipeline parallelism: Data preprocessing, embedded neural network processor inference, and result postprocessing are executed in parallel using a pipelined approach to improve throughput.

[0138] Caching mechanism: Caching frequently accessed intermediate results, such as normalization parameters and confidence interval lookup tables.

[0139] Asynchronous processing: Anomaly detection and data acquisition are performed asynchronously, without blocking the main data stream. Message queues are used to decouple different modules.

[0140] Through the detailed technical implementation described above, the AI ​​anomaly detection module driven by the embedded neural network processor can efficiently and accurately perform real-time anomaly detection on industrial equipment data, promptly identify equipment malfunctions, and provide technical support for predictive maintenance.

[0141] S110. When successfully transmitted data deviates from the predicted confidence interval, it is determined to be abnormal data, and the abnormal data is marked and added to the heartbeat packet.

[0142] The prediction confidence interval is a numerical range in the model output, representing the probability that normal data should fall within that range. Deviation can be measured as a multiple of the standard deviation. Outlier data is labeled with anomaly type, severity, occurrence time, and device information. Heartbeat packets are status information packets periodically sent by the system to the remote server; besides maintaining the connection, they also carry important status updates. The anomaly detection threshold, the level of detail in the labeling, and the heartbeat sending frequency can be configured according to actual needs and are not limited here.

[0143] Technical solutions for handling abnormal data include: The first solution employs a multi-level anomaly classification mechanism, categorizing anomalies into minor, moderate, and severe levels based on their deviation from the confidence interval. Different processing strategies are applied to different levels: minor anomalies are only logged, moderate anomalies are added to heartbeat notifications, and severe anomalies are immediately flagged with an alarm. The second solution uses an anomaly aggregation mechanism, aggregating consecutively occurring anomalies of the same type to avoid numerous duplicate alarms. Only anomaly statistics and representative samples are sent in the heartbeat packet. The third solution employs anomaly correlation analysis, analyzing the correlation between anomalies when multiple related devices simultaneously exhibit anomalies to identify potential systemic failures.

[0144] In the above embodiments, the dynamic register mapping module allocates a continuous TCP slave register address space based on device information and generates a mapping table, realizing dynamic management of device addresses. The data forwarding and fault tolerance module collects data according to a preset polling cycle and executes a retransmission mechanism when a temporary cyclic redundancy check error is detected, improving overall data transmission efficiency by skipping communication failure devices. The system synchronizes the mapping table updates caused by device hot-plugging to the remote server through a heartbeat mechanism, improving the real-time performance and accuracy of server-side data. The AI ​​anomaly detection module driven by the embedded neural network processor uses a pre-trained time-series data model to detect anomalies in transmitted data, marking abnormal data that deviates from the predicted confidence interval and reporting it via heartbeat packets, thus improving the reliability of data quality. This method, through the synergistic effect of dynamic mapping, fault tolerance mechanism, and AI anomaly detection, improves the reliability of data acquisition while enhancing system operating efficiency and reducing the impact of communication failures on the overall system performance.

[0145] In the above embodiments, the basic functional framework of the system is realized through dynamic mapping, fault tolerance mechanisms, and AI anomaly detection. To further optimize data acquisition efficiency and improve system resource utilization, this application also provides another Modbus multi-device aggregation and forwarding method based on RK3588. This method adaptively adjusts the acquisition frequency by analyzing data change patterns, enabling the system to more intelligently balance data real-time performance and resource consumption. The following section combines... Figure 2 Another Modbus multi-device aggregation and forwarding method based on RK3588 in the embodiments of this application is described below:

[0146] Please see Figure 2 This is another flowchart illustrating a Modbus multi-device aggregation and forwarding method based on RK3588 in an embodiment of this application.

[0147] S201, The data forwarding and fault tolerance module sets the initial polling time point for each sub-device based on the device information of the sub-device;

[0148] The data forwarding and fault tolerance module sets the initial polling time point for each sub-device based on its device information. The initial polling time point is the remaining time until the next polling collection. Device information includes attributes such as the sub-device's type, functional characteristics, data update frequency, and importance level. This information is obtained during system initialization through device scanning or configuration file import. The initial polling time point is a timestamp value representing the scheduled time when the device will be polled next; the difference between this time point and the current system time is the remaining waiting time. Setting the initial polling time point involves multiple steps, including evaluating device priority, calculating the initial collection interval, and optimizing time scheduling. Different types of devices can have different initial polling intervals; for example, the initial interval for a temperature sensor can be set to 30 seconds, while the initial interval for a current sensor can be set to 5 seconds. The specific value, calculation method, and adjustment strategy of the initial polling time point can be configured according to the actual application scenario and are not limited here.

[0149] The technical solutions for setting the initial polling time point include: The first solution uses a device type-based classification method. The system predefines multiple device type templates, each containing a recommended polling interval range. The system matches the corresponding template based on the type identifier in the device information and randomly assigns the initial time point within the recommended range. This randomization avoids instantaneous load spikes caused by multiple similar devices being polled simultaneously. The second solution uses an intelligent setting method based on historical data. The system analyzes the historical data change patterns of the devices, calculates the average interval and variance of data changes, and determines a suitable initial polling interval based on statistical characteristics. For newly connected devices, the average value of similar devices is used as the initial value. The third solution uses a load-balanced time-slice allocation method. The total polling cycle is divided into multiple time slices. Based on the number of devices and the expected collection duration for each device, non-overlapping time slices are allocated to each device, and the initial polling time point is set at the beginning of the corresponding time slice.

[0150] S202. When the data forwarding and fault tolerance module detects a change in successfully transmitted data, it records the time difference between the current time and the initial polling time and updates the polling time of the corresponding sub-device.

[0151] Data change detection is achieved by comparing two consecutively collected data values. The criteria for determining a change can be either an absolute value difference exceeding a threshold or a relative change rate exceeding a percentage threshold. The current time refers to the system timestamp at which the data change was detected, typically with millisecond-level precision. The formula for calculating the time difference is: Time Difference = Current Time - Last Data Change Time. This difference reflects the duration the data remained unchanged. The process of updating the polling time points includes steps such as assessing the urgency of the data change, calculating the new polling interval, and adjusting the time schedule. Parameters such as the sensitivity of data change detection, the precision of time recording, and the aggressiveness of the update strategy can be adjusted according to application requirements and are not limited here.

[0152] Technical solutions for implementing data change detection and time-point updates include: The first solution uses a sliding window change detection algorithm. This maintains a fixed-size historical data window, calculates the statistical characteristics (mean, standard deviation) of the data within the window, and determines a significant change when new data exceeds the normal range (mean ± k times the standard deviation). The change time is recorded, and an early update of the polling time point is triggered, enabling the system to monitor devices in a changing state more intensively. The second solution uses an adaptive threshold detection algorithm. This dynamically adjusts the change detection threshold based on the historical fluctuation characteristics of the device data. Larger thresholds are used for devices with large fluctuations to avoid frequent triggering, while smaller thresholds are used for stable devices to increase sensitivity. The third solution employs a multi-level change detection mechanism, defining three levels: minor change, moderate change, and severe change. Different levels of change trigger different degrees of polling time adjustments. Minor changes are only recorded without adjustment, moderate changes have their polling intervals moderately shortened, and severe changes immediately add the device to a high-priority queue.

[0153] S203, The data forwarding and fault tolerance module calculates the dynamic acquisition cycle based on the time difference;

[0154] The data forwarding and fault tolerance module calculates the dynamic acquisition cycle based on the time difference. The dynamic acquisition cycle is the waiting time for the next polling acquisition. Preferably, the data forwarding and fault tolerance module records the number of data changes of the sub-devices within a fixed sampling time. The data forwarding and fault tolerance module calculates the ratio of the number of data changes to the fixed sampling time to obtain the data change frequency per unit time. The data forwarding and fault tolerance module marks sub-devices with a data change frequency greater than a preset frequency threshold as high-frequency change devices. The data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of high-frequency change devices based on a preset attenuation parameter. The fixed sampling time is a time window used to statistically analyze the characteristics of data changes, usually set to a few minutes to tens of minutes. The number of data changes is the cumulative number of significant data changes detected within the fixed sampling time. The data change frequency is obtained by dividing the number of changes by the sampling time, with units of times / second or times / minute. The preset frequency threshold is the boundary value for distinguishing between high-frequency and low-frequency change devices, and this value is determined based on the system processing capacity and data importance. The high-frequency change device label is used to identify devices that require special attention. The preset attenuation parameter controls the adjustment range of the dynamic acquisition cycle, and the value range is usually between 0 and 1, with smaller values ​​indicating conservative adjustment and larger values ​​indicating aggressive adjustment. The specific values ​​of various threshold parameters can be optimized and configured according to the actual application scenario, and are not limited here.

[0155] Technical solutions for dynamically calculating the acquisition cycle include: The first solution uses an exponentially weighted moving average algorithm, which calculates an exponentially weighted average of historical data change intervals, with more recent intervals having a higher weight. The calculation formula is: New cycle = α × Current interval + (1-α) × Historical average cycle, where α is a smoothing coefficient. This method can smoothly track data change trends. The second solution uses a PID control algorithm, taking the freshness of the target data as the control objective and the age of the actual data as feedback. It calculates the adjustment amount of the acquisition cycle through proportional, integral, and derivative steps to achieve precise cycle control. The third solution uses machine learning prediction methods, training a time series prediction model using historical data change patterns to predict the time of the next data change. This predicted time is used as the dynamic acquisition cycle, and this method can capture complex change patterns.

[0156] S204. The data forwarding and fault tolerance module updates the dynamic collection cycle to the preset polling cycle.

[0157] The preset polling cycle is a device data collection schedule maintained in the system, including the next data collection time and interval for each device. The update process involves modifying the schedule, notifying the scheduler, and synchronizing related modules. The update operation must guarantee atomicity to avoid inconsistencies during the update process.

[0158] Technical solutions for implementing polling periodic updates include: The first solution employs a double-buffered update mechanism, maintaining two polling periodic tables: one for the currently used active table and one for a backup table to be updated. After completing all update operations in the backup table, an atomic pointer switch completes the update, ensuring that the update process does not affect ongoing polling operations. The second solution uses an incremental update method, encapsulating periodic update operations as update events and placing them in a priority queue. The scheduler checks and applies the pending update events before each poll, reducing the latency of update operations.

[0159] In the above embodiments, by setting an initial polling time point and recording the time difference when data changes, a dynamic acquisition cycle is calculated to update the preset polling cycle. The acquisition frequency is dynamically adjusted according to actual data changes, avoiding resource waste or data lag issues that may occur with fixed-cycle acquisition. When data changes frequently, the system can promptly adjust the acquisition cycle to follow the rhythm of data changes, while appropriately extending the acquisition interval when the data is relatively stable. This adaptive acquisition mechanism based on data change characteristics optimizes system resource utilization efficiency, reduces unnecessary acquisition operations while ensuring data timeliness, and lowers system load while improving data real-time performance.

[0160] The above embodiments implemented dynamic acquisition cycle adjustment based on data change characteristics. To further refine the differentiated management of different types of devices, especially to achieve more precise control over devices with frequent data changes, this application also provides another Modbus multi-device aggregation and forwarding method based on RK3588. This method implements specialized acquisition strategies for devices with high-frequency changes by statistically analyzing the data change characteristics of the devices, thereby achieving more refined resource scheduling. The following section combines... Figure 3 This application describes yet another Modbus multi-device aggregation and forwarding method based on RK3588 in its embodiments:

[0161] Please see Figure 3 This is another flowchart illustrating a Modbus multi-device aggregation and forwarding method based on RK3588 in an embodiment of this application.

[0162] S301, The data forwarding and fault tolerance module records the number of data changes of the sub-device within a fixed sampling time;

[0163] A fixed sampling time is a pre-set statistical time window used to collect sufficient data samples to accurately assess the changing characteristics of the equipment. This time length is determined based on the system's response requirements and equipment characteristics, typically ranging from 1 minute to 60 minutes. The definition of data change encompasses multiple dimensions, considering not only absolute numerical changes but also characteristics such as trends and rates of change. The process of recording the number of changes involves multiple stages, including data acquisition, change detection, counting and accumulation, and storage management. The recording mechanism needs to consider factors such as data timeliness, storage efficiency, and query performance. The specific values ​​of the fixed sampling time, the sensitivity parameters for change detection, and the data structure for storage can be configured according to the actual application scenario and are not limited here.

[0164] Technical solutions for recording the number of data changes include: The first solution uses a timestamp array, maintaining a fixed-size circular array for each device. Array elements store the timestamps of data changes, and the number of changes is obtained by counting the number of timestamps falling within a fixed sampling time window. This method has fixed memory usage and is suitable for resource-constrained embedded environments. The second solution uses a counter sliding window method, dividing the fixed sampling time into multiple sub-time slices (e.g., dividing 30 minutes into 30 1-minute time slices). Each time slice corresponds to a counter, recording the number of changes within that time slice. The total number of changes is obtained by accumulating the counts of all time slices within the current time window. This method supports statistical analysis at different granularities. The third solution uses an event log approach, recording each data change as an event in a log buffer, including detailed information such as the timestamp, the values ​​before and after the change, and the type of change. The number of changes is obtained by querying the number of events within a specified time range.

[0165] S302. The data forwarding and fault tolerance module calculates the ratio of the number of data changes to the fixed sampling time to obtain the data change frequency per unit time.

[0166] Data change frequency is a key indicator for measuring the dynamic characteristics of equipment data, and its unit is usually times per second (Hz) or times per minute. The calculation process needs to consider factors such as time unit conversion, preservation of numerical accuracy, and handling of outliers. Change frequency is not only used for current equipment classification, but also stored as historical data for trend analysis and prediction. The time granularity, accuracy requirements, update frequency, and other parameters of frequency calculation can be adjusted according to system requirements and are not limited here.

[0167] Technical solutions for calculating data change frequency include: The first solution uses a simple averaging method, directly dividing the number of changes by the sampling time to obtain the average frequency. To improve calculation accuracy, floating-point arithmetic is used and sufficient decimal places are retained. This method is simple to calculate and suitable for scenarios with high real-time requirements. The second solution uses a weighted moving average method, averaging the frequencies of multiple consecutive sampling periods with greater weight for more recent frequencies. The calculation formula is: Weighted Frequency = Σ(Weight i × Frequency i) / ΣWeight i. This method can smooth short-term fluctuations and obtain a more stable frequency estimate. The third solution uses frequency distribution statistics, which not only calculates the average frequency but also statistically analyzes the frequency distribution characteristics, including maximum, minimum, and variance, providing a more comprehensive description of the device's variation characteristics through multi-dimensional statistical indicators.

[0168] S303, The data forwarding and fault tolerance module marks sub-devices whose data change frequency is greater than a preset frequency threshold as high-frequency change devices;

[0169] The preset frequency threshold serves as the dividing line between high-frequency and ordinary devices. Setting this threshold requires comprehensive consideration of multiple factors, including system processing capacity, network bandwidth, and data importance. The marking of devices exhibiting high-frequency fluctuations is not permanent but dynamically updated; the mark is removed when the device's fluctuation frequency drops below the threshold. The marking process includes steps such as frequency comparison, status update, and mark persistence. The specific value of the threshold, the mark update strategy, and the persistence method can be configured according to application requirements and are not limited here.

[0170] Technical solutions for marking devices exhibiting high-frequency changes include: The first solution uses a single threshold method, setting a globally unified frequency threshold. All devices are judged using the same standard. This is achieved by adding a Boolean flag to the device data structure, setting it to true when the frequency exceeds the threshold. This method is simple to implement and suitable for scenarios with relatively simple device types. The second solution uses a hierarchical threshold method, defining multiple threshold levels based on device type. For example, devices can be categorized as fast-response (threshold 0.5Hz), medium-response (threshold 0.1Hz), and slow-response (threshold 0.02Hz). Different types of devices use corresponding thresholds for judgment. This method is more precise and suitable for complex systems with diverse device types. The third solution uses a dynamic threshold method, dynamically adjusting the threshold based on the system's current load. When the system load is low, the threshold is lowered to provide better data acquisition quality; when the system load is high, the threshold is raised to ensure system stability.

[0171] S304, The data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of high-frequency changing devices based on preset attenuation parameters.

[0172] The data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of the high-frequency changing device based on a preset attenuation parameter. Specifically, the module records the moment of the most recent data change from the device; it calculates the time interval between the current moment and the moment of the most recent data change; it divides this time interval by a preset reference time to obtain the attenuation parameter; and finally, it multiplies the dynamic acquisition cycle by the attenuation parameter to obtain the adjusted dynamic acquisition cycle for the high-frequency changing device. The moment of the most recent data change is the timestamp recorded by the system as the last time the device detected a significant data change, typically with millisecond-level accuracy. The time interval is calculated by subtracting the moment of the most recent change from the current system time, reflecting the duration of data stability. The preset reference time is a reference value used to normalize the time interval and is usually set to the typical change cycle of this type of device. The attenuation parameter is calculated as the ratio of the time interval to the reference time and is used to adjust the amplitude of the acquisition cycle change. The adjustment of the dynamic acquisition cycle is achieved by multiplying the current cycle by the attenuation parameter, realizing the goal of adaptively adjusting the acquisition frequency based on data stability. The value of the preset reference time, the calculation method of the attenuation parameter, and the limitations of the cycle adjustment can be optimized according to specific applications and are not limited here.

[0173] Technical solutions for period adjustment based on attenuation parameters include: The first solution uses a linear attenuation model, where the attenuation parameter is proportional to the time interval. The calculation formula is: Attenuation parameter = min(Time interval / Base time, Maximum attenuation value). The maximum attenuation value limits the upper limit of the period extension, preventing data failure due to excessively long acquisition periods. The adjusted period = Current period × Attenuation parameter. This linear relationship is simple, intuitive, and computationally efficient. The second solution uses an exponential attenuation model, where the attenuation parameter changes exponentially. The calculation formula is: Attenuation parameter = 1 + (Maximum attenuation value - 1) × (1 - exp(-Time interval / Base time)). This model exhibits slow attenuation initially, accelerating over time and eventually stabilizing, better reflecting actual data variation patterns. The third solution uses a segmented attenuation model, dividing the time interval into multiple intervals. Each interval uses a different attenuation strategy. For example, 0-Base time uses a coefficient of 1.0 (no attenuation), Base time - 2 times the Base time uses linear attenuation, and intervals above 2 times the Base time use a fixed maximum attenuation value.

[0174] In the above embodiments, by counting the number of data changes within a fixed sampling time, the data change frequency per unit time is calculated, and devices exceeding a preset frequency threshold are marked as high-frequency changing devices. Then, their dynamic acquisition cycle is adjusted based on a preset attenuation parameter. This differentiated processing mechanism can identify devices with frequent data changes and adopt more targeted acquisition strategies for them. By dynamically adjusting the acquisition cycle of high-frequency changing devices, the timeliness of data acquisition is ensured while avoiding excessive concentration of acquisition resources on individual devices, achieving a balanced allocation of acquisition resources. This adaptive adjustment based on data change characteristics improves the acquisition efficiency of high-frequency changing data and reduces the consumption of system resources.

[0175] The system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 4 This is a schematic diagram of the physical device structure of a Modbus multi-device aggregation and forwarding system based on RK3588, provided in an embodiment of this application.

[0176] It should be noted that, Figure 4 The structure of the system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0177] like Figure 4 As shown, the system includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on a program stored in Read-Only Memory (ROM) 402 or a program loaded from storage portion 408 into Random Access Memory (RAM) 403. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0178] The following components are connected to I / O interface 405: input section 406 including a camera, infrared sensor, etc.; output section 407 including a liquid crystal display (LCD) and speakers, etc.; storage section 408 including a hard disk, etc.; and communication section 409 including a network interface card such as a LAN (Local Area Network) card and a modem, etc. Communication section 409 performs communication processing via a network such as the Internet. Drive 410 is also connected to I / O interface 405 as needed. Removable media 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.

[0179] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the various functions defined in the present invention.

[0180] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. The transmitted data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.

[0181] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0182] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the system described in the above embodiments; or it may exist independently and not assembled into the system. The storage medium carries one or more computer programs that, when executed by a processor of a system, cause the system to implement the methods provided in the above embodiments.

[0183] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0184] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0185] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0186] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A Modbus multi-device aggregation and forwarding method based on RK3588, applied to a system, characterized in that, The system includes a hardware base layer, a dynamic register mapping module, a data forwarding and fault tolerance module, and an AI anomaly detection module driven by an embedded neural network processor. The hardware base layer includes an RK3588 chip and peripheral interfaces. The method includes: The hardware base layer scans the sub-devices on the bus through the RS485 interface in the peripheral interface to obtain the device information of each sub-device. Based on the device information, the dynamic register mapping module allocates a continuous TCP slave register address space for each of the sub-devices using a built-in preset algorithm; The dynamic register mapping module generates a mapping table and stores it in the local memory of the RK3588 chip; The data forwarding and fault tolerance module collects data from each of the sub-devices through the RS485 interface at a preset polling cycle based on the mapping table. If the data forwarding and fault tolerance module detects a transmission error and the transmission error is a temporary cyclic redundancy check error, it will perform a preset number of retransmissions at a preset interval. If retransmission fails, the data forwarding and fault tolerance module will mark the corresponding sub-device as having a communication abnormal state and skip the sub-device in the next polling cycle. The data forwarding and fault tolerance module writes the successfully transmitted data into the corresponding TCP slave register address space according to the mapping table and sends it to the remote server. The dynamic register mapping module updates the mapping table when it detects a device hot-plugging and synchronizes it to the remote server via a heartbeat packet. The AI ​​anomaly detection module driven by the embedded neural network processor detects the successfully transmitted data based on a pre-trained time-series data model deployed on the RK3588 chip embedded neural network processor. When the successfully transmitted data deviates from the predicted confidence interval, it is determined to be abnormal data, and the abnormal data is marked and added to the heartbeat packet.

2. The method according to claim 1, characterized in that, The dynamic register mapping module updates the mapping table when a device hot-plug is detected, specifically including: The dynamic register mapping module acquires bus level signals and records the number of devices responding to the broadcast command sent, generating a bus status record. When the dynamic register mapping module determines that the number of responding devices has changed based on the status records of two adjacent buses, it determines that a device hot-plug has occurred. The dynamic register mapping module sends a pause polling instruction to the data forwarding and fault tolerance module and stores the mapping table as a mapping backup. The dynamic register mapping module controls the hardware base layer to perform device scanning through the RS485 interface to obtain the current device information of online sub-devices; The dynamic register mapping module compares the device information in the mapping backup with the current device information to determine the newly added devices and disconnected devices. The dynamic register mapping module calculates the length of the register address space required by the newly added device; When it is determined that there is an unallocated TCP slave register address space that matches the length of the register address space, the dynamic register mapping module allocates the unallocated TCP slave register address space to the newly added device, and obtains the allocation result; When it is determined that there is no unallocated TCP slave register address space that matches the length of the register address space, the dynamic register mapping module allocates a continuous TCP slave register address space for each of the online sub-devices according to the preset algorithm, and obtains the allocation result; The dynamic register mapping module updates the mapping table based on the allocation result.

3. The method according to claim 1, characterized in that, The pre-trained time-series data model comprises several layers of self-attention mechanisms and feedforward neural networks. The self-attention mechanisms are used to extract long and short-term time-series features from the input data sequence. The feedforward neural networks are used for feature fusion and nonlinear transformation. The training dataset of the pre-trained time-series data model consists of continuous time-series data collected by each of the sub-devices under normal operating conditions. After segmented sampling and normalization preprocessing, the continuous time-series data is divided into training and testing sets according to a preset ratio. The input of the pre-trained time-series data model is a fixed-length historical data sequence. The pre-trained time-series data model uses mean squared error and confidence interval coverage as training objectives. The model parameters are optimized through backpropagation algorithm. Training is completed after the prediction accuracy on the testing set reaches a preset threshold. The AI ​​anomaly detection module driven by the embedded neural network processor inputs the successfully transmitted data into the pre-trained time-series data model and outputs detection results, which are either within or deviating from the prediction confidence interval.

4. The method according to claim 1, characterized in that, Before the data forwarding and fault tolerance module collects data from each of the sub-devices according to a preset polling period via the RS485 interface based on the mapping table, the method further includes: The data forwarding and fault tolerance module sets the initial polling time point for each sub-device based on the device information of the sub-device. The initial polling time point is the remaining time for the sub-device before the next polling collection. When the data forwarding and fault tolerance module detects a change in the successfully transmitted data, it records the time difference between the current time and the initial polling time point, and updates the polling time point of the corresponding sub-device. The data forwarding and fault tolerance module calculates the dynamic collection period based on the time difference, and the dynamic collection period is the waiting time for the next polling collection. The data forwarding and fault tolerance module updates the dynamic collection cycle to the preset polling cycle.

5. The method according to claim 4, characterized in that, The data forwarding and fault tolerance module calculates the dynamic acquisition period based on the time difference, specifically including: The data forwarding and fault tolerance module calculates the average value of the time difference to obtain the average time difference; The data forwarding and fault tolerance module compares the average time difference with a preset baseline period, where the preset baseline period is a preset minimum polling interval. When the average time difference is less than the preset baseline period, the data forwarding and fault tolerance module sets the preset baseline period to a dynamic acquisition period. When the average time difference is not less than the preset baseline period, the data forwarding and fault tolerance module sets the average time difference to the dynamic acquisition period.

6. The method according to claim 4, characterized in that, After the data forwarding and fault tolerance module updates the dynamic acquisition period to the preset polling period, the method further includes: The data forwarding and fault tolerance module records the number of data changes of the sub-device within a fixed sampling time. The data forwarding and fault tolerance module calculates the ratio of the number of data changes to the fixed sampling time to obtain the data change frequency per unit time. The data forwarding and fault tolerance module marks sub-devices whose data change frequency is greater than a preset frequency threshold as high-frequency change devices. The data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of the high-frequency changing device based on a preset attenuation parameter.

7. The method according to claim 6, characterized in that, The data forwarding and fault tolerance module adjusts the dynamic acquisition cycle of the high-frequency changing device based on a preset attenuation parameter, specifically including: The data forwarding and fault tolerance module records the moment of the most recent data change of the high-frequency changing device; The data forwarding and fault tolerance module calculates the time interval between the current moment and the moment of the most recent data change; The data forwarding and fault tolerance module divides the time interval by a preset base time to obtain the attenuation parameter; The data forwarding and fault tolerance module multiplies the dynamic acquisition period by the attenuation parameter to obtain the dynamic acquisition period adjusted by the high-frequency change device.

8. A Modbus multi-device aggregation and forwarding system based on RK3588, characterized in that, The system includes: A memory and one or more processors; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the system to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the system, the system performs the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on the system, the system performs the method as described in any one of claims 1-7.