A stable bidirectional communication method and a multi-interface data interaction module
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MORLAN CONTROLS SYST (SHANGHAI) CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-07
AI Technical Summary
[0002]在工业无线通信场景中,工业现场的设备控制和传感器数据采集的双向通信,对数据传输的实时性、稳定性和多接口适配性要求极高,在现有技术中存在不足,其一,多接口工业设备通过单一无线通信链路进行数据传输,不同接口数据在共享链路资源时缺乏有效的协同调度机制,在无线链路质量发生波动的情况下,叠加多接口数据的并发传输,易导致链路资源分配不均,引发数据拥塞、传输时延波动以及数据丢失等问题;其二,在工业双向通信中,上行数据和下行控制指令共同占用通信链路的上下行带宽资源,现有技术通常采用静态优先级或固定策略进行调度,无法适配链路带宽的动态变化,导致下行控制指令在通信链路高负载时传输延迟,影响工业设备远程控制的实时性和双向通信稳定性
[0069]1、通过构建通信状态分析模型对预设时间窗口内的链路波动趋势进行预测,同时基于历史业务行为数据估计下行数据传输负载,从而构建带宽优化分配模型,使得上下行带宽资源的分配能够提前适应链路状态变化,提高无线通信链路在复杂环境下的稳定性和可靠性。
Smart Images

