Dynamic adaptive distributed soft bus system and collaborative optimization method
By introducing a dynamic adaptive strategy generation and execution mechanism in a distributed soft bus system, the problem that existing systems cannot adaptively adjust when the state of network and equipment changes is solved, and the stability and flexibility of the system are significantly improved.
Patent Information
- Application Number
- CN202510297432.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-13
AI Technical Summary
The existing distributed bus systems cannot achieve adaptive adjustments when the network and device states change, resulting in poor system flexibility and stability.
A dynamic adaptive distributed soft bus system is designed, including an environment perception subsystem, a decision-making and planning subsystem, a communication adaptation subsystem and a device collaboration subsystem. By monitoring the network environment and device resources in real time, using neural network models for predictive analysis, generating dynamic adaptive strategies, and adjusting communication protocols and device collaboration tasks.
It realizes flexible allocation of collaborative tasks, and can quickly adjust strategies in the case of network congestion or tight equipment resources, improving the stability and flexibility of the system.
Smart Images

Figure CN120151133A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distributed system communication, and more particularly to a dynamic adaptive distributed soft bus system and a collaborative optimization method. Background Art
[0002] Currently, typical distributed buses include the distributed soft bus of HarmonyOS and the DDS distributed soft bus. The distributed soft bus of HarmonyOS provides a foundation for the interconnection and interoperability of devices. It realizes device discovery, connection, and data transmission through the soft bus kernel. The soft bus kernel abstracts the underlying communication protocols and hardware differences, enabling different devices to be easily connected. For example, it supports multiple communication methods, including Wi-Fi, Bluetooth, etc. In the device discovery stage, the broadcast mechanism or a specific discovery protocol is used to make nearby devices perceive each other. After the connection is established, data is transmitted between devices through a unified interface. The DDS distributed soft bus is mainly based on the publish-subscribe model of the data center. It defines data topics (Topics), and the publisher publishes data to the corresponding topic, and the subscriber obtains data from the topics of interest. This model decouples the data producer and the consumer, improving the flexibility of the system. In the implementation process, the DDS middleware manages the distribution and transmission of data, and ensures the transmission quality of different types of data through QoS (Quality of Service) policies. For example, different reliability, priority, and other parameters are set according to the importance and real-time requirements of the data.
[0003] However, although the existing bus systems have a good data distribution mechanism, they have poor flexibility and cannot adaptively adjust according to the network and device status.
[0004] Therefore, how to improve the stability and flexibility of the bus system is an urgent problem for those skilled in the art to solve. Summary of the Invention
[0005] In view of this, the present invention provides a dynamic adaptive distributed soft bus system and a device collaborative optimization method, which can monitor the network environment and device resources in real time, perform predictive analysis, and then realize flexible allocation of collaborative tasks. In the case of network congestion or tight device resources, the strategy can also be quickly adjusted, greatly improving the stability and flexibility of the system.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A dynamic adaptive distributed soft bus system includes an environment perception subsystem, a decision-making and planning subsystem, a communication adaptation subsystem, and a device collaboration subsystem;
[0008] The environment perception subsystem is used to obtain network environment data and device resource data;
[0009] The decision-making and planning subsystem is used to extract multi-dimensional features to train a neural network model, and use the trained neural network model to perform predictive analysis on the real-time network; it is used to generate a dynamic adaptive strategy according to the analysis results in combination with a preset policy template.
[0010] The communication adaptation subsystem and the device collaboration subsystem perform communication device and device collaboration adjustment according to the corresponding dynamic adaptive strategy; the device collaboration subsystem is also used to feedback the collaboration situation to the decision-making and planning subsystem.
[0011] Preferably, the environment perception subsystem includes a network environment monitoring module, a device resource monitoring module, and a data integration and preprocessing module;
[0012] The network environment monitoring module is used to detect basic network parameters, network topology, and network type;
[0013] The device resource monitoring module is used to obtain the usage status information and hardware information of each device;
[0014] The data integration and preprocessing module is used to perform data cleaning and map network environment data and device resource data to the standard regional level uniformly.
[0015] Preferably, the decision-making and planning subsystem includes a data analysis module and a policy generation module;
[0016] The data analysis module uses a hybrid model that combines a convolutional neural network and a recurrent neural network to extract spatial features and temporal features to predict the network environment state and device resource load state;
[0017] The policy generation module is used to generate the dynamic adaptive policy according to the network environment state and the device resource load state in combination with the current task type.
[0018] Preferably, the network environment data includes network topology and network type; the device resource data includes the change pattern of resource usage.
[0019] Preferably, the communication adaptation subsystem includes a protocol selection and switching module and a protocol parameter adjustment and optimization module;
[0020] The protocol selection and switching module is used to select the corresponding communication protocol in the protocol library according to the protocol adjustment strategy in the dynamic adaptive strategy;
[0021] The protocol parameter adjustment and optimization module is used to adjust the protocol parameters in real time according to the network environment and device status.
[0022] Preferably, the communication protocol includes the TCP / IP protocol and the Bluetooth protocol;
[0023] For the TCP / IP protocol, the congestion control algorithm parameters, window size, and retransmission timeout are dynamically adjusted according to network bandwidth and latency;
[0024] For the Bluetooth protocol, the connection interval, transmission power, and data transmission rate are dynamically adjusted according to the distance between devices and signal strength.
[0025] Preferably, the device collaboration subsystem includes a task assignment and scheduling module, a data interaction and synchronization module, and a collaboration feedback and adjustment module;
[0026] The task assignment and scheduling module is used to receive device collaboration tasks, calculate the task fitness for each device, and select the device with the highest fitness for corresponding task assignment; and is used to confirm the task execution order according to the start time of the task;
[0027] The data interaction and synchronization module is used to confirm the data transmission method between devices as synchronous transmission or asynchronous transmission according to the data nature;
[0028] The collaboration feedback and adjustment module is used to collect device feedback information in real time through a dedicated feedback channel during the execution of device collaboration tasks, including task completion progress, whether errors occur, and device status changes.
[0029] A device collaboration optimization method is applied to the above-mentioned distributed soft bus system, including the following steps:
[0030] Obtain network environment data and device resource data;
[0031] Extract multi-dimensional features according to the network environment data and the device resource data for training the model; and perform data analysis according to the trained model prediction to obtain network congestion and device load status;
[0032] Generate an adaptive strategy according to the data analysis result in combination with a preset policy template; the adaptive strategy includes a device collaboration optimization strategy;
[0033] Perform the assignment and scheduling of collaboration tasks according to the device collaboration optimization strategy.
[0034] Preferably, the adaptive strategy further includes a communication protocol adjustment strategy, select the corresponding communication protocol according to the communication protocol adjustment strategy, and adjust the protocol parameters in real time according to different protocol types.
[0035] Preferably, the steps further include: when the device executes the collaboration task, feedback task collaboration information through a specific channel, and judge the task execution event according to the feedback task collaboration information.
[0036] As can be seen from the above technical solutions, compared with the prior art, the present invention discloses a dynamic adaptive distributed soft bus system and a collaborative optimization method, which can monitor the network environment and device resources in real time, achieve predictive analysis, and then achieve flexible allocation of collaborative tasks. Even in the case of network congestion or tight device resources, the strategy can be quickly adjusted, greatly improving the stability and flexibility of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0038] Figure 1 FIG. is a schematic structural diagram of a dynamic adaptive distributed bus system provided by an embodiment of the present invention.
[0039] Figure 2 FIG. is a schematic flow diagram of a device collaborative optimization method provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0041] Embodiment 1
[0042] As Figure 1 , an embodiment of the present invention discloses a dynamic adaptive distributed soft bus system, including an environment perception subsystem, a decision-making and planning subsystem, a communication adaptation subsystem, and a device collaboration subsystem.
[0043] The environment perception subsystem is used to obtain network environment data and device resource data.
[0044] The decision-making and planning subsystem is used to extract multi-dimensional features to train a neural network model, and use the trained neural network model to perform predictive analysis on the real-time network; and is used to generate a dynamic adaptive strategy according to the analysis results in combination with a preset strategy template.
[0045] The communication adaptation subsystem and the device cooperation subsystem perform communication device and device cooperation adjustments according to corresponding dynamic adaptation strategies; the device cooperation subsystem is also used to feedback the cooperation situation to the decision-making and planning subsystem.
[0046] In this implementation, the dynamic adaptation strategies generated by the decision-making and planning subsystem include communication protocol adjustment strategies and device cooperation optimization strategies, and the two strategies are respectively sent to the communication adaptation subsystem and the device cooperation subsystem for execution.
[0047] To further implement the above technical solution, the environment perception subsystem includes a network environment monitoring module, a device resource monitoring module, and a data integration and preprocessing module.
[0048] The network environment monitoring module is used to collect relevant data of the network environment at specific intervals. Among them, the network environment data includes the network topology structure and network types, such as Wi-Fi, cellular network, wired network, etc. The network topology structure data obtains connection relationships and path information by periodically sending specific probe packets to traverse network nodes; the network type data is determined based on network interface characteristics and signal characteristics. For example, the network type and quality are determined by analyzing Wi-Fi signal strength and frequency band information. In addition, general data such as network bandwidth, latency, and packet loss rate are also collected. Exemplarily, a high-frequency sampling mechanism can be introduced for data collection, with data collected at intervals of every 50 milliseconds. Compared with traditional systems (assuming an average collection interval of 200 milliseconds), the collection frequency is increased by 4 times. High-frequency collection can promptly capture subtle changes in the network environment, such as bandwidth fluctuations and latency increase trends at the initial stage of network congestion, providing data support for rapid response.
[0049] The device resource monitoring module is used to obtain the resource usage situation of the device and its own hardware information. Such as device CPU usage rate, memory usage rate, storage capacity, battery power, device temperature, and processor type, memory specifications, etc. Precise data is obtained through in-depth interaction with the device operating system, using system-level APIs and driver interfaces. For example, in the Windows system, the Performance Counter API is used to obtain detailed CPU usage rate data, and in the Linux system, relevant data in the / proc file system is read to obtain memory usage information. The device hardware information is obtained through device drivers or system hardware identification interfaces, providing detailed basis for device performance evaluation and task allocation.
[0050] A dynamic calibration algorithm is used to deal with possible errors and omissions in device resource data. For example, abnormal data is corrected based on historical data trends and device performance benchmarks, and missing data is reasonably estimated and supplemented based on device operating modes and surrounding environmental data. For example, when an abnormal spike occurs in the device CPU usage, data smoothing is performed by combining historical data for the same period and the device load task type; for missing memory usage data, a reasonable value is estimated based on the device's current running program type and memory allocation model.
[0051] The data integration and preprocessing module performs intelligent data cleaning, normalization and standardization on network environment data and device resource data.
[0052] Exemplary, intelligent data cleaning methods include: for network environment data, such as network bandwidth data, thresholds are set according to network type and historical data distribution, and outliers that exceed the range are screened out according to the thresholds; for device resource data, cluster analysis algorithms are used to identify data points that deviate greatly from the normal operation mode of the device and make corrections. For example, in an enterprise-level network environment, the cleaning threshold is set according to the historical mean and standard deviation of the network bandwidth, and when the collected bandwidth data exceeds the range of 3 times the standard deviation, it is marked and corrected; for device CPU usage data, cluster analysis is used to cluster the usage data in the normal operation state of the device into different modes, and when the newly collected data deviates too much from the center value of the mode to which it belongs, anomaly detection and correction are performed.
[0053] Normalization and standardization processing uses a combination of Min-Max normalization and Z-Score standardization to uniformly map network environment data and device resource data to a standard interval to facilitate subsequent data analysis and comparison. For example, the network bandwidth data is mapped to the [0,1] interval, where 0 represents the lowest bandwidth and 1 represents the highest bandwidth; the device CPU usage data is Z-Score standardized to make its mean 0 and standard deviation 1, eliminating the difference in data dimensions between different devices and improving data comparability and analysis accuracy. The processed data is stored in the local cache, and a time series data pool is constructed to provide a data source for subsequent modules.
[0054] In order to further implement the above technical solution, the decision-making and planning subsystem includes a data analysis module and a strategy generation module.
[0055] The data analysis module performs multi - feature fusion data analysis based on the data collected by the environmental perception system. After extracting the pre - processed data from the local cache, multi - dimensional feature extraction is carried out. In addition to basic features such as network bandwidth and device CPU usage rate, dynamic features such as their change rates and accelerations (change rates of change rates) are calculated emphatically. For example, the network bandwidth change rate is obtained by calculating the ratio of the bandwidth difference between adjacent collection cycles to the time interval, and the bandwidth acceleration is further calculated by the ratio of the difference of the change rates to the time interval. These dynamic features can accurately capture the data change trend and predict network congestion and device resource tension in advance. Taking network congestion prediction as an example, when the network bandwidth change rate continuously decreases and the acceleration is negative, it indicates that network congestion is about to occur, which buys time for timely strategy adjustment.
[0056] Among them, for the calculation of the change rate in dynamic features, the example is as follows: The network bandwidth change rate is obtained by calculating the ratio of the bandwidth difference between adjacent collection cycles to the time interval. Let Bt be the network bandwidth of the current collection cycle, Bt - 1 be the network bandwidth of the previous collection cycle, and Δt be the time interval of the collection cycle. Then the network bandwidth change rate Similarly, for the change rate of the device CPU usage rate Among them, Ct is the CPU usage rate at the current moment, and Ct - 1 is the CPU usage rate at the previous moment. The calculation methods of the change rates of other resource data are similar. Calculation of acceleration in dynamic feature extraction: The bandwidth acceleration is further calculated by the ratio of the difference of the change rates to the time interval. Let be the network bandwidth change rate at the current moment, be the network bandwidth change rate at the previous moment. Then the network bandwidth acceleration The calculation of the acceleration of device resource data is the same in principle. For example, the acceleration of the device CPU usage rate These dynamic features can reflect the trend and speed of data change. For example, when the network bandwidth acceleration is negative and the change rate continuously decreases, it indicates that the network bandwidth is not only decreasing but also the speed of decrease is accelerating, which may indicate that network congestion is about to occur.
[0057] Furthermore, after obtaining the above - mentioned data, a hybrid model integrating convolutional neural network (CNN) and recurrent neural network (RNN) is used for data analysis.
[0058] Among them, CNN is used to extract the spatial features of data, such as the node connection relationship in the network topology and the correlation between device resource data; RNN is good at processing time - series data and learning the dynamic change rules of data.
[0059] Specifically, when analyzing network environment data, CNN extracts the connection density of key nodes and bandwidth allocation features in the network topology, and RNN predicts future trends based on historical network bandwidth and latency data.
[0060] In this embodiment, the hybrid model is trained with a large amount of labeled data (including data samples under different network environments and device states) so that it can accurately identify the network congestion level (divided into no congestion, light congestion, moderate congestion, and severe congestion) and the device resource load status (light load, medium load, heavy load), and mine the complex correlation relationship between the two. The output of the hybrid model is the classification results of the network congestion level and the device resource load status, as well as the numerical value of the correlation degree between them. Specifically, the network congestion level is divided into four categories: no congestion, light congestion, moderate congestion, and severe congestion; the device resource load status is divided into three categories: light load, medium load, and heavy load. The numerical value of the correlation degree represents the mutual influence strength between network congestion and device resource load, and the value range is [0,1]. The larger the value, the stronger the correlation. The way to reflect the correlation relationship through the output is as follows: when the model predicts the network congestion level and the device resource load status, it will output a numerical value of the correlation degree according to the features and patterns learned during the training process. For example, if it is predicted that the network is in severe congestion, and at the same time the device resource load is heavy, and the numerical value of the correlation degree is 0.8, this indicates that there is a strong correlation between network congestion and device resource load, which may be due to the tight device resources resulting in low data processing and transmission efficiency, thus exacerbating network congestion; on the contrary, if the numerical value of the correlation degree is 0.2, it means that the correlation between the two is weak.
[0061] The training data covers the change patterns of the device CPU usage rate and memory usage rate under different network congestion levels, as well as the reverse impact of tight device resources on network performance, enabling the model to comprehensively understand the system state changes. The change patterns of network environment data: For network environment data such as network bandwidth, latency, and packet loss rate, calculate their change rate, acceleration, periodicity, etc. under different time scales. For example, the change rate of network bandwidth can be calculated by the ratio of the bandwidth difference between adjacent acquisition cycles to the time interval; acceleration is the change rate of the change rate. Periodicity can be analyzed by methods such as Fourier transform to obtain the period and frequency of bandwidth fluctuations. These metrics can quantify the change patterns of network environment data.
[0062] The change patterns of device resource data: For device resource data such as device CPU usage rate, memory usage rate, and power, calculate their change rate, acceleration, and periodicity in the same way. In addition, the change rules of device resource data under different task types can also be analyzed. For example, under compute-intensive tasks, data transmission-intensive tasks, and storage-intensive tasks, the change curves of the device CPU usage rate and memory usage rate. Through these metrics and curves, the change patterns of device resource data can be digitalized.
[0063] Reverse impact of device resources on network performance: Through experiments and data analysis, the changes in network performance under different device resource states are statistically analyzed. For example, when the CPU usage of the device is relatively high, the changes in network bandwidth, latency, and packet loss rate are measured; when the device memory is insufficient, the stability of network data transmission is observed. These changes are quantified to obtain the reverse impact coefficient of device resources on network performance. For example, if the network latency increases by 5 ms when the CPU usage of the device increases by 10%, the reverse impact coefficient is 0.5 ms / %. Reverse impact of network performance on device resources: Similarly, through experiments and data analysis, the usage of device resources under different network performance states is statistically analyzed. For example, when the network is congested, the changes in CPU usage and memory usage of the device are measured; when the network bandwidth is insufficient, the efficiency of device data processing is observed. These changes are quantified to obtain the reverse impact coefficient of network performance on device resources. For example, if the CPU usage of the device increases by 2% when the network bandwidth decreases by 10 Mbps, the reverse impact coefficient is 0.2% / Mbps.
[0064] During the training process, the RNN model learns the changing patterns of the network environment. The data processing process is exemplified as follows: Time series data such as network bandwidth and latency are sequentially input into the RNN at each time step. For each time step t, the hidden state h of the RNN t According to the current input x t (such as the network bandwidth value at the current moment) and the hidden state h at the previous time step t-1 is updated through a specific update formula. For example: h t =tanh(W ih x t +W hh h t-1 +b h ), where W ih and W hh are weight matrices, and b h is a bias vector. In this way, the RNN can gradually integrate historical information into the hidden state, thereby learning the changing patterns of network bandwidth and latency over time.
[0065] During the training process, when a series of past network bandwidth data is input, the hidden state of the RNN will be continuously updated and learn features such as periodicity and trend in the data. When predicting the network bandwidth at a future time step, the RNN calculates the predicted value through the output layer based on the current input (such as the most recent network bandwidth value) and the current hidden state.
[0066] After training is completed, the RNN can predict the network environment through the model. The calculation of the output layer can be a simple linear transformation, such as y t =W hy ht +b y , where W hy is the output layer weight matrix, and b y is the output layer bias vector, and y t is the predicted network bandwidth value. By learning a large amount of historical data and continuously adjusting the weight matrix and bias vector, the RNN can gradually improve the prediction accuracy, thus achieving the prediction of future trends, such as predicting whether the network bandwidth will increase, decrease, or remain stable in a future period of time.
[0067] The policy generation module is used to generate a dynamic adaptive policy according to the results of the data analysis module combined with the current task requirements and task types.
[0068] Specifically, a dynamic adaptive policy is generated based on the data analysis results and a predefined policy template. The policy generation comprehensively considers multiple factors such as the network environment state (congestion degree, network topology change, etc.), the device resource load state (load category and resource occupancy such as CPU usage, memory usage, power, etc.), the task type (computation-intensive, data transmission-intensive, storage-intensive), and the task priority.
[0069] In addition to considering the current network and device states, the policy generation module also combines the category and association situation based on the analysis module; by mining the association relationship and learning the mutual influence between the network and the device, corresponding policies are generated.
[0070] For example, if the CPU usage rate of a device is too high, it may lead to a slowdown in data processing speed, which in turn exacerbates network congestion. Network congestion may also cause the device to spend more resources to handle data transmission, further increasing the CPU usage rate. Based on this correlation, when the system detects that the network is severely congested and the CPU usage rate of the device exceeds 80%, corresponding strategies can be formulated to alleviate this situation. Specifically, it involves using the correlation to guide task transfer decisions: The discovered correlation can also help the system determine the rationality of transferring computing tasks to other devices. If it is found that the CPU usage rate of some devices is low and their correlation with the current congested network is weak, then transferring computing tasks to these devices can effectively reduce the burden on the current device while avoiding putting more pressure on the network. For example, when the system discovers idle devices with a CPU usage rate below 30%, it can, based on the correlation, determine that these devices can undertake computing tasks without affecting network performance, thus making a decision to transfer tasks. The correlation ensures the execution of critical tasks: Mining the correlation helps the system determine the priorities and safeguard measures for critical tasks. In the case of network congestion and tight device resources, understanding the correlation degree of different tasks with the network environment and device resources can ensure that critical tasks (such as real-time control tasks) are given priority. For example, real-time control tasks have high requirements for network latency and device response time. If the correlation shows that this task is closely related to the current network congestion and high CPU usage rate of the device, then the system will adjust the collaborative task scheduling order of the device to give priority to its execution to ensure the stability and security of the system. Mining the correlation between the network environment state and the device resource load state provides an important basis and guidance for policy generation, enabling the system to formulate more reasonable and effective dynamic adaptive policies according to the actual situation. After the policy is generated, it is immediately transmitted to the communication adaptation subsystem and the device collaboration subsystem to guide subsequent operations.
[0071] To further implement the above technical solution, the communication adaptation subsystem includes a protocol selection and switching module. For the protocol selection and switching module, it adjusts the strategy generation module instructions according to the communication protocol in the dynamic adaptive strategy and selects the corresponding communication protocol from a rich protocol library, such as TCP / IP, UDP, Bluetooth, ZigBee, Near Field Communication (NFC), StarFlash, and other dedicated protocols.
[0072] Regarding the protocol selection in the communication protocol strategy, it makes multi-factor decisions based on network environment characteristics (such as bandwidth, delay, packet loss rate), device resource status (such as power, computing power) and task requirements (such as real-time performance and reliability). For example, in scenarios with abundant network bandwidth (>100Mbps), low delay (<10ms) and extremely high reliability requirements (such as financial transaction data transmission), TCP / IP protocol is preferred; in scenarios with extremely high real-time requirements (such as industrial automation control instruction transmission, the response time must be less than 1ms) and small data volume (each transmission data volume <100 bytes), UDP protocol is selected. When protocol switching is required, efficient negotiation is carried out with the communication peer. The negotiation process adopts an optimized dynamic negotiation algorithm to comprehensively consider network load, device status and task priority to determine the switching time. For example, by real-time monitoring of network traffic and device CPU usage, the time period when the network load is less than 30% and the device resources are relatively idle is selected for switching; the new protocol port allocation adopts an adaptive allocation algorithm, which is intelligently allocated according to device identification, network address and available port range to avoid port conflicts. When switching, a smooth transition mechanism is adopted to ensure the continuity of data transmission. Taking the switch from TCP / IP to UDP as an example, non-critical data transmission is suspended before switching, and the transmission of critical data (such as control instructions and real-time monitoring data) is completed first. Then, the connection and data transmission channel are re-established based on the characteristics of the new protocol to ensure that data is not lost or the loss is minimized.
[0073] Furthermore, the communication adapter subsystem further includes a protocol parameter adjustment and optimization module, which adjusts the protocol parameters in real time according to the current network environment and device status for the selected communication protocol. For the TCP / IP protocol, the congestion control algorithm parameters, window size, and retransmission timeout are dynamically adjusted based on the network bandwidth and latency. For example, the congestion window adjustment algorithm based on the bandwidth-delay product model is adopted. When the network bandwidth is B (Mbps) and the round-trip latency is R (ms), the congestion window size C = B * R / 8 (bytes) to ensure data transmission efficiency and stability; the retransmission timeout is dynamically adjusted according to the network jitter. When the standard deviation of network jitter is σ (ms), the retransmission timeout T = 2 * R + 4 * σ (ms) to avoid misjudged retransmissions caused by network jitter. For the Bluetooth protocol, the connection interval, transmission power, and data transmission rate are dynamically adjusted according to the distance between devices and signal strength. For example, the distance D (meters) between devices is obtained through the built-in distance sensor of the device. When D < 5 meters, the transmission power is reduced to the minimum value P1 (mW), the data transmission rate is increased to the maximum value R1 (Mbps), and the connection interval is shortened to T1 (ms) to reduce energy consumption and improve transmission efficiency; when D > 10 meters, the transmission power is increased to P2 (mW), the data transmission rate is reduced to R2 (Mbps), and the connection interval is extended to T2 (ms) to ensure connection stability. During the parameter adjustment process, a real-time feedback control mechanism is adopted to evaluate the adjustment effect by monitoring performance indicators such as network throughput, latency, and bit error rate. If the network throughput increases and the latency decreases after adjustment, the current parameters are maintained; if the performance does not improve or deteriorates, the parameters are readjusted according to the change trend of the performance indicators and the preset adjustment step until the optimal performance is achieved.
[0074] To further implement the above technical solution, the device collaboration subsystem includes a task allocation and scheduling module, a data interaction and synchronization module, and a collaboration feedback and adjustment module.
[0075] The task allocation and scheduling module is used to receive device collaboration tasks, calculate the task adaptability of each device, and select the device with the highest adaptability for corresponding task allocation; it is used to confirm the task execution order according to the start time of the task.
[0076] Specifically, for refined task classification and evaluation, according to the device collaborative optimization strategy, multi-device collaborative tasks are finely classified and comprehensively evaluated. Task classification is divided into computing-intensive types (such as video encoding, data analysis), data transmission-intensive types (such as real-time video stream transmission, large file transmission), storage-intensive types (such as data backup, database storage), etc. based on computing resource requirements, data transmission requirements, and storage resource requirements. For each task, its resource requirements are accurately evaluated, including computing resource requirements (such as the number of CPU cores, computing time), data transmission requirements (such as bandwidth, transmission frequency), storage resource requirements (such as storage capacity, read / write speed), and execution priority (classified according to the urgency and importance of the task). For example, for a high-definition video conferencing task, video encoding and decoding belong to computing-intensive subtasks, video stream transmission belongs to data transmission-intensive subtasks, and conference record storage belongs to storage-intensive subtasks. The video encoding task evaluation requires 4 CPU cores, and the computing time is expected to be 10 milliseconds per frame; the video stream transmission requires a guaranteed bandwidth of 10 Mbps and a transmission frequency of 30 frames per second; the conference record storage requires 100 GB of storage space, and the read / write speed is not less than 50 MB / s. The execution priority is set according to the type of conference (such as business negotiation, emergency rescue command). In a business negotiation conference, the priority of video quality and stability is relatively high, and in an emergency rescue command conference, the priority of data transmission timeliness and accuracy is the highest.
[0077] Exemplarily, there are a total of n tasks and m devices. For each task i (i = 1, 2, …, n), there are computing resource requirements C i (relative unit), data transmission requirements D i (relative unit), storage resource requirements S i (relative unit), and execution priority P i (ranging from 1 to 10). For each device j (j = 1, 2, …, m), there are computing resource capabilities C pj (relative unit), data transmission capabilities D tj (relative unit), storage resource capacities S cj (relative unit), and current loads L j (ranging from 0 to 1, indicating the proportion of the resources currently used by the device in the total resources).
[0078] The task allocation formula is as follows:
[0079]
[0080] Among them, F ijLet \(F\) be the fitness score, and \(\alpha\), \(\beta\), \(\gamma\), \(\delta\) be the weight coefficients, representing the relative importance of different resource requirements and priorities in task allocation, and \(\alpha+\beta+\gamma+\delta = 1\). For example, for tasks with extremely high real-time requirements, the value of \(\delta\) can be appropriately increased; for compute-intensive tasks, the value of \(\alpha\) can be appropriately increased.
[0081] Then task \(i\) is assigned to the device \(j^*\) with the highest fitness score:
[0082]
[0083] Task scheduling formula:
[0084] Calculate the start time \(T_i\) of task \(i\):
[0085]
[0086] where \(predecessors(i)\) represents the set of predecessor tasks of task \(i\), \(T_k\) is the completion time of predecessor task \(k\), and \(E_k\) is the dependency time (such as data transfer time, data processing time, etc.) between predecessor task \(k\) and task \(i\). The execution order of task \(i\) is sorted according to its start time \(T_i\), and the tasks that start first are executed first.
[0087] In practical applications, the parameters and weight coefficients in the formula need to be adjusted and optimized according to the specific system requirements and scenario characteristics to achieve the best task allocation and scheduling effect. For example, in smart home control tasks, if the current environment has a high requirement for the accuracy of temperature control, the execution priority \(P\) of the temperature adjustment task can be appropriately increased i and the corresponding weight \(\delta\); if the network connection of a certain device is unstable, its data transfer capacity can be appropriately reduced and the weight \(\beta\) in the fitness score calculation.
[0088] For the data interaction and synchronization module, it is used to confirm the data transfer method between devices as synchronous transfer or asynchronous transfer according to the data nature.
[0089] Specifically, according to the nature of the data (real-time data, non-real-time data) and importance, a differentiated data interaction channel and synchronization mechanism are constructed. For data with high real-time requirements (such as industrial automation control data, financial transaction data), a tightly coupled synchronization method based on hardware time synchronization and high-speed network channels is adopted. For example, in an industrial automation control system, a high-precision clock chip (such as a GPS clock or an atomic clock) is used to achieve nanosecond-level time synchronization between devices, and a data transmission channel is constructed through a gigabit Ethernet or high-speed fiber optic network. The data transmission adopts a synchronous transmission mode to ensure that the transmission delay of data between devices is less than 1 millisecond and the timing is accurate. For non-real-time data (such as device log data, historical statistical data), an asynchronous transmission and caching mechanism is adopted to reduce the device waiting time and network load. For example, after the device log data is locally cached to a certain size (such as 1MB), it is asynchronously transmitted to the data storage server by a background thread with a lower priority. During the transmission process, a caching mechanism based on a message queue is adopted. When the network is unavailable, the data is temporarily stored in the message queue and automatically continues to be transmitted after the network is restored to ensure the ultimate integrity of the data. At the same time, a data verification and error handling mechanism based on a hash algorithm and digital signature is adopted to ensure the accuracy and integrity of data transmission. Before data transmission, a hash value is calculated for the data to generate a hash value, and a digital signature is attached. After the receiving party receives the data, it first verifies the digital signature to confirm the legitimacy of the data source, and then recalculates the hash value and compares it with the hash value provided by the sending party. If they are inconsistent, the data is determined to be incorrect, and the sending party is requested to resend the data.
[0090] For the collaborative feedback and adjustment module, during the execution of collaborative tasks by the device, device feedback information is collected in real time through a dedicated feedback channel, including task completion progress, whether errors occur, changes in device status (such as sudden changes in CPU usage rate, sharp drop in battery power, network connection interruption), etc. A feedback processing mechanism combining event-driven and machine learning is adopted. When feedback information is received, first, a quick preliminary judgment is made based on predefined event rules, such as task completion event, error event type identification, etc. For complex situations or abnormal events, a machine learning model is used for in-depth analysis. For example, a device fault prediction model based on the decision tree algorithm is constructed, and the model is trained based on the device's historical operation data (including CPU usage rate, memory usage rate, temperature, etc.) and fault records. When the device feedback information shows that the CPU usage rate continuously exceeds 90% and the temperature rises too fast, the model predicts that the device may have a risk of overheating failure, triggers an early warning mechanism, and recommends taking corresponding measures (such as reducing the task load, starting the cooling fan). According to the feedback analysis results, the task allocation and scheduling plan are adjusted in a timely manner, and the device collaboration process is re-optimized. For example, if a device fails during task execution, backup device resources or other idle device resources are used to re-allocate tasks according to task priorities and resource requirements, and the data interaction channel and synchronization mechanism are adjusted. In a video live broadcast scenario, when the device responsible for video encoding fails, the encoding task is transferred to a backup device, and the video stream transmission parameters (such as resolution, frame rate, bit rate) and synchronization strategy are adjusted according to the performance parameters of the new device and the network connection status to ensure the continuity and quality of the live broadcast.
[0091] To further implement the above technical solution, an offline analysis subsystem is also included. This subsystem regularly performs offline analysis on a large amount of collected environmental perception data and device feedback data, and uses machine learning algorithms (such as neural networks in deep learning) to further optimize the data analysis model and policy template. For example, by analyzing historical network congestion data and the effects of corresponding adjustment strategies, a neural network model is trained to enable it to more accurately predict network congestion situations and generate more effective adjustment strategies. For the device collaboration optimization strategy, by analyzing the execution efficiency of different types of tasks under different device combinations and user feedback, the task allocation and scheduling plan are improved to enhance the overall collaboration performance and user satisfaction.
[0092] In addition, the system can also automatically update the device information database and related policy templates according to the access of new devices or the upgrade of devices, ensuring the system's adaptability to new devices and changes in device performance.
[0093] Furthermore, the system also has the ability of self-learning and improvement. When a new device is connected, the environmental perception subsystem will automatically identify its hardware information and initial resource status, and incorporate this data into subsequent monitoring and analysis processes. In the case of device upgrades and updates, the system can detect changes in device performance parameters. For example, a new CPU architecture may bring an increase in computing power or a new network module may support a higher-speed communication protocol. At this time, the decision-making and planning subsystem will accordingly adjust the rules for policy generation.
[0094] Furthermore, during the offline analysis process, in addition to using neural networks to optimize network congestion prediction and policy adjustment, for device resource monitoring data, models can also be trained to more accurately evaluate device load conditions. For example, by analyzing the CPU, memory, power consumption and other resource usage patterns of different devices when performing various task combinations, a more accurate device load evaluation model can be established. In this way, during the decision-making and policy generation steps, the trend of device resource tension can be more keenly detected, and more reasonable resource allocation and task transfer strategies can be formulated in advance.
[0095] To further implement the above technical solutions, for the optimization of communication protocol adjustment strategies, more network environment factors can also be considered. In addition to network congestion, analyze the impact of factors such as network jitter and packet loss distribution patterns (whether it is continuous packet loss or random packet loss) on the performance of different protocols. Based on these analysis results, further improve the functions of the protocol selection and switching module and the protocol parameter adjustment module. For example, when it is found that the network has frequent small jitters, for real-time data transmission tasks that are sensitive to jitter, a protocol with a better anti-jitter mechanism can be selected or the relevant parameters of the existing protocol can be adjusted to enhance stability.
[0096] For device cooperation optimization strategies, in addition to analyzing execution efficiency and user feedback, the impact of relative position changes between devices (for devices that support position awareness) on communication quality and cooperation effects can also be considered. If the distance between two cooperating devices changes significantly, it may be necessary to re-evaluate the selection of data interaction channels and synchronization mechanisms. For example, for two devices that were originally cooperating via Wi-Fi direct connection, when the distance exceeds the effective range of Wi-Fi, they can automatically switch to using other relay devices or short-range communication protocols such as Bluetooth for data interaction, and at the same time adjust the corresponding synchronization strategy to adapt to the new communication latency and bandwidth limitations.
[0097] To further implement the above technical solution, when a new device is connected to the system, the device resource monitoring module of the environmental perception subsystem first detects the connection signal of the new device. By interacting with the operating system and hardware drivers of the new device, its hardware information (such as processor type, memory specification, supported communication interfaces, etc.) and initial resource status (such as initial CPU usage, memory usage, battery power, etc.) are obtained. These information are stored in the device information database and marked as new devices. At the same time, the network environment monitoring module includes the new device in the monitoring scope of the network topology structure and updates the network topology information in real time. The decision-making and planning subsystem updates the rules for policy generation according to the hardware information and initial resource status of the new device. For device upgrade and update situations, the system regularly (such as once a week) checks the software and hardware version information of the device. When a device upgrade is detected, the environmental perception subsystem re-obtains the resource status and performance parameters of the device and compares the changes before and after the upgrade. For example, if the device CPU architecture upgrade brings an improvement in computing power, the device resource monitoring module passes the new computing power parameters to the decision-making and planning subsystem. The decision-making and planning subsystem adjusts the rules for policy generation according to these changes. For example, for a device that was previously assigned fewer computing tasks due to computing resource limitations, its computing task volume can now be appropriately increased; if the device network module upgrade supports a higher-speed communication protocol, the communication adaptation subsystem updates the protocol list supported by the device in the protocol library and adjusts the communication protocol selection and parameter adjustment strategies to make full use of the new communication capabilities.
[0098] The decision-making and planning subsystem updates the rules for policy generation according to the hardware information and initial resource status of the new device. For the new communication protocol supported by the new device, the communication adaptation subsystem adds it to the protocol library and evaluates its impact on the existing communication strategies. If the new protocol has lower power consumption and higher transmission efficiency, in a suitable scenario (such as communication between low-power devices), it is preferentially selected for use. For example, if the new device supports a new type of low-power Bluetooth protocol, in the communication scenario between smart wearable devices and mobile phones, this protocol is preferentially used for data transmission to extend the battery life of smart wearable devices.
[0099] The device collaboration subsystem re-evaluates the task allocation and scheduling plan according to the capabilities and characteristics of new devices. For example, if a newly connected storage device has a large-capacity storage and a high-speed data transmission interface, data storage-intensive tasks (such as long-term traffic flow data storage and a large number of illegal capture image storage) can be assigned to it, and the data interaction channels and synchronization mechanisms can be adjusted to ensure that data can be efficiently transmitted and stored. For example, migrate the historical traffic flow data originally scattered on multiple devices to the new storage device, optimize the data transmission channels, and adopt high-speed network connections and parallel transmission technologies to improve the data migration speed. At the same time, update the monitoring mechanism of the collaborative feedback and adjustment module so that it can receive and process the feedback information of new devices, ensuring the stability and reliability of new devices in collaborative work. For example, set up a dedicated feedback information processing thread for new devices to timely process information such as the task execution progress and resource usage situation they feedback, so as to be able to quickly respond and adjust in case of anomalies.
[0100] Embodiment 2
[0101] Such as Figure 2 , based on the same inventive concept, an embodiment of the present invention provides a device collaboration optimization method, which is applied to the distributed soft bus system in Embodiment 1, and includes the following steps:
[0102] S1: Obtain network environment data and device resource data through environment perception.
[0103] S2: Extract multi-dimensional features according to the network environment data and device resource data for training the model; and perform data analysis according to the prediction of the trained model to obtain the network congestion and device load status.
[0104] S3: Generate an adaptive policy according to the data analysis result in combination with a preset policy template; the adaptive policy includes a device collaboration optimization policy.
[0105] S4: Allocate and schedule collaborative tasks according to the device collaboration optimization policy.
[0106] Next, each step in this embodiment will be specifically described.
[0107] For S1, when the distributed bus system starts, start environment perception and collect data at a cycle of 50 milliseconds. The data collection methods include:
[0108] (1) Obtain network bandwidth data with the help of a network driver.
[0109] (2) Calculate the round-trip time through sending specific probe packets to confirm the delay data.
[0110] (3) Count the packet loss rate according to the number of sent and received data packets.
[0111] (4) Connect the operating system interfaces of each device in the distributed system to obtain the CPU usage rate.
[0112] (5) Collect the memory usage rate of the device by accessing the memory management module.
[0113] In addition, in the initialization stage, when the devices in the distributed bus system are connected, a detailed list of devices (including device name, IP address, MAC address, etc.) and initial device performance information (such as device computing power score, network connection speed, etc.) can be obtained. Create a communication channel dedicated to device feedback (using an independent message queue mechanism to ensure the timely and accurate transmission of feedback information), and initialize the task allocation and scheduling plan according to the initial device state (such as assigning simple data collection tasks to devices with relatively idle resources).
[0114] After completing the basic data collection, data integration and preprocessing are carried out. Through the intelligent data cleaning algorithm, abnormal peaks and valleys in the network bandwidth data are removed (the threshold range for abnormal value judgment is set according to the network type and historical data distribution. For example, in a conventional office network environment, bandwidth data deviating more than 3 times the standard deviation from the mean is considered abnormal), and the missing values in the device resource data are reasonably estimated and filled based on the device operation mode and historical data trend. Subsequently, Min-Max normalization is used to map the network bandwidth data to the [0,1] interval (let the minimum bandwidth be Bmin, the maximum bandwidth be Bmax, and the normalized bandwidth value Bn is calculated by the formula: ), and the device resource data is also processed in a similar way of normalization to make different types of data comparable. The processed data is stored in the local cache according to the time series, forming an effective data pool for subsequent analysis.
[0115] For S2, first, perform in-depth extraction on the data collected in S1, such as calculating the change rate according to the network bandwidth. The network bandwidth change rate is calculated as the ratio of the bandwidth difference between adjacent collection periods to the time interval (let the current bandwidth be B1, the previous period bandwidth be B0, and the time interval be Δt = 50ms, then the bandwidth change rate ), and the change trend of the device CPU usage rate is determined by analyzing the slope of the fitting line of its recent data points through linear regression.
[0116] Secondly, analyze the data in S2 and the data after in-depth extraction. The analysis process is implemented using a hybrid model of CNN and RNN. CNN extracts the spatial features of the network topology structure and the correlation features of the device resource data, and RNN learns the dynamic change law of the data based on historical data.
[0117] During the training phase of the model, after being trained with a large amount of labeled data, the model accurately classifies the network environment into states such as good, lightly congested, moderately congested, and severely congested, accurately evaluates the device load as light load, medium load, heavy load levels, and discovers the complex correlation between device resources and network states, so as to improve the system's prediction ability, optimize resource allocation, enhance the system's adaptability, and improve the user experience.
[0118] For S3, the policy generation module generates specific policies based on the data analysis results and predefined policy templates. Presented in the form of rules, such as "If the network is severely congested and the device CPU usage exceeds 80%, then reduce the data transmission rate of the device by 50%, transfer the computing task to an idle device with a CPU usage lower than 30%, and at the same time adjust the device collaboration task scheduling order to give priority to ensuring the execution of critical tasks (such as real-time control tasks)".
[0119] The adjustment of the collaboration task scheduling order in S3 is specifically executed by S4. The device collaboration in S4 specifically includes: classifying and evaluating multi-device collaboration tasks to determine the resource requirements (such as computing resources, storage resources, network resources) and execution priorities of each task. Then, query the current status and performance information of the devices and allocate the tasks to the most suitable devices. For example, for a multimedia playback collaboration task, allocate the video decoding task to a device with strong GPU performance and the audio playback task to a device with good audio processing capabilities. At the same time, formulate a task scheduling plan to clarify the start time and execution order of each task to ensure the coordination between tasks.
[0120] Furthermore, for real-time video stream data, a timestamp-based synchronization method is adopted to ensure video playback synchronization on different devices; for user operation data (such as play, pause, fast forward, etc.), an immediate transmission and processing method is adopted to ensure the consistency of the user experience. During the data transmission process, data accuracy and integrity are ensured through data verification and error handling mechanisms.
[0121] Furthermore, S4 also includes continuously collecting feedback information during the device's task execution process. The device reports the task execution progress, whether errors occur, changes in device resources, etc. to this module through a dedicated feedback channel. When receiving the feedback information, analyze the content of the information. If it is found that the task execution is abnormal (such as device failure, task execution time exceeding the expectation) or the device resource status has changed significantly (such as the device power is too low), adjust the task allocation and scheduling plan in a timely manner and re-optimize the device collaboration process. For example, if a device fails during task execution, re-allocate its task to other available devices and adjust the data interaction channel and synchronization mechanism.
[0122] Taking the smart home control task as an example, it includes subtasks such as lighting control, temperature regulation, and security monitoring. The lighting control task has high real-time requirements but low computational resource needs. The temperature regulation task requires a certain amount of computational resources to process sensor data and control algorithms. The security monitoring task has high demands for storage and network resources:
[0123] First, finely evaluate the resource requirements and execution priorities of each subtask. The lighting control task is evaluated as having a computational resource requirement Cl = 0.1 (relative unit), a data transmission requirement Dl = 0.05 (relative unit), a storage resource requirement Sl = 0.01 (relative unit), and an execution priority Pl = 9 (highest is 10); the temperature regulation task has a computational resource requirement Ct = 0.3, a data transmission requirement Dt = 0.1, a storage resource requirement St = 0.05, and an execution priority Pt = 7; the security monitoring task has a computational resource requirement Cs = 0.2, a data transmission requirement Ds = 0.5, a storage resource requirement Ss = 0.8, and an execution priority Ps = 5.
[0124] Then query the current status of the devices and allocate the lighting control task to a device close to the light with strong Wi-Fi signal and outstanding low-latency communication capabilities (assuming the device latency is Ld and the signal strength is Sg, select a device with Ld < 10ms and Sg > -50dBm), allocate the temperature regulation task to a device with moderate CPU performance and connected to a temperature sensor (assuming the CPU performance evaluation value is Cp, select a device with 0.3 < Cp < 0.7 and equipped with a temperature sensor), and allocate the security monitoring task to a device with a large storage capacity and stable network bandwidth (assuming the storage capacity is M and the network bandwidth fluctuation is ΔB, select a device with M > 1TB and ΔB < 10%).
[0125] At the same time, formulate a task scheduling plan and arrange the task execution according to the user operation priority and the system operation logic sequence. For example, the user's manual operation of lighting control has the highest priority and is executed first; secondly, the temperature is automatically adjusted according to the temperature sensor data; finally, the continuous execution and data storage of the security monitoring task are carried out.
[0126] The data interaction and synchronization module constructs data interaction channels and synchronization mechanisms according to the task characteristics and device status. For the lighting control task, an immediate command transmission and execution mechanism is adopted. When the user sends lighting switch or brightness adjustment instructions through a control device such as a mobile phone, they are quickly transmitted to the lighting control device via low-latency Wi-Fi direct connection or Bluetooth connection (connection latency is less than 20 ms) and executed immediately. For the temperature regulation task, the temperature sensor collects temperature data every 10 seconds and sends it to the temperature regulation device through a reliable TCP / IP protocol (with the retransmission count set to 3 times). The device calculates the adjustment instructions based on the received data and the preset PID control algorithm, and then sends the instructions to temperature regulation devices such as air conditioners. For the security monitoring task, the camera device continuously collects video data and transmits it to the storage device through a high-speed network channel (such as Gigabit Ethernet or 5G network, ensuring a bandwidth greater than 100 Mbps). A timestamp-based synchronization method (timestamp accuracy is 1 ms) is used to ensure the continuity and integrity of the video data. Checksum information (using the CRC-32 checksum algorithm) is added to the data transmitted between devices. After receiving the data, the receiving party performs a check. If data errors are found, the sending party is requested to resend the data.
[0127] The collaborative feedback and adjustment module continuously collects feedback information during the device's task execution. After the lighting control device executes the instruction, it sends the instruction execution result (such as the light has been successfully turned on or the brightness has been adjusted) to the collaborative feedback and adjustment module. If an abnormality occurs during the calculation of the adjustment instructions by the temperature regulation device (such as abnormal sensor data or algorithm execution error), the error type and relevant data are reported in a timely manner. If problems such as insufficient storage capacity (assuming the remaining storage capacity is Rm and the threshold is Rt, when Rm < Rt) or network connection interruption (detected through network heartbeat packets, and judged as interrupted if no response is received continuously 3 times) occur when the security monitoring device stores video data, it feeds back to this module. When the collaborative feedback and adjustment module receives the feedback information, it analyzes the information content. If it is a normal feedback of successful instruction execution, relevant information is recorded; if it is an abnormal feedback, adjustments are made according to the abnormal type and the current device status. For example, when the sensor data of the temperature regulation device is abnormal, the device is notified to collect data again or switch to a backup sensor; when the storage capacity of the security monitoring device is insufficient, a storage cleaning strategy (deleting expired video data, setting cleaning rules based on the data storage time and importance, such as deleting video data in non-critical areas that is more than 7 days old first) or an extended storage solution (connecting an external storage device, such as a USB flash drive or a network storage server) is started, and at the same time, the data transmission strategy is adjusted (reducing the video resolution, assuming the original resolution is R0, and the adjusted resolution Ra = R0 * 0.8 to reduce the data volume).
[0128] To further implement the above technical solution, the adaptive strategy generated in S3 further includes a communication protocol adjustment strategy. S4 further includes selecting a switched communication protocol according to the communication protocol adjustment strategy and performing corresponding real-time parameter adjustment strategies for different types of communication protocols.
[0129] Exemplarily, if it is necessary to switch from TCP / IP to the UDP protocol, first comprehensively query the detailed information of the UDP protocol in the protocol library, including port allocation rules (using a hash algorithm based on device identification and network address to allocate ports. Let the device identification be ID, the network address be IP, and the hash function be H, then the allocated port P = H(ID + IP)), data packet size limit, etc. Then negotiate with the communication peer about the protocol switch. The negotiation content includes the switch time (determined based on network load monitoring data and task priority. Let the network load threshold be Lt, the current network load be L, and the task priority be Pt. When L < Lt and Pt is high, select the current time as the switch time Ts), setting of new protocol parameters (such as the UDP data packet size is determined according to network bandwidth and data transmission requirements. Let the network bandwidth be B, the data transmission volume be D, and the data packet size ) etc. After the negotiation is completed, at the switch time point, suspend the transmission of non-critical data under the current TCP / IP protocol, and fully complete the ongoing critical data transmission (such as the transmission of control instructions for an established connection). Then start the UDP protocol communication, and reconstruct the data transmission channel according to the new protocol characteristics to ensure a smooth transition of data transmission and minimize data loss or the amount of lost data.
[0130] The protocol parameter adjustment module adjusts the selected protocol parameters according to the strategy. For the TCP / IP protocol, modify the window size through the operating system network protocol stack interface (using a congestion window adjustment algorithm based on network bandwidth and latency. Let the network bandwidth be B (Mbps), the round-trip latency be R (ms), and the congestion window size C = B * R / 8 (bytes)), retransmission timeout (dynamically adjusted according to network jitter. Let the standard deviation of network jitter be σ (ms), and the retransmission timeout T = 2 * R + 4 * σ (ms)), congestion control algorithm parameters, etc. During the adjustment process, monitor the changes in network throughput (measured by counting the amount of data transmitted per unit time) and latency (calculating the round-trip time by sending probe packets) in real time. If the throughput increases and the latency decreases after the adjustment, it indicates that the adjustment is effective; otherwise, re-adjust the parameters according to the new environment perception data until the network performance reaches the optimal state.
[0131] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0132] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A dynamic adaptive distributed soft bus system, characterized in that: It includes environment perception subsystem, decision-making and planning subsystem, communication adaptation subsystem and equipment coordination subsystem; The environment perception subsystem is used to obtain network environment data and device resource data; The decision-making and planning subsystem is used to extract multi-dimensional features to train the neural network model, and use the trained neural network model to perform predictive analysis; and is used to generate dynamic adaptive strategies based on the analysis results combined with the preset strategy template; The communication adaptation subsystem and the device coordination subsystem perform communication device and device coordination adjustment according to the corresponding dynamic adaptive strategy; the device coordination subsystem is also used to feed back coordination status to the decision and planning subsystem.
2. A dynamic adaptive distributed soft bus system according to claim 1, characterized in that: The environmental perception subsystem includes a network environment monitoring module, a device resource monitoring module, and a data integration and preprocessing module; The network environment monitoring module is used to detect basic network parameters, network topology and network type; The device resource monitoring module is used to obtain the usage status information and hardware information of each device; The data integration and preprocessing module is used to clean the data and map the network environment data and the equipment resource data to the standard area level.
3. A dynamic adaptive distributed bus system according to claim 1 or 2, characterized in that: The decision-making and planning subsystem includes a data analysis module and a strategy generation module; The data analysis module uses a hybrid model that integrates convolutional neural networks and recurrent neural networks to extract spatial features and temporal features to predict network environment status and device resource load status; The strategy generation module is used to generate the dynamic adaptive strategy according to the network environment status and the device resource load status in combination with the current task type.
4. A dynamic adaptive distributed bus system according to claim 3, characterized in that: The network environment data includes network topology and network type; the device resource data includes a change pattern of resource usage.
5. A dynamic adaptive distributed bus system according to claim 1, characterized in that: The communication adaptation system includes a protocol selection and switching module and a protocol parameter adjustment and optimization module; The protocol selection and switching module is used to select a corresponding communication protocol in the protocol library according to the protocol adjustment strategy in the dynamic adaptive strategy; The protocol parameter adjustment and optimization module is used to adjust the protocol parameters in real time according to the network environment and device status.
6. A dynamic adaptive distributed bus system according to claim 5, characterized in that: The communication protocols include TCP / IP protocol and Bluetooth protocol; For the TCP / IP protocol, dynamically adjust congestion control algorithm parameters, window size and retransmission timeout according to network bandwidth and delay; For the Bluetooth protocol, the connection interval, transmission power and data transmission rate are dynamically adjusted according to the distance between devices and the signal strength.
7. The adaptive distributed bus system according to claim 1, characterized in that: The device collaboration subsystem includes a task allocation and scheduling module, a data interaction and synchronization module, and a collaborative feedback and adjustment module; The task allocation and scheduling module is used to receive device collaborative tasks and calculate the task fitness in combination with each device, and select the device with the highest fitness for corresponding task allocation; and is used to confirm the task execution order according to the task start time; The data interaction and synchronization module is used to determine whether the data transmission mode between devices is synchronous transmission or asynchronous transmission according to the data properties; The collaborative feedback and adjustment module is used to collect device feedback information in real time through a dedicated feedback channel during the process of the device performing a collaborative task, including task completion progress, whether an error occurs, and device status changes.
8. A device collaborative optimization method, characterized in that: The distributed soft bus system applied to any one of claims 1 to 7 comprises the following steps: Obtain network environment data and device resource data; Extract multi-dimensional features based on the network environment data and the device resource data for model training; and perform data analysis based on the trained model prediction to obtain network congestion and device load status; Generate an adaptive strategy based on the data analysis results combined with a preset strategy template; the adaptive strategy includes a device collaborative optimization strategy; The collaborative tasks are allocated and scheduled according to the device collaborative optimization strategy.
9. The device collaborative optimization method according to claim 8, characterized in that: The adaptive strategy also includes a communication protocol adjustment strategy, according to which a corresponding communication protocol is selected and protocol parameters are adjusted in real time according to different protocol types.
10. The device collaborative optimization method according to claim 8, characterized in that: The steps also include: when the device executes a collaborative task, feeding back task collaboration information through a specific channel, and determining a task execution event based on the fed-back task collaboration information.
Citation Information
Cited By
SD-WAN low-delay data transmission method and system based on edge computing
CN120321256A