Figure CN122534635A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, specifically to a stable bidirectional communication method and a multi-interface data interaction module. Background Technology
[0002] In industrial wireless communication scenarios, the two-way communication for equipment control and sensor data acquisition in industrial settings places extremely high demands on the real-time performance, stability, and multi-interface adaptability of data transmission. Existing technologies have several shortcomings. First, multi-interface industrial equipment transmits data through a single wireless communication link. When different interface data share link resources, there is a lack of effective collaborative scheduling mechanisms. Fluctuations in wireless link quality, coupled with the concurrent transmission of multiple interface data, can easily lead to uneven allocation of link resources, causing data congestion, transmission delay fluctuations, and data loss. Second, in industrial two-way communication, uplink data and downlink control commands share the uplink and downlink bandwidth resources of the communication link. Existing technologies typically use static priorities or fixed strategies for scheduling, which cannot adapt to dynamic changes in link bandwidth. This results in transmission delays for downlink control commands when the communication link is under high load, affecting the real-time performance of remote control of industrial equipment and the stability of two-way communication. Summary of the Invention
[0003] To address the problems in the background technology, this invention provides a stable bidirectional communication method and a multi-interface data interaction module. Under the conditions of concurrent transmission of multi-interface data and dynamic changes in communication link status, the method rationally allocates communication link resources and coordinates the transmission process of uplink data and downlink control commands, thereby realizing stable bidirectional communication between multi-interface data in the industrial field and remote servers, improving the utilization rate of wireless link resources and the real-time performance of industrial control.
[0004] The technical solution to achieve the purpose of this invention is as follows:
[0005] On the one hand, the present invention provides a stable bidirectional communication method, comprising the following steps:
[0006] Real-time acquisition of communication link status data; multi-dimensional signal-to-noise ratio separation and feature extraction of the communication link status data to obtain link status features;
[0007] The link status characteristics are input into the preset communication status analysis model to predict the link status changes within the preset time window, obtain the link status prediction results and link fluctuation trends, and estimate the downlink data transmission load within the preset time window based on historical business behavior data.
[0008] Obtain the current transmission load of multi-interface data, combine it with the estimated downlink data transmission load, construct a bandwidth optimization allocation model, and calculate the optimal uplink and downlink bandwidth allocation strategy under the constraints of link fluctuation trend and link status prediction results.
[0009] Based on the optimal uplink and downlink bandwidth allocation strategy, a dynamic coupling relationship is established based on the transmission characteristics of multi-interface data, and collaborative bandwidth allocation is performed on multi-interface data to determine the transmission parameters of each interface data.
[0010] Real-time monitoring of communication anomalies; when data loss, link congestion, or transmission delay occurs, corresponding scheduling adjustments or anomaly recovery processing are performed based on the anomaly type.
[0011] Specifically, before data acquisition, based on the preset industrial communication interface specifications, and in response to the multi-source heterogeneous data interaction needs in industrial sites, the various types of communication interfaces are initialized and configured, and a registration management mechanism is established. Each initialized communication interface is assigned a unique interface identifier, which includes interface type code, data transmission direction code, and data priority code. An interface registration ledger is established simultaneously, which records each interface identifier, interface type, data transmission parameters, and historical interaction status.
[0012] Furthermore, real-time data collection of industrial communication link status, including signal strength, signal-to-noise ratio, link delay, uplink and downlink transmission rates and packet loss rate, is performed, along with timestamp alignment, outlier removal, data completion and normalization processing, to obtain a link status sequence.
[0013] Multi-dimensional signal-to-noise ratio (SNR) separation is performed on the link state sequence. A targeted interference separation algorithm separates the real link signal from various interference signals. Specifically, wavelet decomposition and reconstruction algorithms are used to decompose the link state sequence into multi-scale components, dividing the signal into different frequency components. A hard threshold filtering strategy is applied to denoise the high-frequency disturbance components, while a soft threshold filtering strategy is applied to smooth the low-frequency interference components. The processed high-frequency and low-frequency effective components are then reconstructed using wavelets to obtain the interference-free link state data. The SNR improvement rate of the reconstructed data is calculated. When the SNR improvement rate is lower than a preset threshold, the wavelet decomposition scale and filtering threshold are adjusted, and the separation and reconstruction are repeated until the SNR improvement rate reaches the preset threshold.
[0014] Furthermore, feature extraction is performed on the reconstructed link state sequence after multi-dimensional noise separation. Multi-dimensional link state feature vectors are extracted across multiple time scales, including: calculating the statistical characteristics of each link state parameter within a sliding time window, including mean, variance, and rate of change between adjacent time steps; extracting trend features from the link state sequence and performing first-order differencing to identify abrupt change segments; encoding the identified abrupt change segments to extract the amplitude, duration, and frequency of the abrupt changes, forming fluctuation features; combining the statistical features, trend features, and fluctuation features to construct multi-dimensional link state features, and performing normalization processing; concatenating the original link state parameters and multi-dimensional link state features according to a preset dimensional order to form a unified format link state feature vector X(t).
[0015] Furthermore, the link state feature vector X(t) is input into a preset communication state analysis model to predict the link state changes within a preset time window, thereby obtaining the link state prediction results and link fluctuation trends.
[0016] Specifically, the communication state analysis model adopts a hierarchical time-series analysis structure, including an input layer, a feature enhancement layer, a time-series modeling layer, and an output layer. The input layer receives the link state feature vector and converts it into a tensor format that the model can recognize. The feature enhancement layer is used to enhance the link state features to obtain enhanced link state features. The time-series modeling layer performs time-series modeling on the enhanced link state features, extracts the time-series change features of the link state features, and uses an autoregressive prediction structure to recursively estimate the link state at future time steps. The output layer outputs the link state prediction results within a future preset time window, and also outputs the link fluctuation trend. The link state prediction results include the link delay, link packet loss rate, uplink transmission rate, and downlink transmission rate within the future preset time window. The link fluctuation trend is divided into a stable link state, a fluctuating link state, and a congested link state.
[0017] Specifically, the feature enhancement layer is used to perform multi-dimensional enhancement processing on link state features. First, within a sliding time window, the feature change rate between adjacent time steps is calculated, and the original features are weighted and amplified based on the absolute value of the feature change rate. When a feature maintains the same change direction for multiple consecutive time steps, a trend enhancement coefficient is calculated based on the duration of that change direction, and the corresponding feature is trend-enhanced. Simultaneously, within a preset sliding time window, the correlation coefficient between each link state feature is calculated to construct a feature correlation matrix. The feature correlation matrix is then normalized to obtain the feature correlation weights. Based on the feature association weights, the relevant features are weighted and combined to obtain the enhanced link state features;
[0018] Specifically, the output layer includes a link state prediction branch and a link trend determination branch. The link state prediction branch is used to output the link latency, link packet loss rate, uplink transmission rate, and downlink transmission rate within a future preset time window. The link trend determination branch is used to classify and determine the link fluctuation trend. It normalizes the link state probability using the Softmax function to obtain the probability distribution of the link stable state, link fluctuating state, and link congestion state, and determines the link fluctuation trend based on the maximum probability principle.
[0019] Furthermore, based on historical business behavior data, the downlink data transmission load within a preset time window is estimated, specifically including:
[0020] The system collects downlink command data sent from the server to the terminal device within a historical time period, obtains the command issuance time sequence and corresponding data volume information for multiple historical periods, removes abnormal records from the data, performs periodic statistics on the remaining historical data, calculates the average downlink command issuance period T, and obtains the standard downlink command issuance frequency based on the average issuance period T. ;
[0021] The data size of all downlink instructions within the historical time period is statistically analyzed and classified according to instruction type. The data volume of different types of instructions is weighted and averaged to obtain the standard single instruction data volume S.
[0022] According to the standard, the frequency of distribution is as follows. The historical baseline downlink load can be calculated from the standard single instruction data volume S. As an estimated downlink data transmission load within a future preset time window, it is used to characterize the average downlink data demand of the system under normal communication conditions.
[0023] Furthermore, the transmission requirements of current multi-interface data are obtained, and a bandwidth optimization allocation model is constructed by combining the link status prediction results, link fluctuation trends and estimated downlink data transmission load. Under the constraints of bandwidth resources and link stability, the optimal uplink and downlink bandwidth allocation strategy is calculated.
[0024] To obtain the data transmission requirements of multiple interfaces in the current system, the system monitors the sending queue and data buffer queue of each interface in real time, and calculates the basic sending cycle, average data packet size, and data priority of each interface within the current time window to form a set of data transmission requirements for multiple interfaces. This time window is consistent with the previously mentioned link fluctuation trend and the future preset time window of downlink data transmission load. Assuming the system has N data interfaces, the system calculates the data transmission requirements of each interface based on the... Data generation rate of each interface within the current time window By statistically analyzing the data generation rate of all interfaces, the current uplink data demand load can be obtained. ;
[0025] Furthermore, the optimization objectives are maximized bandwidth resource utilization, conflict-free uplink and downlink transmission, and optimal link stability. Each sub-objective is normalized to ensure that the objective values of each objective function are within a certain range. Within the interval, a comprehensive objective function F is constructed. The larger the value of F, the better the bandwidth allocation strategy. Bandwidth resource utilization rate is used to characterize the efficiency of utilizing the total bandwidth of a link. This is a link stability metric used to characterize the stability of a link after bandwidth allocation. The service demand fulfillment rate is used to characterize how well bandwidth allocation meets the needs of uplink and downlink services. , and The calculation formula is expressed as:
[0026] ,
[0027] ,
[0028] ,
[0029] in, The available bandwidth of the communication link within a preset time window. and These are the uplink bandwidth and downlink bandwidth to be allocated, respectively. and These represent the current uplink data generation rate and the estimated downlink data transmission load, respectively. and These are the uplink bandwidth and downlink bandwidth allocated within the previous preset time window, respectively.
[0030] The link state prediction results within a preset time window t obtained from the communication state analysis model are acquired. Multiple constraints are applied to the multi-objective optimization solution method, including total bandwidth resource constraints and uplink / downlink bandwidth constraints, to ensure that the allocated uplink / downlink bandwidth does not exceed the actual link carrying capacity. Furthermore, the bandwidth allocation range can be adaptively limited based on the predicted link quality. The total bandwidth resource constraints and uplink / downlink bandwidth constraints are expressed as follows:
[0031] ,
[0032] ,
[0033] ,
[0034] in, This is the maximum allowed bandwidth for the uplink. This represents the maximum allowed bandwidth for the downlink.
[0035] Specifically, a redundancy factor is set for the current link based on the link fluctuation trend prediction results. Obtain the theoretical maximum bandwidth of the current communication link. Calculate the available bandwidth of the link. To adjust the theoretical communication bandwidth of the link with a safety margin, it is expressed as: ,in, The range of values is ;
[0036] Specifically, obtain the link packet loss rate predicted by the communication state analysis model. Uplink transmission rate and downlink transmission rate The maximum allowable uplink bandwidth and downlink bandwidth are calculated. By introducing packet loss rate correction, the upper limit of available uplink and downlink bandwidth can be appropriately reduced when link quality degradation is predicted.
[0037] Furthermore, after determining the total bandwidth resource constraints and uplink / downlink bandwidth constraints, the particle swarm optimization algorithm is used to perform multi-objective optimization on the bandwidth allocation model to calculate the optimal uplink / downlink bandwidth allocation strategy. The solution process for the multi-objective optimization is as follows:
[0038] Uplink bandwidth and downlink bandwidth As optimization variables, they are combined to form the position vector of the particle in the search space, meaning that each particle is represented as a set of candidate bandwidth allocation schemes. In the initialization phase, a particle swarm is randomly generated under the conditions of satisfying the total bandwidth resource constraints and uplink / downlink bandwidth constraints, and an initial velocity is set for each particle. The fitness value of the bandwidth allocation scheme corresponding to each particle is calculated by synthesizing the objective function. During the iterative optimization process, the individual optimal position of the particle is updated by comparing the current fitness value with the historical best value, and the global optimal position is determined in the particle swarm. Subsequently, the velocity and position of the particles are updated according to the update rules of the particle swarm optimization algorithm, so that the particles search for a better bandwidth allocation area under the guidance of the individual optimal position and the global optimal position. At the same time, the updated bandwidth combination is constrained and verified to ensure that the total bandwidth resource constraints and uplink / downlink bandwidth range constraints are satisfied. When the preset number of iterations is reached or the change of the optimal solution in multiple consecutive iterations is less than a set threshold, the iteration ends, and the obtained global optimal particle position is used as the optimal bandwidth allocation result to obtain the optimal uplink bandwidth and the optimal downlink bandwidth, thus forming the optimal uplink / downlink bandwidth allocation strategy.
[0039] Furthermore, based on the optimal uplink and downlink bandwidth allocation strategy, a dynamic coupling relationship is established based on the transmission characteristics of multi-interface data, and collaborative bandwidth allocation is performed on multi-interface data to determine the transmission parameters of each interface data, and scheduling and control of uplink monitoring data and downlink control commands are performed.
[0040] First, the transmission characteristic parameters of data from each interface are obtained. The transmission characteristics of data from multiple interfaces are modeled, and the service priority of data from each interface is obtained. Let the service priority of the i-th interface be denoted as . ; Obtain the timeliness requirement coefficient for data from each interface Based on the maximum allowable transmission delay corresponding to each interface service type and the system-set reference transmission delay Determine the timeliness requirement coefficient ;
[0041] By analyzing historical communication data, the average data packet size of the data transmitted through the i-th interface is obtained. and basic transmission period Then the basic data load of this interface Represented as: Basic data load Used to describe the amount of data generated by the interface per unit of time;
[0042] In order to prioritize business Timeliness requirement coefficient and basic data load Next, calculate the initial scheduling weight for each interface. Let the initial scheduling weight of the i-th interface be expressed as... The calculation method is as follows: ;
[0043] Furthermore, an interface coupling matrix is constructed to describe the business relationships between different interfaces. First, the business types to which the data of each interface belongs are classified, and a business association rule table is pre-established based on the business types. This table characterizes the degree of association between two interfaces during bandwidth scheduling, with values ranging from [0,1]. The interface coupling matrix is then constructed based on the business association rule table. ,in, This represents the business association coefficient between the i-th interface and the j-th interface. Specifically, when the i-th interface and the j-th interface belong to the same business type, then... When the i-th interface and the j-th interface belong to different business types, then ,in, This represents the business association coefficient for the corresponding business type combination in the business association rules table;
[0044] The initial scheduling weights of each interface are corrected based on the interface coupling matrix to obtain the final scheduling weights. The scheduling weight of the i-th interface can be expressed as:
[0045] ,
[0046] By statistically analyzing the service relationships between the i-th interface and other interfaces, the initial scheduling weight is adjusted proportionally. Based on this, and according to the scheduling weight of each interface and the optimal uplink bandwidth generated within the current scheduling period, the bandwidth resources of the communication link are dynamically allocated. The bandwidth allocation value obtained by the i-th interface is then determined. Represented as:
[0047] ,
[0048] in, The optimal uplink bandwidth generated within the current scheduling period can be dynamically allocated based on the importance, timeliness, and data size of the interface services using the above bandwidth allocation method. When a certain interface data has a higher service priority or a higher real-time requirement, its corresponding initial scheduling weight will be increased, thereby obtaining a larger bandwidth ratio during the bandwidth allocation process.
[0049] After bandwidth allocation is completed, the system dynamically adjusts the data transmission period of each interface based on the bandwidth resources obtained. Specifically, the basic transmission period of the i-th interface can be obtained as follows: Its basic bandwidth requirements Numerically equal to its base data load When the interface actually obtains bandwidth At this time, the system reduces the data transmission frequency of this interface by extending the transmission period, and its actual transmission period Represented as: In this way, when the link bandwidth is insufficient, the data transmission cycle of low-priority or low-timeliness interfaces will be automatically extended, thereby reducing the link load. When the bandwidth resources are sufficient or the link bandwidth is restored, the transmission cycle of each interface will be maintained or gradually restored to the basic transmission cycle. After completing the bandwidth allocation and dynamic adjustment of the transmission cycle of multi-interface data, a data transmission scheduling queue is established according to the transmission parameters of each interface to uniformly schedule the uplink data of multiple interfaces.
[0050] Furthermore, after completing the dynamic coupling adaptation of multi-interface data, the operating status of the communication link is monitored in real time. When a communication anomaly is detected, anomaly handling and scheduling adjustment are performed to ensure the stability of multi-interface data communication.
[0051] The communication anomalies are determined based on data packet loss rate, data transmission delay, and data sending queue status, and are classified into data loss anomalies, transmission delay anomalies, and link congestion anomalies.
[0052] Specifically, monitor the data sending queue length in real time. Average data transmission delay D and data packet loss rate Link operation metrics are proportionally converted using preset thresholds, ensuring all metrics are dimensionless and within a uniform numerical range. Link congestion assessment metrics are then calculated based on these metrics, with packet loss rate thresholds set for each. Transmission delay threshold Send queue length threshold and congestion threshold Determine the communication status: when the conditions are met The current situation is determined to be a data loss anomaly; when the condition is met... The current situation is determined to be an abnormal transmission delay; when Or the link congestion index meets The system determines that the current link is congested; when any of the above conditions are met, the communication anomaly handling mechanism is triggered.
[0053] For data loss anomalies, first determine the interface to which the abnormal data belongs, and then determine the data processing method based on the data's timeliness status indicators, by obtaining the data generation time. The current time is Maximum transmission latency of the interface to which the data belongs The remaining valid time of the calculated data is recorded as the timeliness status index. When satisfied When the condition is met, the data is added back to the data sending queue for retransmission. If the data is in such a state, discard it directly.
[0054] For transmission delay anomalies and link congestion anomalies, the transmission cycle of multiple interfaces is dynamically adjusted according to the bandwidth allocation ratio of each interface. By appropriately extending the data transmission cycle of the interface, the amount of data transmitted per unit time is reduced. Interfaces with a larger bandwidth occupancy ratio will receive a larger transmission cycle adjustment range under link congestion conditions, thereby reducing the amount of data transmitted per unit time and effectively alleviating the link load.
[0055] In the case of link congestion, a sending queue control and scheduling optimization mechanism is also executed; when the data sending queue length exceeds the sending queue length threshold... At that time, data is filtered in the data sending queue according to the interface priority, prioritizing the retention of data from high-priority interfaces and discarding data exceeding the sending queue length threshold. Low-priority data is sent to the interface, and the data sending queue is reordered according to the interface priority. The data is then sent using a priority scheduling method, so that high-priority interface data is sent through the communication link first.
[0056] Furthermore, after the device executes the downlink control command, it encapsulates the device feedback result into uplink feedback data and marks it as the highest priority data. It then uses the uplink link to transmit the data back to the server. After receiving the device feedback result, the server adjusts the subsequent control command issuance strategy based on the control execution status and link operation. At the same time, it updates the communication scheduling parameters based on the device feedback result, including the weight parameters in the bandwidth allocation algorithm and the multi-interface data interaction frequency. This allows the communication resource scheduling strategy to be dynamically optimized according to the actual operating conditions.
[0057] On the other hand, this invention provides a multi-interface data interaction module, which serves as an integrated end-side data processing device. It can simultaneously act as a data transmitter and receiver, establishing a wireless bidirectional communication link with a remote server to complete the uplink transmission of industrial field data and the downlink reception and execution of server commands. This module includes a main control unit, a multi-interface management unit, a communication unit, a status monitoring unit, a data scheduling unit, and a fault self-recovery unit. The units are electrically connected through bus circuits and signal circuits. Specifically, it includes:
[0058] As the core control unit, the main control unit establishes electrical connections with other units via bus circuits to manage system operation status, configure parameters, and coordinate tasks among functional units. During system operation, the main control unit receives link status information collected by the status monitoring unit, interface status information uploaded by the multi-interface management unit, and communication status information from the communication unit. It manages and records this information uniformly and issues control commands to each functional unit based on the current system operation status to achieve collaborative operation during multi-interface data interaction. Specifically, the industrial field interface data received by the multi-interface management unit is directly sent to the data scheduling unit for scheduling processing via the internal data bus. The data scheduling unit generates bandwidth adaptation strategies and data transmission parameters for each interface and sends the scheduled data to the communication unit for protocol encapsulation and wireless link transmission. The main control unit only manages the operation status and coordinates tasks in the above process.
[0059] During downlink communication, the communication unit receives control data from the remote server and sends it to the data scheduling unit for priority determination and scheduling. The data scheduling unit sends the control data to the multi-interface management unit for execution according to the control command type. When the control data involves adjustments to communication parameters or system operating parameters, the data scheduling unit synchronizes the relevant information to the main control unit, which then updates and manages the system operating parameters in a unified manner.
[0060] In addition, the main control unit synchronizes the interface connection status table data of the multi-interface management unit to form a global interface ledger, which uniformly manages the identification information, interface type, data transmission parameters and historical interaction status of each interface, and provides the interface management information to the data scheduling unit as a reference for scheduling decisions. When an abnormal signal is received from the status monitoring unit, the main control unit triggers corresponding control operations according to the abnormality type, including sending a scheduling strategy adjustment instruction to the data scheduling unit, or triggering the fault self-recovery unit to perform abnormal handling operations.
[0061] The multi-interface management unit is used to access multiple heterogeneous industrial equipment communication interfaces and manage them uniformly. It is used to collect various monitoring data in the industrial field, execute control commands, and upload equipment feedback data. This unit is configured with at least two analog quantity interaction circuits and at least one serial communication circuit. Each circuit is independently designed and equipped with signal isolation circuits, voltage and current limiting protection circuits, and parameter configuration circuits. Each interface circuit is electrically connected to the module's internal data bus through the signal isolation circuit. Specifically, the multi-interface management unit has a built-in interface registration management circuit. After the module is powered on, it automatically scans all connected analog quantity interfaces and serial communication interfaces, automatically registers the detected interfaces, assigns a unique identifier ID to each interface, collects the hardware parameter information of the interfaces, records the corresponding data transmission parameters, and establishes an interface connection status table. The interface connection status table is updated according to a preset period. When a change in the interface connection status is detected, it is updated immediately and synchronized to the main control unit via the internal data bus for unified management. It is also provided to the data scheduling unit as a reference for generating data scheduling strategies.
[0062] The communication unit is used to establish a wireless communication link with a remote server, enabling uplink data transmission and downlink data reception. This unit includes a radio frequency transceiver circuit, an antenna interface circuit, and a multi-protocol driver circuit. It is connected to the data scheduling unit via an internal data bus and to the status monitoring unit via a status information bus. It is used to complete wireless signal transmission and reception, communication protocol encapsulation and parsing, and link status parameter acquisition. Specifically, after receiving a data frame from the data scheduling unit, the communication unit encapsulates the data using the multi-protocol driver circuit and transmits it to the remote server via the radio frequency transceiver circuit. Simultaneously, it receives downlink data from the wireless link, parses it to form standardized data frames, and sends them to the data scheduling unit for further processing. Furthermore, the communication unit collects raw link status parameters according to a preset period, including but not limited to signal strength, signal-to-noise ratio, uplink and downlink rates, packet loss rate, link latency, SIM card status, and server connection status, and transmits these parameters to the status monitoring unit via the status information bus.
[0063] The status monitoring unit is used to monitor and analyze the communication link status, interface operation status, and data transmission status in real time, providing a basis for the data scheduling unit and system anomaly handling. This unit is connected to the communication unit, multi-interface management unit, and data scheduling unit through a status information bus to acquire system operation status data. Specifically, the status monitoring unit receives raw link status parameters collected by the communication unit, preprocesses and extracts features from the raw link status parameters to generate link status features, and evaluates the communication stability within a preset time window based on the built-in communication status analysis model, predicting link fluctuation trends and communication status. At the same time, the status monitoring unit receives interface status information from the multi-interface management unit, monitors and analyzes the working status of each interface, determines whether the interface is in normal working condition, and identifies interface fault conditions.
[0064] In addition, the status monitoring unit acquires real-time data transmission status information from the data scheduling unit, including data transmission queue length, data transmission latency, and data packet loss rate. Based on this information, it identifies communication anomalies. When a communication status anomaly is detected, it classifies the anomaly type. For runtime anomalies that can be resolved through scheduling strategy adjustments, the anomaly information is directly sent to the data scheduling unit for adjusting the data scheduling strategy. For fault-level anomalies that affect the stable operation of the system, an anomaly signal is sent to the main control unit, which triggers the fault self-recovery unit to perform anomaly handling operations. The status monitoring unit also includes a status indicator circuit for displaying the module's operating status.
[0065] The data scheduling unit is used to dynamically allocate communication link bandwidth resources and achieve multi-interface data collaborative scheduling based on link fluctuation trends, estimated downlink data transmission load, and multi-interface data transmission requirements. This unit is connected to the multi-interface management unit, communication unit, and status monitoring unit via a data bus, and is used to receive interface data and link status information and output the scheduled data. Specifically, the data scheduling unit receives multi-interface data frames and corresponding data transmission characteristic parameters from the multi-interface management unit, and receives predicted link fluctuation trends and estimated downlink data transmission loads from the status monitoring unit. It also receives the transmission characteristics and data transmission requirements of multi-interface data from the multi-interface management unit. Under the constraints of bandwidth resources and link stability, it dynamically allocates uplink and downlink bandwidth resources of the communication link. During the bandwidth allocation process, it calculates the scheduling weight of each interface data based on the built-in dynamic coupling algorithm. Based on this, it calculates the bandwidth allocation result of each interface within the current preset time window and generates corresponding data transmission parameters to achieve orderly transmission of multi-interface data and dynamic coordination of bidirectional communication.
[0066] In addition, when the status monitoring unit detects runtime communication anomalies such as link congestion, transmission delay, or data packet loss, the data scheduling unit dynamically adjusts the current scheduling strategy based on the anomaly information.
[0067] The fault self-recovery unit is used to recover from fault-level anomalies generated during system operation, ensuring that the communication module can quickly resume normal operation under abnormal conditions. This unit is connected to the main control unit via the control bus and to the communication unit and data scheduling unit via data interfaces, respectively. It is used to perform fault recovery and data retransmission operations. Specifically, the fault self-recovery unit includes an anomaly handling circuit, a hardware watchdog circuit, a reset circuit, and a data retransmission circuit. The anomaly handling circuit receives the anomaly signal transmitted by the main control unit and executes the corresponding recovery strategy according to the anomaly type. The hardware watchdog circuit and the reset circuit are used to construct a hardware-level self-recovery mechanism. The data retransmission circuit is used to retransmit data that was not successfully transmitted due to abnormal interruption.
[0068] Compared with the prior art, the significant advantages of this invention are:
[0069] 1. By constructing a communication state analysis model, the link fluctuation trend within a preset time window is predicted. At the same time, the downlink data transmission load is estimated based on historical service behavior data, thereby constructing a bandwidth optimization allocation model. This enables the allocation of uplink and downlink bandwidth resources to adapt to changes in link state in advance, improving the stability and reliability of wireless communication links in complex environments.
[0070] 2. By establishing a dynamic coupling relationship between the data transmission characteristics of multiple interfaces and bandwidth resources, bandwidth resources are allocated collaboratively according to the service priority, timeliness requirements and basic data load of each interface data, so as to realize the adaptive scheduling of multi-interface data. Even under the condition of limited bandwidth or link fluctuation, it can still ensure the priority transmission of critical data and improve the overall communication efficiency of the system.
[0071] 3. Design a multi-interface data interaction module to realize the coordinated operation of multi-interface data acquisition, link status monitoring, multi-interface dynamic scheduling and fault self-recovery, so that the end-side device can simultaneously complete the uplink monitoring data transmission and downlink control command reception and execution, thereby improving the real-time performance, stability and system integration of industrial field data communication. Attached Figure Description
[0072] Figure 1 This is a flowchart of a stable bidirectional communication method according to the present invention;
[0073] Figure 2 This is a flowchart of the communication status analysis and dynamic bandwidth allocation process in this invention;
[0074] Figure 3This is a flowchart of the multi-interface collaborative scheduling process in this invention;
[0075] Figure 4 This is a schematic diagram of the logical structure of a multi-interface data interaction module according to the present invention. Detailed Implementation
[0076] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0077] This invention discloses a stable bidirectional communication method and a multi-interface data interaction module, which is applicable to scenarios such as industrial equipment control, status detection, and sensor data acquisition that achieve bidirectional communication with a server via a 4G network.
[0078] Example 1
[0079] like Figure 1 As shown, this invention discloses a stable bidirectional communication method, comprising the following steps:
[0080] Real-time acquisition of communication link status data; multi-dimensional signal-to-noise ratio separation and feature extraction of the communication link status data to obtain link status features;
[0081] The link status characteristics are input into the preset communication status analysis model to predict the link status changes within the preset time window, obtain the link status prediction results and link fluctuation trends, and estimate the downlink data transmission load within the preset time window based on historical business behavior data.
[0082] Obtain the current transmission load of multi-interface data, combine it with the estimated downlink data transmission load, construct a bandwidth optimization allocation model, and calculate the optimal uplink and downlink bandwidth allocation strategy under the constraints of link fluctuation trend and link status prediction results.
[0083] Based on the optimal uplink and downlink bandwidth allocation strategy, a dynamic coupling relationship is established based on the transmission characteristics of multi-interface data, and collaborative bandwidth allocation is performed on multi-interface data to determine the transmission parameters of each interface data.
[0084] Real-time monitoring of communication anomalies; when data loss, link congestion, or transmission delay occurs, corresponding scheduling adjustments or anomaly recovery processing are performed based on the anomaly type.
[0085] In this embodiment, before data acquisition, based on the preset industrial communication interface specifications, the various types of communication interfaces to be accessed are initialized and configured to meet the needs of multi-source heterogeneous data interaction in industrial sites, and a registration management mechanism is established, including but not limited to analog data interaction interfaces, serial communication data interfaces, basic data interaction frequencies and data format parsing rules. During the initialization process, the logical connectivity of each interface is verified, such as incompatible communication protocol versions or duplicate data format parsing rules.
[0086] Each initialized communication interface is assigned a unique interface identifier, which includes interface type code, data transmission direction code, and data priority code. An interface registration ledger is established synchronously, recording each interface identifier, interface type, data transmission parameters, and historical interaction status. For example, with an interface monitoring cycle of 100ms, status parameters such as logical connectivity, data parsing success rate, and maximum allowable transmission delay are collected for each interface. If an interface experiences data parsing failure or transmission delay exceeding a preset delay threshold for three consecutive cycles, the interface is marked as "abnormal and pending investigation," and the data transmission ratio of that interface is automatically limited. The transmission restriction is automatically lifted after the status recovers. The preset delay threshold is set according to the real-time requirements of the business or the historical communication delay statistics, for example, it can be set to a range of 300-500ms.
[0087] Furthermore, industrial communication link status data is collected in real time, preprocessed and normalized, and multi-dimensional signal-to-noise ratio separation and feature extraction are performed to obtain link status features.
[0088] In this embodiment, parameters that have a core impact on data transmission quality in industrial communication links are selected as the data collection objects, specifically including signal strength (RSRP), signal-to-noise ratio (SINR), link delay, uplink and downlink transmission rates, and packet loss rate. The specific implementation includes: collecting basic state parameters of the wireless communication link through a communication terminal, including signal strength, signal-to-noise ratio, and uplink and downlink transmission rates; simultaneously, statistically analyzing the sending and receiving of data packets during transmission; and statistically analyzing packet loss rate and link delay within a preset time window. Each parameter is a real-time valid parameter of the bidirectional communication link, used to characterize the transmission efficiency and stability of the communication link. Based on the actual working conditions in the industrial field, a basic data collection cycle is designed. During the collection process, a unique timestamp is added to each set of collected link state data, and outlier removal, data completion, and normalization are performed to eliminate invalid values, missing values, and dimensional differences in the original collected data, resulting in a link state sequence.
[0089] Because industrial environments are subject to various interference factors such as electromagnetic interference, temperature drift, and power supply fluctuations, these interferences are coupled into the original communication link state data, causing the data to fail to reflect the true link state. Considering the characteristics of interference in industrial environments, coupled disturbances can be categorized into electromagnetic interference, power supply fluctuation interference, and low-frequency drift interference. Based on the characteristics of these multiple interference factors, this embodiment performs multi-dimensional signal-to-noise ratio separation on the link state sequence. A targeted interference separation algorithm separates the true link signal from various interference signals, eliminating the impact of interference on the link state data. As an optional implementation method, this includes:
[0090] A wavelet decomposition and reconstruction algorithm is used to perform multi-scale decomposition of the link state sequence, decomposing the data into signal components of different frequencies. The high-frequency disturbance component mainly consists of instantaneous interference signals caused by electromagnetic interference and power supply fluctuations, while the low-frequency interference component mainly consists of slowly varying interference signals caused by low-frequency drift interference. A hard threshold filtering strategy is used to denoise the high-frequency disturbance component, eliminating high-frequency interference and retaining the effective high-frequency component. A soft threshold filtering strategy is used to smooth the low-frequency interference component, eliminating the influence of slowly varying drift and obtaining the effective low-frequency component. The high-frequency effective component and the low-frequency effective component after interference removal are reconstructed by wavelet to obtain the effective link state data after interference removal. At the same time, the signal-to-noise ratio (SNR) improvement rate of the reconstructed data is calculated. If the SNR improvement rate is less than 10%, it is determined that the interference removal is insufficient. The scale parameters of the wavelet decomposition are readjusted, and the separation and reconstruction operation is performed again until the SNR improvement rate is ≥10%, ensuring that the interference is effectively suppressed.
[0091] Furthermore, feature extraction processing is performed on the reconstructed link state sequence after multi-dimensional noise separation. Multi-dimensional link state feature vectors representing the communication state are extracted at multiple time scales, specifically including:
[0092] Calculate the statistical characteristics of each link state parameter within a preset sliding time window. The parameters include the mean, variance, and rate of change between adjacent time steps, used to characterize the fluctuation of the link state. Trend analysis is performed on the link state sequence within the sliding time window, and trend features of the link state sequence are extracted using a trend fitting method. The link state sequence is subjected to first-order difference to identify abrupt change segments. Feature encoding is performed on the identified abrupt change segments to extract the amplitude, duration, and frequency of the abrupt changes, thereby obtaining the fluctuation characteristics characterizing the link state. Based on the above, the statistical characteristics of each link state parameter are... Trend characteristics and fluctuation characteristics The links are combined to construct multi-dimensional link state features, which are then normalized. Finally, the original link state parameters are concatenated with the multi-dimensional link state features to form a link state feature vector X(t) in a unified format.
[0093] like Figure 2 As shown, the link state characteristics are input into a preset communication state analysis model to predict the changes in link state within a preset time window in the future, and the link state prediction results and link fluctuation trends are obtained.
[0094] Specifically, the communication state analysis model adopts a hierarchical time-series analysis structure, including an input layer, a feature enhancement layer, a time-series modeling layer, and an output layer. The input layer receives link state feature vectors and performs secondary verification, converting the link state feature vectors into a tensor format recognizable by the model. The feature enhancement layer enhances the link state features to obtain enhanced link state features. The time-series modeling layer performs time-series modeling on the enhanced link state features, extracts the time-series change features of the link state features, and uses an autoregressive prediction structure to recursively estimate the link state at future time steps. The output layer generates link state prediction results within a preset future time window and simultaneously outputs the link fluctuation trend. The link state prediction results include link latency, link packet loss rate, uplink transmission rate, and downlink transmission rate within the preset future time window. The link fluctuation trend is divided into a stable link state, a fluctuating link state, and a congested link state.
[0095] Specifically, the feature enhancement layer is used to perform multi-dimensional enhancement processing on link state features. First, within the sliding time window, the feature change rate between adjacent time steps is calculated, and the original features are weighted and amplified based on the absolute value of the feature change rate, making the model pay more attention to abnormal fluctuations in the link state. When a feature maintains the same change direction for multiple consecutive time steps, a trend enhancement coefficient is calculated based on the duration of that change direction, and the corresponding feature is trend-enhanced. At the same time, within the preset sliding time window, the correlation coefficient between each link state feature is calculated to construct a feature correlation matrix, and the feature correlation matrix is normalized to obtain the feature correlation weights. Based on the feature association weights, the relevant features are weighted and combined to obtain the enhanced link state features;
[0096] Specifically, the time-series modeling layer uses a recurrent neural network structure to perform time-series modeling of the enhanced link state features, extracts the dynamic change patterns of the enhanced link state features in the time dimension, performs historical dependency modeling of the link state through multi-time-step sequence input, and, based on an autoregressive prediction structure, uses the prediction result of the previous time step as one of the inputs of the next time step to recursively predict the link state indicators for multiple future time steps, thereby obtaining the prediction results including link latency, link packet loss rate, and uplink and downlink transmission rates within a future preset time window;
[0097] Specifically, the output layer includes a link state prediction branch and a link trend determination branch. The link state prediction branch is used to output the link latency, link packet loss rate, uplink transmission rate, and downlink transmission rate within a future preset time window. The link trend determination branch is used to classify and determine the link fluctuation trend. It normalizes the link state probability using the Softmax function to obtain the probability distribution of the link stable state, link fluctuating state, and link congestion state, and determines the link fluctuation trend based on the maximum probability principle.
[0098] Furthermore, the communication status analysis model is trained based on historical communication link data. Specifically, historical communication link status data is collected, time series samples are constructed using a sliding time window, and link status features are extracted to construct a training dataset. The dataset is divided into training, validation, and test sets in a 7:2:1 ratio, with the historical feature sequence as input and the link status at future time steps as the prediction target. The training set is used for model parameter learning, the validation set is used for model hyperparameter adjustment and early stopping control, and the test set is used to evaluate the final performance of the model. Iterative optimization is used to update the model parameters, specifically using the Adam adaptive optimization algorithm to iterate the parameters. The initial learning rate is set to 0.001, the training batch size is 64, and the maximum training epochs are 150. The training process uses learning rate decay optimization with a decay rate of 0.8. When the validation set loss value no longer decreases after 5 consecutive training epochs, the learning rate is decayed according to the decay rate. If the validation set loss value does not decrease for 10 consecutive epochs, the early stopping mechanism is triggered. After training is terminated, the optimal model parameters are saved to obtain the trained communication status analysis model.
[0099] Specifically, the communication state analysis model employs a joint loss function. During training, the joint loss function Including mean squared error loss and trend cross-entropy loss , represented as:
[0100] ,
[0101] Among them, the mean squared error loss Trend cross-entropy loss is used to measure the numerical error between the predicted link state and the actual value. Used to measure the difference between the predicted link fluctuation trend and the actual trend state; and The weighting coefficient is adjusted based on the changes in prediction error and link fluctuation trend classification loss in the validation set.
[0102] Furthermore, the downlink data transmission load within a preset time window is estimated based on historical business behavior data;
[0103] Estimating downlink data transmission load refers to the expected total data volume, transmission rate requirement, and bandwidth occupancy percentage of downlink control commands within a preset future time window. In this embodiment, for industrial low-bandwidth scenarios, downlink control commands are mainly periodic commands supplemented by event-triggered commands. The downlink control commands exhibit periodic patterns. By collecting historical downlink control commands and performing statistical analysis, core patterns are extracted to form a historical downlink behavior baseline, which serves as the basis for estimating downlink data transmission load. Specifically, this includes:
[0104] The system collects and statistically analyzes downlink control commands sent from the server to the terminal device within a historical time window, obtains the downlink command issuance time sequence and corresponding data volume information within multiple historical periods, and performs abnormal data removal processing. Abnormal data includes data records with abnormal delays or sudden issuances due to network failures, system restarts, or link interruptions. The remaining historical data is periodically statistically analyzed to calculate the average issuance period T of the downlink control commands. The average issuance period can be obtained by averaging the time intervals between two adjacent downlink command issuances within a preset historical period. After obtaining the average issuance period T, the standard issuance frequency can be further calculated. Its expression is:
[0105] ,
[0106] Where T represents the average distribution cycle within the historical statistical period, based on the obtained standard distribution frequency. Subsequently, the data volume of historical downlink control commands is statistically analyzed to calculate the standard single command data volume S. Specifically, the data size of all downlink commands within the historical statistical time window is statistically analyzed and classified according to command type. The data volume of different types of commands is weighted and averaged to obtain the standard single command data volume S. The weights can be set according to command priority or business importance to reflect the proportion of different businesses in the overall communication. For example, in an IoT control scenario, downlink commands include device status query commands, parameter configuration commands, and control execution commands. Device status query commands typically have a small data volume and a high sending frequency, so a weight of 0.3 can be set. Parameter configuration commands have a relatively large data volume but a low sending frequency, so a weight of 0.2 can be set. Control execution commands are used to trigger device actions, have a high business importance, and a moderate data volume, so a weight of 0.5 can be set. By weighting and averaging the data volume of each type of command according to their respective weights, the standard single command data volume of the system can be obtained.
[0107] Based on the standard distribution frequency The historical baseline downlink load can be calculated from the standard single instruction data volume S. This is used to characterize the average downlink data demand under normal communication conditions, and its calculation formula is:
[0108] ,
[0109] in, The historical baseline downlink data load is represented by the above calculations, which yield the system's basic downlink data requirements under typical business behavior conditions. The historical baseline downlink data load is then used as the estimated downlink data transmission load within a future preset time window.
[0110] Furthermore, the transmission requirements of current multi-interface data are obtained, and a bandwidth optimization allocation model is constructed by combining the link status prediction results, link fluctuation trends and estimated downlink data transmission load. Under the constraints of bandwidth resources and link stability, the optimal uplink and downlink bandwidth allocation strategy is calculated.
[0111] After completing the prediction of link fluctuation trends and the estimation of downlink data transmission load, it is necessary to schedule and allocate communication bandwidth under the constraints of actual communication resources to ensure stable bidirectional communication between uplink data and downlink control commands. In this embodiment, the current multi-interface data transmission requirements focus on the real-time uplink transmission requirements of multi-interface heterogeneous data in industrial low-bandwidth scenarios. Accurate acquisition is achieved through real-time statistics. The bandwidth optimization allocation model takes conflict-free uplink and downlink transmission, stable link status, and maximized resource utilization as multiple objectives. Combining the obtained link fluctuation trends within the future expected time window, predicted communication status, and estimated downlink data transmission load, a multi-constraint multi-objective optimization model is constructed. The multi-objective optimization algorithm is used to solve the model to obtain the optimal uplink and downlink bandwidth allocation ratio and specific bandwidth values. The specific implementation steps are as follows:
[0112] To obtain the transmission requirements of multiple interfaces in the current system, in actual communication there are usually multiple data interfaces, such as multiple monitoring data interfaces, control command interfaces, status feedback interfaces and log data interfaces, etc. Each interface corresponds to different types of data streams. By monitoring the sending queue and data buffer queue of each interface in real time, the basic sending cycle, average data packet size and data priority of each interface within the current time window are statistically analyzed to form a set of multi-interface data transmission requirements. The time window is consistent with the future preset time window of the aforementioned link fluctuation trend and downlink data transmission load.
[0113] Suppose the system has N data interfaces. Calculate the data transmission requirements of each interface. Data generation rate of each interface within the current time window By statistically analyzing the data generation rate of all interfaces, the current uplink data demand load can be obtained. For example, in a specific implementation scenario, the uplink monitoring data interface generates data at a rate of 1.5 Mbps, and the status feedback interface generates data at a rate of 0.5 Mbps. Therefore, the current uplink data demand load of the system is approximately 2 Mbps.
[0114] Furthermore, with the multiple optimization objectives of maximizing bandwidth resource utilization, eliminating uplink and downlink transmission conflicts, and optimizing link stability, each sub-objective is normalized to ensure that the objective values of each objective function are within a certain range. Within the interval, construct the comprehensive objective function, expressed as:
[0115] ,
[0116] in, , and These are the weight coefficients for the objective function, set according to the needs of industrial business scenarios. They reflect the importance of different optimization objectives in industrial communication scenarios and are determined based on the specific requirements of industrial business scenarios to meet certain conditions. F is the objective function value; the larger the value, the better the bandwidth allocation strategy. The calculation formulas for each objective function are as follows:
[0117] ,
[0118] ,
[0119] ,
[0120] in, The available bandwidth of the communication link within a preset time window. To determine bandwidth resource utilization, normalization is performed using the theoretical maximum utilization rate, which is set to 1. This is the normalized bandwidth resource utilization rate, used to characterize the utilization efficiency of the total link bandwidth; The normalization formula for the link stability index is: , This is a normalized link stability metric used to characterize the stability of a link after bandwidth allocation. The normalization formula for the business requirement fulfillment rate is: , This is the normalized service demand fulfillment rate, used to characterize how bandwidth allocation can meet uplink and downlink service demands as much as possible. and These are the uplink bandwidth and downlink bandwidth to be allocated, respectively. and These are the estimated uplink data demand load and downlink data transmission load, respectively. and These are the uplink bandwidth and downlink bandwidth allocated within the previous preset time window, respectively.
[0121] The link state prediction results within a preset time window t obtained from the communication state analysis model are acquired. Multiple constraints are applied to the multi-objective optimization solution method, including total bandwidth resource constraints and uplink / downlink bandwidth constraints, to ensure that the allocated uplink / downlink bandwidth does not exceed the actual link carrying capacity. Furthermore, the bandwidth allocation range can be adaptively limited based on the predicted link quality. The total bandwidth resource constraints and uplink / downlink bandwidth constraints are expressed as follows:
[0122] ,
[0123] ,
[0124] ,
[0125] in, This is the maximum allowed bandwidth for the uplink. This represents the maximum allowed bandwidth for the downlink.
[0126] Specifically, the available bandwidth capacity of the communication link within a preset time window is determined based on the link fluctuation trend prediction results. The link fluctuation trend reflects the changing trend of the communication link quality within the preset time window, such as link stability, link fluctuation, or link congestion. A redundancy factor is then set for the current link based on the link fluctuation trend prediction results. Obtain the theoretical maximum bandwidth of the current communication link. Calculate the available bandwidth of the link. To adjust the theoretical communication bandwidth of the link with a safety margin, it is expressed as:
[0127] ,
[0128] in, This is the redundancy coefficient, and its value range is... For example, when the predicted link is stable, the redundancy factor A small amount of redundancy is reserved to cope with sudden data fluctuations. When predicting link fluctuations, the redundancy coefficient is increased. The redundancy is moderate, balancing link stability and bandwidth utilization. When link congestion is predicted, the redundancy coefficient is [value missing]. If the link quality is poor, more redundancy is reserved to alleviate congestion and prioritize link stability. In this way, bandwidth resources are constrained during the bandwidth allocation process to reserve a certain bandwidth margin for possible link fluctuations and improve the stability of the communication system.
[0129] Specifically, obtain the link packet loss rate predicted by the communication state analysis model. Uplink transmission rate and downlink transmission rate The maximum allowed uplink bandwidth and the maximum allowed downlink bandwidth are calculated and expressed as follows:
[0130] ,
[0131] ,
[0132] By introducing packet loss rate correction, the upper limit of available uplink and downlink bandwidth can be appropriately reduced when a link quality degradation is predicted, thereby reducing data retransmission or congestion caused by link instability.
[0133] Furthermore, after determining the total bandwidth resource constraints and uplink / downlink bandwidth constraints, the particle swarm optimization algorithm is used to perform multi-objective optimization on the bandwidth allocation model to calculate the optimal uplink / downlink bandwidth allocation strategy. The solution process for the multi-objective optimization is as follows:
[0134] Uplink bandwidth and downlink bandwidth As optimization variables, they are combined to form the position vector of the particle in the search space, meaning that each particle is represented as a set of candidate bandwidth allocation schemes. ;
[0135] During the initialization phase, under the conditions of satisfying the total bandwidth resource constraints and uplink and downlink bandwidth constraints, several particles are randomly generated to form an initial particle swarm, and each particle is assigned an initial velocity to represent the direction of change of the bandwidth allocation scheme in the search space. At the same time, the bandwidth allocation scheme corresponding to the current position of each particle is substituted into the multi-objective optimization function to calculate the comprehensive objective function value.
[0136] Then, the iterative optimization phase begins. In each iteration, the comprehensive objective function value corresponding to the current position of each particle is calculated and compared with the best comprehensive objective function value obtained by the particle in history. When the current comprehensive objective function value is better than the best comprehensive objective function value in history, the best historical position of the particle is updated. At the same time, the position of the particle with the largest objective function value in the entire particle swarm is selected as the current global best position.
[0137] Subsequently, according to the update rules of the particle swarm optimization algorithm, the velocity and position of each particle are updated, so that the particles gradually move to a better bandwidth allocation area under the joint guidance of their own historical best position and global best position. After updating the particle position, the new bandwidth combination needs to be constrained and verified. When the bandwidth constraint conditions are not met, the particle position range is restricted or remapped to the search space for correction, so as to ensure that the updated bandwidth combination still meets the total bandwidth resource constraints and the maximum uplink and downlink bandwidth constraints.
[0138] During continuous iteration, the particle swarm will continuously adjust the bandwidth allocation scheme in the search space and gradually approach the optimal solution of the objective function. When the preset number of iterations is reached or the change of the optimal solution in multiple consecutive iterations is less than the set threshold, the iteration process ends, and the currently obtained global optimal particle position is taken as the optimal bandwidth allocation result, that is, the optimal uplink bandwidth and the optimal downlink bandwidth are obtained, thus forming the optimal uplink and downlink bandwidth allocation strategy.
[0139] For example, in a low-bandwidth, multi-interface warehouse monitoring scenario, eight communication interfaces are deployed within the warehouse to connect to various industrial devices, including temperature sensors, humidity sensors, pressure sensors, equipment start / stop modules, environmental gas monitoring modules, and video surveillance modules. These multi-interface industrial terminals interact with the server via wireless communication links. The theoretical maximum bandwidth of the communication link is 10Mbps. A communication status analysis model is used to analyze historical communication link status data and, combined with current link status characteristics, predict the communication link status within a preset time window. For instance, the model predicts that the link status will be stable within the next 5 seconds, with an average signal-to-noise ratio of 15dB, an average network latency of approximately 80ms, and a packet loss rate of approximately 5%. The predicted uplink achievable transmission rate is 7 Mbps, and the predicted downlink achievable transmission rate is 3 Mbps. Based on these predictions, the effective available bandwidth of the communication link within the future time window can be calculated to be 9 Mbps. Furthermore, based on the link status prediction, the maximum uplink bandwidth is estimated to be approximately 6.65 Mbps, and the maximum downlink bandwidth is estimated to be approximately 2.85 Mbps. Further estimation of the downlink data transmission load is based on historical service behavior data. For example, by statistically analyzing historical data on the server's issuance of control commands and scheduling information to industrial terminals over a recent period, the average issuance cycle of downlink control commands is found to be 2 seconds, and the average data size of a single control command is 50 bytes. Therefore, the basic downlink load per unit time can be calculated to be approximately 25 bytes. In addition, in the warehouse monitoring system, the server also periodically issues management data such as equipment parameter configuration commands, threshold adjustment commands, and status synchronization data packets to the terminals. Statistical analysis shows that this type of data generates an average downlink transmission demand of approximately 15 bytes / s. Therefore, by statistically summarizing various downlink service data, the current system's basic downlink data transmission load can be estimated to be approximately 40 bytes / s.
[0140] The data transmission requirements of 8 communication interfaces are acquired in real time. The statistical period is consistent with the preset time window of 5 seconds. The transmission requirements of the 8 communication interfaces are summarized to obtain the total uplink transmission requirements of the current warehouse scenario, which is at least 400 bytes / second.
[0141] The bandwidth optimization model is solved using the particle swarm optimization algorithm, with a particle swarm size of 50, a maximum number of iterations of 100, and a learning factor of [missing information]. , Inertial weight The particle dimension is 2, and the particle value range is within the above constraints. The comprehensive objective function F is used as the fitness function of the particle swarm optimization algorithm. The larger the fitness value, the better the bandwidth allocation scheme corresponding to the particle.
[0142] In each iteration, the fitness value of each particle is calculated, and the individual optimal solution and global optimal solution of each particle are recorded. Based on the individual optimal solution and global optimal solution, the velocity and position of the particles are updated to ensure that the particles are always within the constraints. When the number of iterations reaches the maximum number of iterations, or when the global optimal solution remains unchanged for 10 consecutive iterations, the iteration is stopped, and the optimal uplink and downlink bandwidth allocation value is obtained.
[0143] like Figure 3 As shown, a dynamic coupling relationship is established based on the optimal uplink and downlink bandwidth allocation strategy and the transmission characteristics of multi-interface data. Coordinated bandwidth allocation is performed on multi-interface data to determine the transmission parameters of each interface data, and scheduling and control of uplink monitoring data and downlink control commands are performed.
[0144] In this embodiment, in order to achieve adaptive adaptation between link status and multi-interface data transmission, a dynamic coupling model between communication link status parameters and multi-interface data transmission parameters is constructed. The dynamic coupling model is used to describe the correlation between the data service characteristics of each interface and bandwidth allocation, so that the system can adaptively schedule each interface data according to the importance and timeliness requirements of different interface data based on the optimal uplink and downlink bandwidth allocation strategy.
[0145] Specifically, the transmission characteristic parameters of each interface data are first obtained, and the transmission characteristics of multiple interface data are modeled. Assuming the system contains N data interfaces, and considering the differences in business importance, real-time requirements, and data scale among the interface data, the transmission characteristics of each interface are quantitatively described to establish the scheduling weights of the interface data. Specifically, this includes:
[0146] First, the service priority of each interface data is obtained. This service priority describes the importance of different interface data in communication. For example, based on the data service type, interface data can be divided into periodic monitoring data, event-triggered data, and control feedback data. Different priority weights are assigned to different types of data interfaces. For instance, device startup status and alarm information typically have higher priority, while periodic environmental monitoring data has relatively lower priority. Let the service priority of the i-th interface be... ;
[0147] Next, the timeliness requirement coefficient for each interface data is determined. This timeliness requirement coefficient describes the degree of real-time transmission requirement for different interface data. The system determines the timeliness requirement coefficient based on the maximum allowable transmission delay corresponding to each interface service type. Specifically, the maximum allowable transmission delay for the i-th interface data is obtained as follows: The system sets the reference transmission delay to be Then the timeliness requirement coefficient for data transmission on the i-th interface is... The calculation formula is: The maximum transmission delay is It can be determined based on the preset values of the device communication protocol, the device control cycle, or historical statistical data;
[0148] To reflect the transmission scale of different interfaces and obtain the average data load of each interface, specifically, the average data packet size of the i-th interface is obtained by statistically analyzing historical communication data. and basic transmission period The basic transmission period The basic data load of this interface can be determined based on the device sampling period, service control period, or the average data generation interval of historical communication data statistics. Represented as: Among them, basic data load Used to describe the amount of data generated by the interface per unit time, thereby reflecting the interface's demand for link bandwidth resources;
[0149] After obtaining the business priority, timeliness requirement coefficient, and basic data load, the initial scheduling weight of each interface is calculated. Let the initial scheduling weight of the i-th interface be expressed as... The calculation method is as follows:
[0150] ,
[0151] To achieve collaborative scheduling between interfaces with business relationships, an interface coupling matrix is further constructed in the system to describe the business relationships between different interfaces. First, the business types to which the data of each interface belongs are classified. Based on the historical communication data statistics of each business type, a business association rule table is pre-established. According to the data collaboration requirements between different business types, corresponding business association coefficients are set for different business types. These business association coefficients characterize the degree of association between two interfaces during bandwidth scheduling, and their values range from [0,1].
[0152] For example, business types include monitoring, status, alarm, control feedback, and log types. A business association rule table is established based on the business types, and the business type corresponding to the i-th interface is denoted as . For example, status and alarm classes typically need to synchronously reflect the device's operating status, so their business correlation coefficient is set to 1. Log data, on the other hand, is mainly used for background recording and has no direct correlation with other business functions; therefore, its business correlation coefficient with other classes is set to 0. An interface coupling matrix is constructed based on the business correlation rule table. ,in, This represents the business correlation coefficient between the i-th interface and the j-th interface, specifically: the interface's own coupling coefficient. When the i-th interface and the j-th interface belong to the same business type, then When the i-th interface and the j-th interface belong to different business types, then ,in, This represents the business association coefficient for the corresponding business type combination in the business association rules table;
[0153] Furthermore, the initial scheduling weights of each interface are corrected based on the interface coupling matrix to obtain the final scheduling weights, specifically the scheduling weight of the i-th interface. It can be represented as:
[0154] ,
[0155] By statistically analyzing the business relationships between the i-th interface and other interfaces, the initial scheduling weight is adjusted proportionally. When the scheduling requirements of a certain business type interface change, the scheduling weights of interfaces with business relationships with it will be adjusted accordingly. When an interface has no direct business relationship with other interfaces, it participates in bandwidth resource allocation only based on its own business characteristics. This allows interfaces with business relationships to form a collaborative scheduling relationship during bandwidth resource allocation, reducing disorderly competition among multiple interfaces. Based on the scheduling weights of each interface and the optimal uplink bandwidth generated in the current scheduling period, the bandwidth resources of the communication link are dynamically allocated. The bandwidth allocation value obtained by the i-th interface is then determined. Represented as:
[0156] ,
[0157] in, The optimal uplink bandwidth generated within the current scheduling period can be dynamically allocated based on the importance, timeliness, and scale of interface services and interface data through the above bandwidth allocation method. For example, when a certain interface data has a higher service priority or a higher real-time requirement, its corresponding scheduling weight will be increased, thereby obtaining a larger bandwidth ratio during the bandwidth allocation process.
[0158] After bandwidth allocation is completed, the system dynamically adjusts the data transmission period of each interface based on the bandwidth resources obtained. Specifically, the basic transmission period of the i-th interface can be obtained as follows: Its basic bandwidth requirements Numerically equal to its base data load When the interface actually obtains bandwidth At this time, the system reduces the data transmission frequency of this interface by extending the transmission period, and its actual transmission period Represented as: In this way, when the link bandwidth is insufficient, the data transmission cycle of low-priority or low-timeliness interfaces will be automatically extended, thereby reducing the link load. When the bandwidth resources are sufficient or the link bandwidth is restored, the transmission cycle of each interface will be maintained or gradually restored to the basic transmission cycle.
[0159] After completing the bandwidth allocation and dynamic adjustment of the transmission cycle for multi-interface data, a data transmission scheduling queue is established based on the transmission parameters of each interface to uniformly schedule the uplink data from multiple interfaces.
[0160] For example, in an industrial warehouse monitoring scenario, the warehouse monitoring equipment interacts with a remote management server via a single wireless communication link. Data generated by multiple interfaces is aggregated and then uploaded to the remote server via a unified communication unit. In this embodiment, the transmission characteristic parameters of each interface data are first obtained, including service priority, timeliness requirement coefficient, and basic data load. The initial scheduling weight of each interface data is then calculated based on these transmission characteristic parameters. Furthermore, a coupling matrix is constructed between each interface to describe the service relationship between different interfaces during the communication resource scheduling process. A comprehensive calculation is performed based on the service relationship and resource competition degree between the interface data. For example, there is a strong data relationship between the equipment operation status interface and the environmental monitoring interface, while the relationship between the video surveillance interface and the log information interface is relatively low. After obtaining the initial scheduling weight of each interface, the initial scheduling weight is corrected using the coupling matrix to obtain the scheduling weight of each interface, enabling data interfaces with strong service relationships to achieve coordinated scheduling during bandwidth scheduling. Based on the optimal uplink and downlink bandwidth allocation strategy within the current preset time window obtained by the aforementioned calculation, and combined with the scheduling weight of each interface, the bandwidth resources of the communication link are dynamically allocated.
[0161] After bandwidth allocation is completed, the system dynamically adjusts the data transmission cycle of each interface based on the bandwidth resources obtained by each interface. For example, under the initial configuration, the transmission cycle of the device operation status interface is 1 second, the data transmission cycle of the environmental monitoring interface is 3 seconds, the video summary data transmission cycle of the video monitoring interface is 2 seconds, and the data transmission cycle of the log information interface is 10 seconds. After bandwidth allocation is completed, the system adaptively adjusts the transmission cycle of each interface according to the bandwidth allocation ratio. Specifically, the transmission cycle of the device operation status interface is adjusted to 0.8 seconds, the transmission cycle of the environmental monitoring interface is adjusted to 2.5 seconds, the transmission cycle of the video monitoring interface is adjusted to 3 seconds, and the transmission cycle of the log information interface is adjusted to 12 seconds.
[0162] Furthermore, after completing the dynamic coupling adaptation of multi-interface data, the operating status of the communication link is monitored in real time. When a communication anomaly is detected, anomaly handling and scheduling adjustment are performed to ensure the stability of multi-interface data communication.
[0163] In this embodiment, communication anomaly refers to a situation in which the data transmission state deviates from the preset operating conditions during data transmission. The communication anomaly is determined based on the data packet loss rate, data transmission delay, and data sending queue status, and is divided into data loss anomaly, transmission delay anomaly, and link congestion anomaly.
[0164] Specifically, real-time monitoring of link operation metrics such as data transmission queue length, average data transmission latency, and data packet loss rate is used. Based on these metrics, a link congestion assessment index is constructed. To eliminate the dimensional differences between different metrics, a preset threshold is used to proportionalize each metric, transforming them into dimensionless quantities within a uniform numerical range. Let the link congestion index be... The calculation method is as follows:
[0165] ,
[0166] in, Where D is the current data transmission queue length, and D is the average data transmission delay. For data packet loss rate, , and The weighting coefficients are used to reflect the impact of different indicators on the degree of link congestion. Their values are set based on the importance of different indicators to communication quality in industrial communication systems. In low-bandwidth industrial communication scenarios, data packet loss rate usually directly affects data integrity, average data transmission delay affects the real-time performance of downlink commands and uplink data, and the data transmission queue length reflects the data buffering pressure of communication nodes. The weighting coefficients satisfy... The system sets packet loss rate thresholds respectively. Transmission delay threshold Send queue length threshold and congestion threshold This is used to identify different types of communication anomalies. The thresholds mentioned above are determined based on the operating characteristics of the communication link, the communication capabilities of the equipment, and the performance requirements of industrial services. For example, when the data packet loss rate exceeds the packet loss rate threshold, it indicates that the quality of the current communication link has significantly deteriorated, which may lead to data loss or communication interruption. The criteria for determining communication anomalies are as follows:
[0167] When satisfied The current situation is determined to be a data loss anomaly;
[0168] When satisfied The current transmission delay is determined to be abnormal.
[0169] when Or the link congestion index meets The system determines that the link is currently congested.
[0170] When any of the above conditions are met, the communication exception handling mechanism is triggered;
[0171] For data loss anomalies, the first step is to determine the interface to which the abnormal data belongs. Then, the data processing method is determined based on the data's timeliness status indicators. These timeliness status indicators describe the remaining timeliness of the data within the valid transmission time window. Specifically, the data generation time is obtained as follows: The current time is Maximum transmission latency of the interface to which the data belongs The timeliness status index of the data for:
[0172] ,
[0173] When satisfied If the data is still within the valid time window, it will be added back to the data sending queue for retransmission. If the data exceeds the valid time window, it will be discarded to prevent expired data from continuing to occupy communication link resources.
[0174] For transmission delay anomalies and link congestion anomalies, the transmission period of multiple interfaces is dynamically adjusted according to the bandwidth allocation ratio of each interface, and the transmission period of the i-th interface is adjusted accordingly. Adjusted to:
[0175] ,
[0176] in, This represents the adjusted sending period of the i-th interface. The periodic adjustment coefficient is used to control the adjustment range of the transmission period. Its value is set according to the current congestion level of the communication link. In this way, the interface with a large bandwidth usage ratio will get a larger transmission period adjustment range when the link is congested, thereby reducing the amount of data sent per unit time and thus relieving the link load more effectively.
[0177] The handling methods for link congestion anomalies also include data transmission queue control and data scheduling optimization mechanisms, specifically including: when the data transmission queue length exceeds the transmission queue length threshold... At that time, data is filtered in the data sending queue according to the interface priority, prioritizing the retention of data from high-priority interfaces and discarding data exceeding the sending queue length threshold. Low-priority data is sent to the interface, and the data sending queue is reordered according to the interface priority. The data is then sent using a priority scheduling method, so that high-priority interface data is sent through the communication link first.
[0178] Furthermore, after the device executes the downlink control command, it encapsulates the device feedback result into uplink feedback data and marks it as the highest priority data. It then prioritizes occupying the uplink link to send it back to the server. After receiving the device feedback result, the server adjusts the subsequent control command issuance strategy according to the control execution status and link operation. At the same time, it updates the communication scheduling parameters based on the device feedback result, including the weight parameters in the bandwidth allocation algorithm and the multi-interface data interaction frequency, so that the communication resource scheduling strategy can be dynamically optimized according to the actual operation.
[0179] Example 2
[0180] like Figure 4 As shown, this invention discloses a multi-interface data interaction module for realizing a stable bidirectional communication method in a low-bandwidth industrial 4G environment. Specifically, it is applicable to small-volume, high-frequency bidirectional communication scenarios with multiple types of heterogeneous data in industrial settings, especially suitable for industrial equipment control and industrial environment status monitoring scenarios where equipment control commands and sensor monitoring data share a 4G link. Examples include remote control of industrial production line equipment, industrial warehouse environment monitoring, and outdoor industrial terminal data feedback scenarios relying on 4G wireless bidirectional communication. It is also compatible with wide-voltage power supply and wide-temperature operating environments in industrial settings, and has the functions of communication status monitoring, fault self-recovery mechanism, and multi-interface collaborative scheduling. The module is an integrated circuit module, with each functional unit electrically connected through circuit wiring. The built-in logic control program is deeply adapted to each unit to achieve standardized processing of multi-interface data and stable bidirectional communication via wireless link.
[0181] Existing multi-interface data interaction devices suffer from low integration, limited functionality, lack of unified registration management and isolation mechanisms for multiple interfaces, and the potential for data corruption across the entire chain due to a single interface. Furthermore, they lack hardware-level fault self-recovery design, making on-site deployment and maintenance difficult and failing to meet the miniaturized, embedded, and highly stable application requirements of industrial sites. Therefore, this embodiment provides a multi-interface data interaction module as an integrated end-side data processing device. It can simultaneously act as a data transmitter and receiver, establishing a wireless bidirectional communication link with a remote server to complete the uplink transmission of industrial field data and the downlink reception and execution of server commands. This module includes a main control unit, a multi-interface management unit, a communication unit, a status monitoring unit, a data scheduling unit, a fault self-recovery unit, and a power supply unit. The units are electrically connected via bus circuits and signal circuits. Specifically, it includes:
[0182] As the core control unit, the main control unit establishes electrical connections with other units through bus circuits to achieve global control and unified coordination. Specifically, the main control unit is responsible for system operation status management, parameter configuration, and task coordination between functional units, but does not participate in the specific data scheduling and processing in the data transmission path.
[0183] During system operation, the main control unit receives link status information collected by the status monitoring unit, interface status information uploaded by the multi-interface management unit, and communication status information from the communication unit. It manages and records this information uniformly and issues control commands to each functional unit based on the current system operating status to achieve coordinated operation during multi-interface data interaction. Specifically, the industrial field interface data received by the multi-interface management unit is directly sent to the data scheduling unit for scheduling processing via the internal data bus. The data scheduling unit generates bandwidth adaptation strategies and data transmission parameters for each interface and sends the scheduled data to the communication unit for protocol encapsulation and wireless link transmission. The main control unit only manages the operating status and coordinates tasks within the above process.
[0184] During downlink communication, the communication unit receives control data from the remote server and sends it to the data scheduling unit for priority determination and scheduling. The data scheduling unit sends the control data to the multi-interface management unit for execution according to the control command type. When the control data involves adjustments to communication parameters or system operating parameters, the data scheduling unit synchronizes the relevant information to the main control unit, which then updates and manages the system operating parameters in a unified manner.
[0185] In addition, the main control unit synchronizes the interface connection status table data of the multi-interface management unit and integrates them into a global interface ledger. This unified management of the identification information, interface type, data transmission parameters, and historical interaction status of each interface is provided to the data scheduling unit as a reference for scheduling decisions. When the main control unit receives a warning signal or abnormal signal reported by the status monitoring unit, it triggers corresponding control operations based on the type of abnormality. This includes sending a scheduling strategy adjustment instruction to the data scheduling unit or triggering the fault self-recovery unit to perform abnormality handling operations. For example, the data scheduling unit allocates bandwidth based on the interface connection status, and the fault self-recovery unit locates the abnormality based on the interface connection status.
[0186] The multi-interface management unit is used to access multiple heterogeneous industrial equipment communication interfaces and manage them uniformly. It is used to collect various monitoring data in the industrial field, execute control commands, and upload equipment feedback data. This unit is configured with at least two analog quantity interaction circuits and at least one serial communication circuit. Each circuit is independently designed and equipped with signal isolation circuits, voltage and current limiting protection circuits, and parameter configuration circuits. Each interface circuit is electrically connected to the module's internal data bus through the signal isolation circuit. Specifically, the multi-interface management unit has a built-in interface registration management circuit. After the module is powered on, it automatically scans all connected analog quantity interfaces and serial communication interfaces, automatically registers the detected interfaces, assigns a unique identifier ID to each interface, and collects the hardware parameter information of the interfaces, including communication rate, voltage range, interface type, and current connection status. It also records the corresponding data transmission parameters and establishes an interface connection status table. The interface connection status table is updated according to a preset period. When a change in the interface connection status is detected, it is updated immediately and synchronized to the main control unit via the internal data bus for unified management. It is also provided to the data scheduling unit as a reference for generating data scheduling strategies.
[0187] For example, in this embodiment, the multi-interface management unit is configured with two 0-10V analog input circuits, two 0-10V analog output circuits, and one RS485 serial communication circuit. The specific design of each circuit is as follows: each analog input circuit consists of a signal sampling circuit, a temperature drift compensation circuit, and an analog-to-digital conversion circuit. The signal sampling circuit samples and amplifies the analog signals output by the industrial field sensors to suppress signal attenuation. The temperature drift compensation circuit is used to compensate for temperature drift of the sampled signals in a wide-temperature operating environment to ensure the stability of the analog signal acquisition under different ambient temperature conditions. The analog-to-digital conversion circuit is used to convert the processed analog signals into digital signals and send them to the data scheduling unit for further processing via the internal data bus.
[0188] Each analog output circuit consists of a digital-to-analog converter circuit, a signal amplifier circuit, and an output buffer circuit. The digital-to-analog converter circuit receives control data from the data scheduling unit and converts it into analog control signals. The signal amplifier circuit adjusts the amplitude of the analog control signals. The output buffer circuit reduces the output impedance to ensure stable output of the analog control signals in industrial field equipment.
[0189] The serial communication circuit uses a half-duplex serial communication transceiver chip as its core, along with pulse interference suppression and bus matching circuits, to achieve serial communication data exchange between industrial devices. The serial communication circuit supports various communication parameter configurations, including baud rate, data bits, stop bits, and parity bits, adapting to the serial communication needs of different industrial devices. The interference suppression circuit suppresses transient interference signals caused by power supply fluctuations or electromagnetic interference in the industrial environment, while the bus matching circuit reduces signal reflections in the communication bus, improving communication stability. This serial communication interface is primarily used for downlink transmission of industrial equipment control commands and uplink feedback of equipment operating status data, with a communication rate matched to the transmission rate of the 4GCat1 low-bandwidth wireless link.
[0190] The communication unit is used to establish a wireless communication link with a remote server, enabling uplink transmission and downlink reception of data. This unit includes a radio frequency transceiver circuit, an antenna interface circuit, and a multi-protocol driver circuit. These components are used to transmit and receive wireless signals, as well as encapsulate and parse various communication protocols. It is electrically connected to the data scheduling unit via an internal data bus to achieve wireless transmission of scheduling data. Simultaneously, it is connected to the status monitoring unit via a status information bus to provide link status parameters. Specifically, after receiving a data frame from the data scheduling unit, the communication unit encapsulates the data using the multi-protocol driver circuit and transmits it to the remote server via the radio frequency transceiver circuit. Simultaneously, it receives downlink data from the wireless link, parses it to form standardized data frames, and sends them to the data scheduling unit for further processing. Furthermore, the communication unit collects raw link status parameters at preset intervals, including but not limited to signal strength, signal-to-noise ratio, uplink and downlink rates, packet loss rate, link latency, SIM card status, and server connection status, and transmits these parameters to the status monitoring unit via the status information bus.
[0191] The radio frequency (RF) transceiver circuit is used to transmit and receive wireless signals. It is equipped with an RF amplifier circuit and a filter circuit. The RF amplifier circuit amplifies the power of the transmitted RF signal and amplifies the received RF signal with low noise. The filter circuit performs bandpass filtering on the RF signal and supports LTE-FDD and LTE-TDD full network bands. The antenna interface circuit is a standardized RF interface circuit, electrically connected to the RF end of the RF transceiver circuit, and connects to an external 4G antenna. It has a built-in electrostatic discharge (ESD) protection circuit. The multi-protocol driver circuit has built-in multi-protocol drivers, such as MQTT, HTTP, heartbeat packets, and registration packets. The multi-protocol driver circuit receives standardized data frames from the data scheduling unit, encapsulates the data according to the currently configured communication protocol, and sends it to the RF transceiver circuit for uplink transmission. At the same time, it receives downlink wireless data, performs protocol parsing, and sends the parsed data frames to the data scheduling unit for further processing. The selection and switching of the communication protocol are configured and managed by the main control unit.
[0192] The status monitoring unit is used to monitor and analyze the communication link status, interface operation status, and data transmission status in real time, providing a basis for the data scheduling unit and system anomaly handling. This unit is connected to the communication unit, multi-interface management unit, and data scheduling unit through a status information bus to acquire system operation status data. Specifically, the status monitoring unit receives raw link status parameters collected by the communication unit, preprocesses and extracts features from the raw link status parameters to generate link status features, and evaluates the communication stability within a preset time window based on the built-in communication status analysis model, predicting link fluctuation trends and communication status. At the same time, the status monitoring unit receives interface status information from the multi-interface management unit, monitors and analyzes the working status of each interface, determines whether the interface is in normal working condition, and identifies interface fault conditions.
[0193] In addition, the status monitoring unit acquires real-time data transmission status information from the data scheduling unit, including data transmission queue length, data transmission latency, and data packet loss rate. Based on this information, it identifies communication anomalies. When a communication status anomaly is detected, it classifies the anomaly type. For runtime anomalies that can be resolved through scheduling strategy adjustments, the anomaly information is directly sent to the data scheduling unit for adjusting the data scheduling strategy. For fault-level anomalies that affect the stable operation of the system, an anomaly signal is sent to the main control unit, which triggers the fault self-recovery unit to perform anomaly handling operations. The status monitoring unit also includes a status indicator circuit for displaying the module's operating status.
[0194] For example, the status indicator circuit consists of three high-brightness LED indicators and current-limiting resistors, corresponding to "power supply status", "link status" and "server connection status" respectively, and the main control unit controls the on / off state and flashing frequency.
[0195] The data scheduling unit is used to dynamically allocate communication link bandwidth resources based on link fluctuation trends, estimated downlink data transmission load, and multi-interface data transmission requirements, and to achieve coordinated scheduling of multi-interface data. This unit is connected to the multi-interface management unit, communication unit, and status monitoring unit via a data bus, and is used to receive interface data and link status information and output the scheduled data. Specifically, the data scheduling unit receives multi-interface data frames and corresponding data transmission characteristic parameters from the multi-interface management unit, and simultaneously receives predicted link fluctuation trends and estimated downlink data transmission loads from the status monitoring unit. It also receives the transmission characteristics and data transmission requirements of multi-interface data from the multi-interface management unit, and dynamically allocates uplink and downlink bandwidth resources of the communication link under bandwidth resource constraints and link stability constraints. During the bandwidth allocation process, the scheduling weight of each interface data is calculated based on the built-in dynamic coupling algorithm. Based on this, the bandwidth allocation result of each interface within the current preset time window is calculated, and corresponding data transmission parameters are generated to achieve orderly transmission of multi-interface data and dynamic coordination of bidirectional communication.
[0196] In addition, when the status monitoring unit detects runtime communication anomalies such as link congestion, transmission delay, or data packet loss, the data scheduling unit dynamically adjusts the current scheduling strategy based on the anomaly information, such as adjusting the sending cycle of each interface or triggering data sending priority adjustment.
[0197] The fault self-recovery unit is used to recover from fault-level anomalies generated during system operation, ensuring that the communication module can quickly resume normal operation under abnormal conditions. This unit is connected to the main control unit via a control bus and to the communication unit and data scheduling unit via data interfaces, respectively. It is used to perform fault recovery and data retransmission operations. Specifically, the fault self-recovery unit includes an anomaly handling circuit, a hardware watchdog circuit, a reset circuit, and a data retransmission circuit. The anomaly handling circuit receives anomaly signals transmitted by the main control unit and executes the corresponding recovery strategy according to the anomaly type. The hardware watchdog circuit and the reset circuit are used to construct a hardware-level self-recovery mechanism. The data retransmission circuit is used to retransmit data that was not successfully transmitted due to abnormal interruption.
[0198] For example, when the status monitoring unit detects a fault-level anomaly, the main control unit sends an anomaly signal to the fault self-recovery unit. The anomaly handling circuit performs the corresponding recovery operation according to the anomaly type, such as interface re-initialization, communication link reconstruction, or communication module reconfiguration, in order to restore the normal operating state of the system.
[0199] In terms of data recovery, when communication anomalies cause some data to fail to be transmitted, the data retransmission circuit obtains the data records that have not been sent through the data scheduling unit and determines the timeliness status index of the corresponding data. When the timeliness status identification is greater than 0, the data retransmission circuit adds the data back to the data sending queue of the data scheduling unit to perform data retransmission. When the timeliness status identification is less than or equal to 0, the data is directly discarded.
[0200] The fault self-recovery unit also includes a hardware-level fault self-recovery mechanism. The main control unit sends a feed signal to the hardware watchdog circuit according to a preset cycle. If the main control unit crashes or the program runs away, and cannot properly feed the feed signal, the hardware watchdog circuit immediately triggers the reset circuit to perform a hardware reset on the main control unit. After the reset, the main control unit automatically restarts and executes a self-test program to quickly restore normal operation. In addition, the abnormal handling circuit will also record abnormal information, including the abnormal type, the time of abnormal occurrence, the self-recovery process, and the recovery result, generate an abnormal log, and synchronize it to the main control unit for storage and management.
[0201] The power supply unit provides stable and safe power support for the entire module, supplying power to each unit via the power bus. Specifically, the power supply unit includes a wide-voltage input circuit, a voltage regulation and filtering circuit, and an overvoltage, overcurrent, and reverse connection protection circuit. Its input voltage is adapted to the wide-voltage DC power supply requirements of industrial sites, and it outputs a multi-level stable low-voltage DC voltage to meet the low-power consumption requirements of industrial sites. Among them, the wide-voltage input circuit uses a power interface chip with a wide voltage range to adapt to various DC power supply methods in industrial sites. The overvoltage, overcurrent, and reverse connection protection circuit forms a triple protection mechanism with a self-resetting fuse, transient suppression diode, and reverse connection protection diode to ensure the safety and stability of the power supply. The voltage regulation and filtering circuit uses a multi-channel DC-DC power converter to convert the input wide-voltage DC voltage into a multi-level stable DC voltage to meet the power supply requirements of different functional units.
[0202] For example, after the multi-interface data interaction module of this embodiment is powered on, the power supply unit provides wide voltage input to power the entire module. The main control unit starts the hardware self-test program to detect the working status of each unit in turn. After the self-test is passed, the parameters of each unit are initialized. Specifically, this includes: the multi-interface management unit starts the interface registration management circuit, automatically scans and registers all interfaces, builds an interface connection status table, and synchronizes it to the main control unit to establish a global interface ledger; the communication unit starts the radio frequency transceiver circuit and the multi-protocol driver circuit, establishes a wireless communication link, and initializes the communication protocol configuration, while displaying whether the connection is successful through the status indicator circuit; the status monitoring unit starts to collect the operating status parameters of each unit, establishes a link status monitoring task, and the data scheduling unit initializes the data transmission queue; the fault self-recovery unit initializes the abnormal handling rules and the hardware watchdog preset feeding cycle; after initialization, the module enters the normal working state.
[0203] During normal operation, the module enables bidirectional data interaction between industrial field data and remote servers. Its working process includes uplink data transmission and downlink data transmission.
[0204] In uplink data transmission, the multi-interface management unit collects various interface data from the industrial site, including analog monitoring data and serial communication feedback data. After electrical isolation and digital-to-analog conversion of the raw collected data, it forms standardized data frames and sends them to the data scheduling unit. The data scheduling unit receives the data frames of each interface and the corresponding data transmission parameters of the interface. At the same time, it receives the predicted link fluctuation trend and estimated downlink data transmission load transmitted by the status monitoring unit, calculates the optimal uplink and downlink bandwidth allocation strategy and the dynamic coupling adaptation of multi-interface data, determines the transmission parameters of each interface data, and sends the scheduled interface data to the communication unit. The communication unit encapsulates the data frames according to the currently configured communication protocol and transmits the data uplink to the remote server through the wireless communication link.
[0205] During downlink data transmission, the communication unit receives control commands from the remote server, decapsulates them according to the protocol, forms standardized control data frames, and sends them to the data scheduling unit. The data scheduling unit marks the control commands as first-level priority and performs priority scheduling based on the current link fluctuation trend. The scheduled control data is then sent to the multi-interface management unit. The multi-interface management unit selects the corresponding output circuit according to the interface type, such as analog output or serial communication interface, and sends the control signals to the corresponding execution equipment in the industrial field.
[0206] During the continuous operation of the module, each unit works collaboratively through the main control unit. The status monitoring unit continuously provides link fluctuation trend information and estimates the downlink data transmission load. The data scheduling unit makes dynamic scheduling decisions based on the link fluctuation trend information and estimates the downlink data transmission load. The communication unit executes data transmission. The fault self-recovery unit intervenes and recovers in abnormal situations, thereby realizing stable bidirectional communication of multi-interface data in low-bandwidth environments.
[0207] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A stable bidirectional communication method, characterized in that, Includes the following steps: Real-time acquisition of communication link status data; multi-dimensional signal-to-noise ratio separation and feature extraction of the communication link status data to obtain link status features; The link status characteristics are input into the preset communication status analysis model to predict the link status changes within the preset time window, obtain the link status prediction results and link fluctuation trends, and estimate the downlink data transmission load within the preset time window based on historical business behavior data. Obtain the current transmission load of multi-interface data, combine it with the estimated downlink data transmission load, construct a bandwidth optimization allocation model, and calculate the optimal uplink and downlink bandwidth allocation strategy under the constraints of link fluctuation trend and link status prediction results. Based on the optimal uplink and downlink bandwidth allocation strategy, a dynamic coupling relationship is established based on the transmission characteristics of multi-interface data, and collaborative bandwidth allocation is performed on multi-interface data to determine the transmission parameters of each interface data. Real-time monitoring of communication anomalies; when data loss, link congestion, or communication delays occur, corresponding scheduling adjustments or anomaly recovery processes are executed based on the anomaly type.
2. The stable bidirectional communication method as described in claim 1, characterized in that, The obtained link state features include: Real-time acquisition of link status data, including signal strength, signal-to-noise ratio, link delay, uplink and downlink transmission rates, and packet loss rate; preprocessing of the link status data; multi-scale decomposition of the link status sequence using wavelet decomposition and reconstruction algorithms; separation of real link signals from various interference signals; and obtaining the interference-free link status sequence. Feature extraction is performed on the link state sequence at multiple time scales to obtain a multi-dimensional link state feature vector containing statistical features, trend features, and fluctuation features.
3. The stable bidirectional communication method as described in claim 1, characterized in that... The communication state analysis model includes an input layer, a feature enhancement layer, a time series modeling layer, and an output layer. The input layer receives the link state feature vector and performs data format conversion. The feature enhancement layer is used to enhance the rate of change, trend, and feature correlation of the link state features to obtain enhanced link state features. The time series modeling layer is used to perform time series modeling on the enhanced link state features. The output layer is used to output the link state prediction results within a future preset time window and output the link fluctuation trend. The link state prediction results include link latency, link packet loss rate, uplink transmission rate, and downlink transmission rate. The link fluctuation trend includes link stable state, link fluctuating state, and link congestion state.
4. The stable bidirectional communication method as described in claim 1, characterized in that, The estimation of downlink data transmission load within a preset time window based on historical business behavior data includes: Collect downlink data sent from the server to the terminal device within a preset historical time window, perform anomaly removal and periodic statistics on the downlink data, calculate the average downlink data transmission cycle, and obtain the standard transmission frequency; The downlink data volume within the historical time window is statistically analyzed and classified according to data type. The data volume of different types of data is weighted and averaged to obtain the standard single instruction data volume. Based on the standard issuance frequency and the standard single instruction data volume, the historical baseline downlink load is calculated as an estimated downlink data transmission load.
5. A stable bidirectional communication method as described in claim 1, characterized in that, The bandwidth optimization allocation model includes: The system obtains the current transmission requirements of multiple interfaces, calculates the data generation rate of each interface based on its data transmission requirements within a preset time window, and obtains the current uplink data demand load by statistically analyzing the data generation rates of all interfaces. It then combines the link status prediction results, link fluctuation trends, and estimated downlink data transmission load to construct a bandwidth optimization allocation model with multiple optimization objectives, including bandwidth resource utilization, link stability, and service demand satisfaction rate, and calculates the optimal uplink and downlink bandwidth allocation strategy.
6. The stable bidirectional communication method as described in claim 5, characterized in that, The calculation of the optimal uplink and downlink bandwidth allocation strategy includes: The link state prediction results within a preset time window obtained from the communication state analysis model are obtained. Multiple constraints are applied to the multi-objective optimization solution method, including total bandwidth resource constraints and uplink and downlink bandwidth constraints. Specifically, a redundancy coefficient is set for the communication link based on the link fluctuation trend, the theoretical maximum bandwidth of the link is corrected to obtain the available bandwidth of the link, and the maximum allowable bandwidth of the uplink and the maximum allowable bandwidth of the downlink are determined by combining the predicted link packet loss rate and uplink and downlink transmission rate. Under the constraints of total bandwidth resources and uplink / downlink bandwidth, the particle swarm optimization algorithm is used to perform multi-objective optimization on the bandwidth optimization allocation model to calculate the optimal uplink / downlink bandwidth allocation strategy.
7. The stable bidirectional communication method as described in claim 1, characterized in that, The coordinated bandwidth allocation for multi-interface data includes: Obtain the business priority, timeliness requirement coefficient and basic data load of each interface data, calculate the initial scheduling weight of each interface data, construct the interface coupling matrix according to the business relationship between each interface, and correct the initial scheduling weight based on the interface coupling matrix to obtain the scheduling weight of each interface. Based on the scheduling weight of each interface, the bandwidth resources of the communication link are dynamically allocated. The bandwidth resources obtained by each interface are determined according to the optimal uplink bandwidth allocation result in the current scheduling period. The transmission period of interface data is dynamically adjusted according to the bandwidth resources obtained by each interface. A data transmission scheduling queue is established according to the transmission parameters of each interface, and uplink data from multiple interfaces is uniformly scheduled.
8. The stable bidirectional communication method as described in claim 1, characterized in that, Perform corresponding scheduling adjustments or exception recovery processing based on the exception type, including the following steps: Real-time monitoring of data packet loss rate, data transmission latency, and data sending queue length; calculation of link congestion assessment indicators; and determination of communication status based on preset packet loss rate threshold, transmission latency threshold, sending queue length threshold, and congestion threshold. In the event of data loss, determine whether to retransmit the data or discard the data based on the remaining validity period of the abnormal data. In case of abnormal transmission delay or link congestion, the data transmission cycle of multiple interfaces is dynamically adjusted according to the bandwidth allocation ratio of each interface.
9. A multi-interface data interaction module, used to implement the stable bidirectional communication method according to any one of claims 1-8, characterized in that, It includes a main control unit, a multi-interface management unit, a communication unit, a status monitoring unit, a data scheduling unit, and a fault self-recovery unit. Each unit is electrically connected through a data bus and a signal bus. The multi-interface management unit is used to access multiple industrial equipment communication interfaces and collect interface data; The communication unit is used to establish a wireless communication link with a remote server; The status monitoring unit is used to collect communication link status parameters and interface operating status information, and to analyze the communication status; The data scheduling unit is used to dynamically allocate communication link bandwidth resources based on link status information and multi-interface data transmission requirements, and to send multi-interface data to the communication unit for transmission after coordinated scheduling. The main control unit is used for operation management and task coordination of various functional units; The fault self-recovery unit is used to perform recovery operations on anomalies that occur during system operation.
10. A multi-interface data interaction module as described in claim 9, characterized in that, The status monitoring unit preprocesses and extracts features from the link status parameters collected by the communication unit, and predicts the link status prediction results and link fluctuation trends within a preset time window based on the built-in communication status analysis model. The data scheduling unit receives the link fluctuation trend prediction results, estimates the downlink data transmission load and multi-interface data transmission requirements, dynamically allocates the uplink and downlink bandwidth of the communication link under bandwidth resource constraints, and calculates the scheduling weight of each interface data based on the dynamic coupling method to generate the corresponding interface transmission parameters.