Multi-link data routing method based on internet of things embedded system

CN122909189APending Publication Date: 2026-10-13SHENZHEN BRIGHT DIAMOND TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611253459.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

该类方法缺少对链路持续劣化过程、切换期间未确认数据、备用链路准备时间及迁移资源占用的同步约束,容易出现计算阶段形成的主备路由配置在实际切换阶段无法执行的问题

Benefits of technology

[0080]1、本发明中,首先通过对传统静态多选择多维背包算法进行改进,引入链路状态迁移推演和连续性包络,将正常状态、预异常状态及切换状态下的最低有效传输速率、迁移完成时间、最大未确认数据量和最大分片乱序跨度纳入候选配置评价;将主配置与影子容量配置耦合,并采用多维支配筛选和增量凸包构造压缩候选空间,从而提高链路劣化识别灵敏度、候选配置筛选精度及异常迁移可执行性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122909189A_ABST
    Figure CN122909189A_ABST
Patent Text Reader

Abstract

The application discloses a multi-link data routing method based on an Internet of Things embedded system, relates to the technical field of communication network routing control, and comprises the following steps: collecting the states of each communication interface of the Internet of Things embedded system, determining candidate links, collecting candidate link state data and candidate link capability data, and generating a link credibility change sequence through time alignment, normalization and change calculation. In the application, the traditional static multi-selection multi-dimensional knapsack algorithm is improved, link state transition deduction and continuity envelope are introduced, the minimum effective transmission rate, transition completion time, maximum unconfirmed data volume and maximum fragmentation out-of-order span in the normal state, pre-exceptional state and switching state are included in candidate configuration evaluation, the main configuration is coupled with the shadow capacity configuration, multi-dimensional dominance screening and incremental convex hull are adopted to construct a compressed candidate space, and therefore the link degradation identification sensitivity, candidate configuration screening accuracy and exception transition executability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication network routing control technology, and in particular to a multi-link data routing method based on an Internet of Things (IoT) embedded system. Background Technology

[0002] IoT terminals and edge nodes are typically configured with multiple communication links from cellular networks, Wi-Fi, LoRa, Bluetooth, Mesh self-organizing networks, and wired networks. Existing technologies mainly select the current link based on fixed priority, instantaneous signal quality, or one-way transmission cost. It is difficult to uniformly compare the link status under different communication protocols, and it is also difficult to generate differentiated data routing schemes based on service latency, reliability, fragmentation conditions, and device resource status.

[0003] Existing multi-link configuration selection methods typically express each candidate configuration as a static benefit and static resource consumption, and select the configuration under current energy, bandwidth, and cache constraints. These methods lack synchronous constraints on the continuous degradation process of links, unacknowledged data during handover, backup link preparation time, and migration resource consumption. This can easily lead to problems where the primary and backup routing configurations formed during the calculation phase cannot be executed during the actual handover phase. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a multi-link data routing method based on an IoT embedded system.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a multi-link data routing method based on an IoT embedded system, comprising:

[0006] Collect the status of each communication interface of the IoT embedded system, determine candidate links, collect candidate link status data and candidate link capability data, and generate a link reliability change sequence after time alignment, normalization and change calculation.

[0007] Receive the data to be transmitted, obtain the service transmission requirements, evaluation weights, residual tolerances, node resource status and encapsulation rules, and generate the service routing attribute vector, evaluation weight vector, routing execution residual tolerance threshold vector, node resource constraint vector and routing encapsulation parameters.

[0008] Based on the candidate link status, service routing attributes, and node resource constraints, latency, reliability, energy consumption, bandwidth congestion, and handover adaptation parameters are calculated, and a weighted sequence of candidate link routing adaptability is generated.

[0009] For each batch of data to be transmitted, a candidate group is established, and configuration items for single link, primary and backup link, multi-link fragmentation and multi-link redundancy are constructed and matched with backup links. Configuration items that do not meet the requirements for latency, reliability, fragmentation permission and redundancy permission are deleted, and a basic candidate route configuration item set is generated.

[0010] Based on the set of basic candidate route configuration items, the link credibility change sequence, and the node resource constraint vector, a continuous envelope, shadow capacity configuration, and main configuration-shadow capacity coupling item are generated. The coupled convex hull is constructed and combined selection and conflict verification are performed to generate executable route configuration and expected route execution results.

[0011] Based on the executable routing configuration, the data to be transmitted is numbered, fragmented, copied, encapsulated, and sent, and a transmission tracking record, a communication module energy metering record, a receiving side fragment sequence number record, and a data confirmation status record are established.

[0012] When the link anomaly risk value meets the link switching trigger condition, the shadow capacity configuration is activated, the migration object is determined, and data re-fragmentation, transmission sequence number adjustment and connection order rearrangement are performed. Data migration and link switching are completed through the backup link.

[0013] The actual route execution result is generated based on the transmission tracking record, communication module energy metering record, link switching event record, data confirmation status record, and receiving side fragment sequence number record. The route execution residual is calculated and a feedback correction instruction is generated. The executable route configuration and the expected route execution result are updated.

[0014] As a further description of the above technical solution:

[0015] The generated link credibility change sequence includes:

[0016] Read the communication protocol type, driver loading status, interface enable status, network registration status, and link connectability status of the communication interface. Determine the communication interfaces that meet the requirements of driver loading completion, communication protocol stack initialization completion, interface enable status, and data transmission capability as candidate communication interfaces. Register the corresponding communication links according to the link identifier and generate a candidate link set.

[0017] Collect transmission latency, packet loss rate, retransmission rate, available bandwidth, queue occupancy rate, signal quality, link connection status, energy consumption per unit data transmission, historical transmission success rate and historical fault records for each candidate link, generate candidate link status data, and obtain candidate link capability data.

[0018] Add link identifiers and sampling timestamps to the candidate link status data, align and arrange them according to a unified detection time window to generate the original link status sequence, and determine the detection period based on the time interval between adjacent sampling timestamps;

[0019] Based on the communication protocol type, the candidate link status data is converted in units, the value direction is unified and the interval is normalized. The current status value, the difference between adjacent detection time windows, the rate of change, the fluctuation amplitude and the duration of the anomaly are calculated to generate a set of link status change parameters.

[0020] Based on the set of link status change parameters, historical transmission success rate and historical fault records, calculate the link reliability, link stability, link congestion, link energy consumption and link fault risk, and generate the link credibility according to the preset credibility weights.

[0021] The link reliability corresponding to each detection time window is arranged according to the sampling timestamp. The ratio of the difference in link reliability between adjacent detection time windows to the time interval is calculated to generate a link reliability change sequence.

[0022] As a further description of the above technical solution:

[0023] The generated service routing attribute vector, evaluation weight vector, route execution residual tolerance threshold vector, node resource constraint vector, and route encapsulation parameters include:

[0024] Receive data to be transmitted through the application programming interface, and read the service identifier, data length and data type;

[0025] Based on the service identifier, query the service transmission policy table to obtain the service priority, maximum tolerable latency, minimum reliability requirement, maximum allowable packet loss rate, fragmentation permission identifier, redundancy permission identifier, order preservation identifier, transmission confirmation identifier, confirmation waiting time, maximum tolerable interruption time, minimum migration ratio, and maximum tolerable reassembly time. Calculate the data generation rate and average data unit length, and generate the service routing attribute vector according to the unified field order.

[0026] Based on the service priority, query the service evaluation weight table to obtain the latency weight, reliability weight, energy consumption weight, bandwidth congestion weight, and handover weight, and generate an evaluation weight vector; based on the service identifier, query the residual tolerance rule table to obtain the residual thresholds corresponding to transmission latency, packet loss rate, transmission energy consumption, migration completion time, unacknowledged data volume, and fragmentation out-of-order span, and generate a routing execution residual tolerance threshold vector.

[0027] Collect remaining power, power supply status, transmission buffer status, task scheduling status, communication module working status, and current amount of data to be transmitted; determine normal transmission energy budget, normal transmission buffer budget, communication module available working time budget, and abnormal migration buffer budget; and generate node resource constraint vectors.

[0028] Based on the network protocol stack configuration file and routing data encapsulation rules, obtain the retransmission buffer coefficient, service sequence number length, fragment sequence number length, and acknowledgment status field length, and generate routing encapsulation parameters.

[0029] As a further description of the above technical solution:

[0030] The candidate link route adaptability sequence includes:

[0031] The current transmission delay of each candidate link is compared with the maximum tolerable delay of the service. The current transmission delay is subtracted from the maximum tolerable delay of the service, and the difference is divided by the maximum tolerable delay of the service to generate the delay adaptation parameters.

[0032] The current link reliability is compared with the minimum reliability requirement of the service. The minimum reliability requirement of the service is subtracted from the current link reliability. The difference is then divided by the minimum reliability requirement of the service to generate reliability adaptation parameters.

[0033] Multiply the unit data transmission energy consumption by the data length of the data to be transmitted, subtract the multiplication result from the normal transmission energy budget, and divide the difference by the normal transmission energy budget to generate the energy consumption adaptation parameters.

[0034] Multiply the value obtained by subtracting the queue occupancy rate from 1 by the current available bandwidth, divide the data length by the result of the multiplication, divide the data generation rate by the current available bandwidth, add the two ratios together, and then subtract the result of the addition from 1 to generate the bandwidth congestion adaptation parameter.

[0035] When a current target link exists, handover adaptation parameters are generated based on the comparison results of the link identifiers of the candidate link and the current target link, the working status of the communication module, and the wake-up time of the communication module; when there is no current target link marker, handover adaptation parameters are generated based on the working status of the communication module and the wake-up time of the communication module.

[0036] The latency adaptation parameter, reliability adaptation parameter, energy consumption adaptation parameter, bandwidth congestion adaptation parameter, and handover adaptation parameter are multiplied by their respective weights. The results of each multiplication are summed, and the sum is divided by the sum of the weights to generate the route adaptation degree. The route adaptation degrees of each candidate link are arranged according to the link identifier to generate a candidate link route adaptation degree sequence.

[0037] As a further description of the above technical solution:

[0038] The basic candidate route configuration items include:

[0039] Configure a candidate group identifier for each batch of data to be transmitted, and associate the link identifier and routing adaptability of the candidate links with the candidate group identifier;

[0040] Each candidate link is sequentially identified as the target link carrying all the data to be transmitted, and a single link configuration item is generated; two different candidate links are selected, the one with higher routing adaptability is identified as the target link, and the other candidate link is identified as the backup link, and a primary and backup link configuration item is generated.

[0041] Select at least two candidate links and write them into the target link set. Determine the link priority according to the route adaptability. Determine the ratio of the route adaptability of each target link to the total route adaptability as the initial data allocation ratio and generate a multi-link fragmentation configuration item. Determine the initial data allocation ratio of each target link as the ratio corresponding to all data to be transmitted and generate a multi-link redundancy configuration item.

[0042] For single-link configuration items, multi-link sharding configuration items, and multi-link redundancy configuration items, candidate links in the target link set are excluded, and the remaining candidate links that meet the minimum reliability requirements of the service and have the highest routing adaptability are determined as backup links.

[0043] Based on route adaptability, unit data transmission energy consumption, data generation rate, data length, and current transmission latency, determine the current route benefit, normal transmission energy, normal bandwidth usage, normal buffer usage, and expected transmission latency, and generate a normal resource consumption vector.

[0044] Configure configuration identifiers for each configuration item, and associate them with candidate group identifiers, routing modes, target link sets, backup links, link priorities, initial data allocation ratios, current route benefits, normal resource consumption vectors, and expected transmission delays;

[0045] Delete configuration items that do not meet the maximum tolerable latency, minimum reliability requirements, sharding permission conditions, and redundancy permission conditions, and generate a basic candidate route configuration item set.

[0046] As a further description of the above technical solution:

[0047] Generate an executable route configuration and the expected route execution results, including:

[0048] Associate basic candidate route configuration items with link reliability change sequences, link status change parameter sets and candidate link status data, and associate candidate link capability data with backup links; accumulate backup link preparation time, determine the pre-abnormal state start boundary and initial link switching trigger conditions, iterate the target link status, and generate candidate configuration state migration sequences;

[0049] Extract the minimum effective transmission rate, maximum transmission delay in pre-abnormal state, migration completion time, maximum unacknowledged data volume, maximum out-of-order fragment span, and proportion of migrated data to generate a continuous envelope. Then, generate a set of non-dominated continuous candidate configuration items through business continuity filtering and state condition dominance screening.

[0050] The minimum reserved bandwidth of the backup link is determined based on the available bandwidth of the backup link, the effective migration and transmission time, and the maximum amount of unacknowledged data. The unacknowledged data migration buffer capacity, the transmission sequence number synchronization buffer capacity, the backup link pre-connection time slice, the working time of the backup communication module, and the fragmentation reconstruction connection bandwidth are calculated to generate the shadow capacity configuration.

[0051] The main configuration is generated based on the routing mode, target link set, link priority, initial data allocation ratio, current routing benefit, expected transmission delay and normal resource consumption vector. The main configuration, continuous envelope and shadow capacity configuration are bound together to generate the main configuration-shadow capacity coupling item. The coupled convex hull vertex set is generated through composite encoding, dominance comparison and incremental convex hull construction.

[0052] A shadow capacity conflict matrix is ​​generated based on the overlap of pre-connection time slices and resource occupancy of backup links; a composite configuration vector is selected from each candidate group, resource constraints and shadow capacity conflict verification are performed, feasible composite configuration combinations are generated, the combination with the largest total routing benefit is determined as the target composite configuration combination, and an executable routing configuration and expected routing execution results are generated.

[0053] As a further description of the above technical solution:

[0054] The generation of transmission tracking records, communication module energy metering records, receiver-side fragment sequence number records, and data acknowledgment status records includes:

[0055] Based on the routing mode, target link set, link priority, data allocation ratio and routing encapsulation parameters in the executable routing configuration, the data to be transmitted is numbered, fragmented, copied and encapsulated to generate a sequence of routing data units.

[0056] When each routing data unit enters the communication module's sending queue, the sending timestamp is recorded, and the service sequence number, fragment sequence number, target link identifier, sending timestamp, and data confirmation status are associated to generate a sending tracking record;

[0057] The system collects the operating voltage, operating current, and start and end times of the communication module during data transmission, calculates the energy consumption of the communication module, and generates an energy metering record for the communication module. When no voltage detection circuit and current detection circuit are configured, the system calculates the energy consumption of the communication module based on the operating status, operating power, and operating duration of the communication module.

[0058] The single-link configuration item sends the routing data unit sequence through the corresponding target link; the primary / backup link configuration item sends the routing data unit sequence through the target link and reserves abnormal migration resources for the backup link; the multi-link sharding configuration item allocates the routing data unit sequence according to the data allocation ratio and adds the service sequence number, shard sequence number, total number of shards and link identifier; the multi-link redundancy configuration item sends the same data content or key data copies through different target links.

[0059] Upon receiving an acknowledgment message, the system reads the service sequence number, fragment sequence number, and acknowledgment status field, matches the sending tracking record, generates a received acknowledgment timestamp, and updates the data acknowledgment status to "acknowledged." If no acknowledgment message is matched after the acknowledgment waiting time, the system updates the data acknowledgment status to "timeout unacknowledged."

[0060] Record the service sequence number and fragment sequence number according to the arrival order of the confirmation messages, generate the receiving side fragment sequence number record, and generate the data confirmation status record based on the data confirmation status in the transmission tracking record.

[0061] As a further description of the above technical solution:

[0062] The process of completing data continuity and generating link switching event records via the backup link includes:

[0063] During the transmission of routing data units, the current transmission delay, current packet loss rate, current available bandwidth, current signal quality, and current link reliability are collected according to the detection cycle through the communication module driver, network protocol stack statistics interface, and link detection program corresponding to the current target link.

[0064] Calculate the changes in current transmission delay, current packet loss rate, current available bandwidth, current signal quality, and current link reliability in adjacent detection periods, generate current link status change parameters, generate an initial link anomaly risk value based on the current link status change parameters of the first detection period, and recursively generate an updated link anomaly risk value based on the current link status change parameters of subsequent detection periods and the link anomaly risk value of the previous detection period.

[0065] When the link anomaly risk value meets the link switching triggering condition, record the link switching triggering time, activate the shadow capacity configuration, and perform standby communication module wake-up, standby link pre-connection, sequence number synchronization, and unacknowledged data migration cache allocation.

[0066] Based on the data confirmation status record, the routing data units are divided into unsent routing data units, sent but unconfirmed routing data units, and confirmed routing data units. Confirmed routing data units are excluded, and the data volume of the remaining routing data units is accumulated to generate the total amount of data that actually needs to be migrated and the routing data units to be migrated.

[0067] The total amount of data that actually needs to be migrated is compared with the upper limit of unconfirmed data migration and the cache capacity of unconfirmed data migration. If it does not exceed the two limits, all routing data units to be migrated are identified as migration objects. If either limit is exceeded, the migration objects are determined according to business priority, business sequence number and data confirmation status.

[0068] Based on the maximum transmission unit of the backup link, the current available bandwidth, and the fragmentation reconstruction connection bandwidth, perform data re-fragmentation, transmission sequence number adjustment, and connection order rearrangement on the migration object to generate a backup link transmission sequence, and then send the backup link transmission sequence through the backup link.

[0069] When the backup link completes the migration of unconfirmed data and begins to continuously carry subsequent routing data units, the time when the backup link completes the data connection is recorded. The link switching trigger time, the time when the backup link completes the data connection, the original target link identifier, and the backup link identifier are written into the link switching event record. The backup link is updated to the current target link, and the normal transmission resources and unused shadow capacity configuration occupied by the original target link are released.

[0070] As a further description of the above technical solution:

[0071] Generating the actual route execution results and updating the executable route configuration based on the route residuals includes:

[0072] Count the total number of routing data unit records, the number of confirmed status records, and the number of timeout unacknowledged status records in the transmission tracking record, and generate the number of transmissions, the number of acknowledgments, and the number of timeout unacknowledged records.

[0073] The actual transmission delay is calculated based on the sending timestamp and the receiving confirmation timestamp. The actual packet loss rate is calculated based on the number of packets sent, the number of confirmations, and the number of unacknowledged packets that timed out. The actual transmission energy consumption is generated by accumulating the energy consumption of the communication module.

[0074] The actual migration completion time is calculated based on the link switching trigger time and the backup link data connection completion time. The actual maximum unconfirmed data volume is determined according to the detection cycle. The actual maximum out-of-order fragment span is calculated based on the maximum arriving fragment sequence number and the minimum consecutively confirmed fragment sequence number.

[0075] The actual routing execution results are generated by associating the actual transmission latency, actual packet loss rate, actual transmission energy consumption, actual migration completion time, actual maximum unacknowledged data volume, and actual maximum fragment out-of-order span with the data batch identifier.

[0076] Calculate the difference between the actual route execution result and the corresponding data in the expected route execution result, generate a route execution residual vector, compare each residual with the corresponding threshold, and generate a feedback correction instruction when any residual exceeds the corresponding threshold.

[0077] Based on the feedback correction instructions and the actual routing execution results, the link state change parameters, link credibility, and link credibility change rate of the candidate links are corrected, and the current routing benefits and normal resource consumption vectors of the basic candidate route configuration items are also corrected.

[0078] Based on the corrected set of link state change parameters, the link credibility change sequence, and the set of basic candidate route configuration items, the candidate link route fitness is recalculated and the multi-select multidimensional knapsack convex hull routing algorithm is executed to generate updated executable route configurations and updated expected route execution results.

[0079] The present invention has the following beneficial effects:

[0080] 1. In this invention, the traditional static multi-choice multidimensional knapsack algorithm is improved by introducing link state transition deduction and continuous envelope. The minimum effective transmission rate, migration completion time, maximum unacknowledged data volume, and maximum fragment out-of-order span in the normal state, pre-abnormal state, and switching state are included in the candidate configuration evaluation. The main configuration and shadow capacity configuration are coupled, and multidimensional dominance screening and incremental convex hull construction are used to compress the candidate space, thereby improving the sensitivity of link degradation identification, the accuracy of candidate configuration screening, and the executability of abnormal migration.

[0081] 2. In this invention, the bandwidth, buffer, and communication module working time of the shared backup link are jointly verified in time and space by using the shadow capacity conflict matrix. The adjacent composite configuration vector in the coupled convex hull is used to replace the over-limit combination with the minimum benefit loss, so as to avoid generating route combinations that appear feasible but are actually unexecutable. At the same time, the algorithm parameters are corrected and re-solved based on the residual between the expected route execution result and the actual route execution result, thereby improving the conflict location capability, feasible combination search efficiency, link switching response time, long-term route prediction accuracy and operational stability. Attached Figure Description

[0082] Figure 1 This is a diagram illustrating the method steps of the present invention. Detailed Implementation

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

[0084] Reference Figure 1 The present invention provides an embodiment of a multi-link data routing method based on an IoT embedded system, comprising:

[0085] Collect the status of each communication interface of the IoT embedded system, determine candidate links, collect candidate link status data and candidate link capability data, and generate a link reliability change sequence after time alignment, normalization and change calculation.

[0086] Receive the data to be transmitted, obtain the service transmission requirements, evaluation weights, residual tolerances, node resource status and encapsulation rules, and generate the service routing attribute vector, evaluation weight vector, routing execution residual tolerance threshold vector, node resource constraint vector and routing encapsulation parameters.

[0087] Based on the candidate link status, service routing attributes, and node resource constraints, latency, reliability, energy consumption, bandwidth congestion, and handover adaptation parameters are calculated, and a weighted sequence of candidate link routing adaptability is generated.

[0088] For each batch of data to be transmitted, a candidate group is established, and configuration items for single link, primary and backup link, multi-link fragmentation and multi-link redundancy are constructed and matched with backup links. Configuration items that do not meet the requirements for latency, reliability, fragmentation permission and redundancy permission are deleted, and a basic candidate route configuration item set is generated.

[0089] Based on the set of basic candidate route configuration items, the link credibility change sequence, and the node resource constraint vector, a continuous envelope, shadow capacity configuration, and main configuration-shadow capacity coupling item are generated. The coupled convex hull is constructed and combined selection and conflict verification are performed to generate executable route configuration and expected route execution results.

[0090] Based on the executable routing configuration, the data to be transmitted is numbered, fragmented, copied, encapsulated, and sent, and a transmission tracking record, a communication module energy metering record, a receiving side fragment sequence number record, and a data confirmation status record are established.

[0091] When the link anomaly risk value meets the link switching trigger condition, the shadow capacity configuration is activated, the migration object is determined, and data re-fragmentation, transmission sequence number adjustment and connection order rearrangement are performed. Data migration and link switching are completed through the backup link.

[0092] The actual route execution result is generated based on the transmission tracking record, communication module energy metering record, link switching event record, data confirmation status record, and receiving side fragment sequence number record. The route execution residual is calculated and a feedback correction instruction is generated. The executable route configuration and the expected route execution result are updated.

[0093] Call the communication interface management program of the IoT embedded system to read the interface identifier, communication protocol type, driver loading status, interface enable status, network registration status, and link connectability status of the cellular communication module, Wi-Fi communication interface, LoRa communication interface, Bluetooth communication interface, Mesh communication interface, and wired network interface.

[0094] The process involves comparing the driver loading status with the driver loading completion status of each communication interface, retaining those interfaces with completed driver loading; comparing the initialization status of the corresponding communication protocol stack with the initialization completion status, retaining those interfaces with completed initialization; comparing the enabled status of the corresponding interfaces with the enabled status, retaining those interfaces in the enabled state; and determining whether the communication interface has data transmission capability based on the network registration status and link connectivity status of the retained interfaces. Communication interfaces that simultaneously meet the requirements of driver loading completion, communication protocol stack initialization completion, being in the enabled state, and having data transmission capability are identified as candidate communication interfaces. A correspondence is established between the communication links corresponding to the candidate communication interfaces and the interface identifiers, and the interface identifiers are used as link identifiers to register the corresponding communication links, generating a candidate link set.

[0095] The candidate link status data is collected from each candidate link in the candidate link set through the communication module driver, network protocol stack statistics interface, and link detection program in the IoT embedded system. The candidate link status data includes transmission latency, packet loss rate, retransmission rate, available bandwidth, queue occupancy rate, signal quality, link connection status, energy consumption per unit data transmission, historical transmission success rate, and historical fault records.

[0096] By utilizing the device description file, communication module hardware parameter table, communication driver capability table, and protocol stack configuration file of the IoT embedded system, candidate link capability data is obtained for each candidate link. This candidate link capability data includes the link's maximum transmission unit, maximum available bandwidth, communication module wake-up time, connection establishment time, network registration time, authentication time, link detection time, and communication module operating power.

[0097] The system reads the routing table, connection management records, and current data transmission task records of the IoT embedded system. It matches the link identifier in the current data transmission task record with the link identifier in the routing table and verifies the current connection status of the matched link against the connection management records. If the matched link is currently undertaking a data transmission task, it is designated as the current target link; otherwise, no currently matching link is found, and a "no current target link" flag is generated.

[0098] Candidate link status data is divided according to link identifiers, so that transmission delay, packet loss rate, retransmission rate, available bandwidth, queue occupancy rate, signal quality, link connection status, unit data transmission energy consumption, historical transmission success rate, and historical fault records with the same link identifier are grouped into the same candidate link. A corresponding link identifier and sampling timestamp are attached to each candidate link status data. A unified detection time window is determined based on the sampling timestamps, and candidate link status data with the same link identifier and sampling timestamps within the same unified detection time window are grouped into the same data segment. The candidate link status data in each data segment are arranged in ascending order of sampling timestamps, and the data segments are connected according to the time order of the unified detection time window to generate the original link status sequence corresponding to each candidate link.

[0099] The time intervals between adjacent sampling timestamps in the original link state sequence are calculated in chronological order, and the time intervals are arranged according to the order of their corresponding sampling timestamps. The numerical changes between consecutive time intervals are compared to determine the range within which consecutive sampling time intervals remain stable, and the detection period is determined based on the stable range of consecutive sampling time intervals.

[0100] Based on the communication protocol type of each candidate link, the units of measurement for transmission delay, packet loss rate, retransmission rate, available bandwidth, queue occupancy rate, signal quality, and energy consumption per unit of data transmission in the original link state sequence are determined. Unit conversions are performed on similar data using different units of measurement to ensure that transmission delay for different candidate links uses the same time unit, packet loss rate, retransmission rate, and queue occupancy rate are expressed using the same proportional method, available bandwidth uses the same bandwidth unit, signal quality uses the same numerical method, and energy consumption per unit of data transmission uses the same energy consumption unit.

[0101] For transmission delay, packet loss rate, retransmission rate, queue occupancy rate, and energy consumption per unit of data transmission, the values ​​are maintained in the direction that an increase in these values ​​indicates a deterioration in link status. The values ​​for available bandwidth and signal quality are adjusted to reflect changes in link status in a unified manner. Based on the numerical range of the same data item in the original link status sequence, the maximum and minimum values ​​for each data item are determined. The difference between each data item and its corresponding minimum value is divided by the difference between its corresponding maximum and minimum value, thus converting transmission delay, packet loss rate, retransmission rate, available bandwidth, queue occupancy rate, signal quality, and energy consumption per unit of data transmission to the same numerical range, resulting in normalized data for each item.

[0102] The normalized data is divided into categories according to the detection cycle. The normalized data with the latest sampling timestamp within the same detection time window is determined as the current state value of the corresponding detection time window. The difference between the current state values ​​of adjacent detection time windows is calculated by subtracting the current state value of the previous detection time window from the current state value of the current detection time window. The difference between adjacent detection time windows is then divided by the time interval between adjacent detection time windows to obtain the rate of change of the corresponding data.

[0103] Compare the maximum and minimum values ​​of each normalized data point within the same detection time window, and determine the fluctuation range of the corresponding data as the difference between the maximum and minimum values. Continuously count the time during which each normalized data point remains in an abnormal state according to the sampling timestamp, and determine the abnormal duration as the time difference between the first corresponding sampling timestamp and the last consecutive corresponding sampling timestamp.

[0104] The current state value corresponding to transmission delay is determined as the current transmission delay; the current state value corresponding to packet loss rate is determined as the current packet loss rate; the current state value corresponding to available bandwidth is determined as the current available bandwidth; and the current state value corresponding to signal quality is determined as the current signal quality. Simultaneously, the rates of change of transmission delay, packet loss rate, available bandwidth, and signal quality are determined. The current transmission delay, current packet loss rate, current available bandwidth, current signal quality, rates of change of transmission delay, rates of change of packet loss rate, rates of change of available bandwidth, rates of change of signal quality, fluctuation amplitude, and duration of anomalies are correlated according to the link identifier and detection time window to generate a set of link state change parameters.

[0105] The link reliability is calculated based on the changes in current transmission latency and packet loss rate, as well as historical transmission success rates reflecting historical transmission results. The link stability is calculated based on the continuous changes in link status reflected by current signal quality, fluctuation amplitude, and abnormal duration. The link congestion is calculated based on the link transmission load reflected by the current available bandwidth and queue occupancy rate in candidate link status data. The link energy consumption is calculated based on the energy consumption per unit of data transmission in candidate link status data. The link failure risk is calculated based on the abnormal duration and link anomalies reflected by historical fault records.

[0106] The link reliability, stability, congestion, energy consumption, and failure risk of each candidate link are compiled according to the detection time window. The historical transmission success rate and historical failure records for the same detection time window are correlated with the five calculated results. The link reliability, stability, congestion, energy consumption, and failure risk are varied, and the correlation between these changes and the decrease in historical transmission success rate, the occurrence of historical failures, and the duration of historical failures is compared. When the link reliability changes, the historical transmission success rate changes significantly and continuously, indicating that the link reliability has a significant impact on the actual transmission results; therefore, the preset credibility weight corresponding to the link reliability is increased accordingly. When the link stability changes, the more significant the change in transmission results corresponding to the fluctuation amplitude and abnormal duration, the more significant the preset credibility weight corresponding to the link stability is. When the link congestion changes, the more significant the change in the historical transmission success rate corresponding to the current available bandwidth and queue occupancy rate, the more significant the preset credibility weight corresponding to the link congestion is. The more significant the impact of changes in unit data transmission energy consumption on the link's continuous data transmission capacity, the more significant the preset credibility weight corresponding to the link energy consumption is. The higher the correlation between link failure risk and historical failure time, failure type, and failure duration, the higher the preset credibility weight corresponding to the link failure risk. After comparing the five levels of impact, the relative magnitudes of the weights are determined according to the degree of impact from largest to smallest. The weights corresponding to link reliability, link stability, link congestion, link energy consumption, and link failure risk are uniformly adjusted to ensure that the sum of the five preset credibility weights remains one.

[0107] The link reliability, link stability, link congestion, link energy consumption, and link failure risk are multiplied by their respective preset credibility weights. The results of each multiplication are summed, and the sum is adjusted according to the sum of the preset credibility weights to generate the link credibility for each detection time window.

[0108] The link confidence levels for each detection time window are divided according to the link identifier, ensuring that the link confidence levels for the same candidate link belong to the same sequence. The link confidence levels for the same candidate link within each detection time window are arranged in chronological order of sampling timestamps, and the link confidence level for the latest detection time window is determined as the current link confidence level. The link confidence level for the current detection time window is subtracted from the link confidence level for the previous detection time window to obtain the difference in link confidence levels between adjacent detection time windows. The difference in link confidence levels is then divided by the time interval between adjacent detection time windows to obtain the link confidence level change rate. The link confidence levels for each detection time window, the current link confidence level, and the link confidence level change rate are arranged according to the link identifier and sampling timestamp to generate a link confidence level change sequence for each candidate link.

[0109] The system receives data to be transmitted through the application programming interface of the IoT embedded system, and reads the service identifier, data length and data type carried in the data to be transmitted, so that the service identifier, data length and data type are associated with the corresponding data to be transmitted.

[0110] The service identifier carried by the data to be transmitted is compared with the service identifier in the service transmission policy table stored locally in the IoT embedded system. The content with the same service identifier is located, and the corresponding service priority, maximum tolerable latency, minimum reliability requirement, maximum allowable packet loss rate, fragmentation permission identifier, redundancy permission identifier, order preservation identifier, transmission confirmation identifier, confirmation waiting time, maximum tolerable interruption time, minimum migration ratio, and maximum tolerable reassembly time are read to ensure that the various service transmission requirements and the data to be transmitted maintain the same correspondence under the same service identifier.

[0111] The application uses a data generation counter to count the amount of data to be transmitted generated per unit time. The data generation rate is calculated by dividing the amount of data to be transmitted generated per unit time by the corresponding unit time. The average length of the data unit is calculated by dividing the length of the data to be transmitted by the number of data units.

[0112] The service priority, maximum tolerable latency, minimum reliability requirement, maximum allowable packet loss rate, data length, fragmentation permission identifier, redundancy permission identifier, order preservation identifier, transmission acknowledgment identifier, acknowledgment waiting time, maximum tolerable interruption time, minimum migration ratio, maximum tolerable reassembly time, data generation rate, and average data unit length are arranged in sequence to ensure that each data item corresponding to the same service identifier occupies the corresponding position in a unified field order, thereby generating a service routing attribute vector.

[0113] The service priority in the service routing attribute vector is compared with the service priority in the service evaluation weight table stored locally in the IoT embedded system. The content with the same service priority is located, and the corresponding latency weight, reliability weight, energy consumption weight, bandwidth congestion weight and handover weight are read. The latency weight, reliability weight, energy consumption weight, bandwidth congestion weight and handover weight are arranged in sequence to generate the evaluation weight vector.

[0114] The service identifier carried in the data to be transmitted is compared with the service identifier in the residual tolerance rule table stored locally in the IoT embedded system. The content with the same service identifier is located, and the corresponding transmission delay residual threshold, packet loss rate residual threshold, transmission energy consumption residual threshold, migration completion time residual threshold, unconfirmed data volume residual threshold, and fragment out-of-order span residual threshold are read. The transmission delay residual threshold, packet loss rate residual threshold, transmission energy consumption residual threshold, migration completion time residual threshold, unconfirmed data volume residual threshold, and fragment out-of-order span residual threshold are arranged in sequence to generate a routing execution residual tolerance threshold vector.

[0115] The remaining power and power supply status are collected through the battery management circuit of the IoT embedded system; the total capacity and current occupancy of the transmission buffer are collected through the transmission buffer management program of the operating system; the processor utilization and the number of communication tasks to be executed are collected through the task scheduler; the working status, wake-up time and energy consumption of the communication module are collected through the power management program of the communication module; and the amount of data to be sent is counted through the transmission task queue.

[0116] The remaining power available for the communication module is limited based on the power supply status, and the normal transmission energy budget is determined by combining the unit energy consumption of the communication module. The current transmission buffer occupancy is subtracted from the total transmission buffer capacity, and the normal transmission buffer budget is determined based on the subtraction result. The time the communication module can be used for communication within the system task scheduling cycle is determined based on the communication module's operating status, and the available working time budget for the communication module is determined based on the system task scheduling cycle. The buffer capacity available for abnormal migration in the remaining buffer space is determined based on the priority of the abnormal migration task, and the corresponding buffer capacity is determined as the abnormal migration buffer budget. The normal transmission energy budget, normal transmission buffer budget, available working time budget for the communication module, and abnormal migration buffer budget are sequentially arranged to generate a node resource constraint vector.

[0117] By using the network protocol stack configuration file and routing data encapsulation rules of the IoT embedded system, the retransmission buffer coefficient, service sequence number length, fragment sequence number length, and acknowledgment status field length are obtained. The retransmission buffer coefficient, service sequence number length, fragment sequence number length, and acknowledgment status field length are then arranged in a unified field order to generate routing encapsulation parameters.

[0118] The current transmission delay of each candidate link is compared with the maximum tolerable delay of the service. The current transmission delay is subtracted from the maximum tolerable delay of the service to obtain the difference between the current transmission delay and the maximum tolerable delay of the service. The difference is divided by the maximum tolerable delay of the service so that the difference corresponding to different services can be represented by a consistent numerical range, and the delay adaptation parameters corresponding to each candidate link are generated.

[0119] The current link reliability of each candidate link is compared with the minimum reliability requirement of the service. The minimum reliability requirement of the service is subtracted from the current link reliability to obtain the difference between the current link reliability and the minimum reliability requirement of the service. The difference is divided by the minimum reliability requirement of the service so that the difference corresponding to different services can be represented by a consistent numerical range, and the reliability adaptation parameters corresponding to each candidate link are generated.

[0120] Multiply the unit data transmission energy consumption of each candidate link by the data length of the data to be transmitted, and subtract the multiplication result from the normal transmission energy budget to obtain the energy difference corresponding to the candidate link after completing the data transmission. Divide the energy difference by the normal transmission energy budget to form a unified numerical relationship between the unit data transmission energy consumption, data length and normal transmission energy budget, and generate the energy consumption adaptation parameters corresponding to each candidate link.

[0121] The queue occupancy rate of each candidate link is converted into a value obtained by subtracting the queue occupancy rate from the current available bandwidth, and the current available bandwidth is multiplied by the value obtained by subtracting the queue occupancy rate. The data length of the data to be transmitted is divided by the multiplication result, so that the data length changes accordingly as the current available bandwidth decreases or the queue occupancy rate increases. The data generation rate is divided by the current available bandwidth, so that the data generation rate changes accordingly as the current available bandwidth changes. The two ratios are added together, and the sum is subtracted from the addition result to generate the bandwidth congestion adaptation parameters corresponding to each candidate link.

[0122] When a current target link exists, the link identifiers of each candidate link are compared with those of the current target link. The system determines whether a candidate link should continue using the current target link based on whether the link identifiers match. It also determines whether the communication module can directly handle the transmission of data based on the working status of the corresponding communication module, and the time required for the communication module to transition from its current working state to being able to handle data transmission based on the communication module's wake-up time. Finally, the system combines the link identifier comparison results, the communication module's working state, and the communication module's wake-up time to assign higher values ​​to candidate links that continue using the current target link and whose communication modules can directly operate, and correspondingly lower values ​​to candidate links that need to change the current target link or need to wait for the communication module to wake up, thus generating switching adaptation parameters.

[0123] When there is no current target link marker, the link identifiers of candidate links and the current target link are no longer compared. The working status of the communication module corresponding to each candidate link is used to determine whether the communication module can directly undertake the transmission of the data to be transmitted. The wake-up time of the communication module is used to determine the time required for the communication module to switch from the current working state to be able to undertake the transmission of the data to be transmitted. The candidate links that can directly work are given higher values, while the candidate links that need to wait for the communication module to be woken up are given lower values ​​according to the wake-up time of the communication module, thus generating the switching adaptation parameters.

[0124] Multiply the latency adaptation parameter corresponding to each candidate link by the latency weight in the evaluation weight vector, multiply the reliability adaptation parameter by the reliability weight, multiply the energy consumption adaptation parameter by the energy consumption weight, multiply the bandwidth congestion adaptation parameter by the bandwidth congestion weight, and multiply the handover adaptation parameter by the handover weight; sum the results of the five multiplications, and divide the sum by the sum of the latency weight, reliability weight, energy consumption weight, bandwidth congestion weight, and handover weight to generate the routing adaptation degree of each candidate link for the data to be transmitted.

[0125] The routing adaptability of each candidate link is associated with its corresponding link identifier. The routing adaptability of each candidate link is arranged according to the link identifier to generate a candidate link routing adaptability sequence.

[0126] For each batch of data to be transmitted, a corresponding candidate group is established, a candidate group identifier is configured for the candidate group, and the link identifier and route adaptability of each candidate link in the candidate link route adaptability sequence are associated with the candidate group identifier, so that the candidate links corresponding to the same batch of data to be transmitted participate in the construction of basic candidate route configuration items within the same candidate group.

[0127] Each candidate link in the candidate link routing adaptability sequence is sequentially identified as the target link carrying all the data to be transmitted. The corresponding target link is written into the target link set, the routing mode is determined as a single-link configuration item, and the initial data allocation ratio is determined as the ratio corresponding to all the data to be transmitted. Link priority is determined based on the target link's routing adaptability, and the target link's routing adaptability is determined as the current routing benefit. The unit data transmission energy consumption of the target link is multiplied by the data length to obtain the normal transmission energy. Normal bandwidth usage is calculated based on the data generation rate and the initial data allocation ratio. Normal buffer usage is calculated based on the data length and the initial data allocation ratio. The current transmission delay of the target link is determined as the expected transmission delay, and a single-link configuration item is generated.

[0128] Two different candidate links are selected from the candidate link routing adaptability sequence. The candidate link with higher routing adaptability is designated as the target link for normal transmission, and the other candidate link is designated as the backup link. The target link is added to the target link set, and the routing mode is determined as the primary / backup link configuration item. The initial data allocation ratio of the target link is determined as the proportion corresponding to all data to be transmitted. The link priority is determined from high to low based on the routing adaptability of the target link and the backup link, and the routing adaptability of the target link is determined as the current routing benefit. The unit data transmission energy consumption of the target link is multiplied by the data length to obtain the normal transmission energy. The normal bandwidth usage is calculated based on the data generation rate and the initial data allocation ratio of the target link. The normal buffer usage is calculated based on the data length and the initial data allocation ratio of the target link. The current transmission delay of the target link is determined as the expected transmission delay, and the primary / backup link configuration item is generated.

[0129] Select at least two candidate links from the candidate link routing adaptability sequence, write the selected candidate links into the target link set, and determine the routing mode as a multi-link fragmentation configuration item. Determine the link priority according to the routing adaptability of each target link from high to low, divide the routing adaptability of each target link by the sum of the routing adaptability of all target links in the target link set, and obtain the initial data allocation ratio of the corresponding target link, so that the sum of the initial data allocation ratios of all target links corresponds to all the data to be transmitted.

[0130] The routing adaptability of each target link is multiplied by its corresponding initial data allocation ratio, and the results are summed to generate the current routing benefit of the multi-link fragmentation configuration item. The unit data transmission energy consumption of each target link is multiplied by its data length and corresponding initial data allocation ratio, and the results are summed to obtain the normal transmission energy. The data generation rate is multiplied by its initial data allocation ratio for each target link, and the results are summed to obtain the normal bandwidth utilization. The data length is multiplied by its initial data allocation ratio for each target link, and the results are summed to obtain the normal buffer utilization. The current transmission delay of each target link is compared, and the current transmission delay with the largest value is determined as the expected transmission delay, generating the multi-link fragmentation configuration item.

[0131] Select at least two candidate links from the candidate link routing adaptability sequence, write the selected candidate links into the target link set, and determine the routing mode as a multi-link redundancy configuration item. Determine the link priority according to the routing adaptability of each target link from high to low, and determine the initial data allocation ratio of each target link as the ratio corresponding to all data to be transmitted, so that each target link sends the same data content or a copy of key data.

[0132] The routing adaptability of each target link is summed, and the result is divided by the number of links in the target link set to generate the current routing benefit of the multi-link redundancy configuration item. The unit data transmission energy consumption of each target link is multiplied by the data length, and the results are summed to obtain the normal transmission energy. The data generation rate is used as the bandwidth occupancy for each target link, and the bandwidth occupancy for each target link is summed to obtain the normal bandwidth occupancy. The data length sent by each target link is summed to obtain the normal buffer occupancy. The current transmission delay of each target link is compared, and the current transmission delay with the smallest value is determined as the expected transmission delay, generating the multi-link redundancy configuration item.

[0133] For single-link configuration, multi-link sharding configuration, and multi-link redundancy configuration items, the link identifiers of each candidate link in the candidate link set are compared with the link identifiers in the target link set, and candidate links already written into the target link set are excluded. The current link reliability of the remaining candidate links is compared with the minimum reliability requirement of the service, and candidate links with a current link reliability not lower than the minimum reliability requirement of the service are retained. The route adaptability of the retained candidate links is compared, and the candidate link with the highest route adaptability is determined as the backup link.

[0134] Candidate Link: Optional communication links participating in link state evaluation, route adaptation calculation, and route configuration construction. Target Link: A communication link selected from candidate links for normal transmission of routed data units. Backup Link: A communication link selected from candidate links to take over incomplete data transmission when the target link fails. Current Target Link: The target link currently undertaking data transmission tasks. Original Target Link: The current target link that has been replaced by the backup link and is awaiting release after the abnormal migration is completed.

[0135] Configure corresponding configuration identifiers for each single-link configuration item, primary / backup link configuration item, multi-link sharding configuration item, and multi-link redundancy configuration item. Associate candidate group identifier, routing mode, target link set, backup link, link priority, initial data allocation ratio, current routing benefit, normal transmission energy, normal bandwidth usage, normal buffer usage, and expected transmission delay with the configuration identifiers to generate basic candidate routing configuration items.

[0136] The values ​​are arranged in a unified field order for normal transmission energy, normal bandwidth usage, and normal cache usage. Normal transmission energy occupies the corresponding position in the normal resource consumption vector, normal bandwidth usage occupies the corresponding position in the normal resource consumption vector, and normal cache usage occupies the corresponding position in the normal resource consumption vector. A normal resource consumption vector is generated, and the normal resource consumption vector is associated with the corresponding configuration identifier and written into the basic candidate route configuration item.

[0137] The projected transmission delay of each basic candidate route configuration item is compared with the maximum tolerable delay of the service in the service routing attribute vector. Basic candidate route configuration items with projected transmission delays greater than the maximum tolerable delay of the service are deleted. The current link reliability corresponding to the target link set and backup links is compared with the minimum reliability requirement of the service. Basic candidate route configuration items with current link reliability lower than the minimum reliability requirement of the service are deleted.

[0138] The routing modes of the basic candidate routing configuration items are compared with the fragmentation permission identifiers in the service routing attribute vector. Basic candidate routing configuration items with a multi-link fragmentation routing mode and fragmentation permission identifiers that do not allow fragmentation are deleted. The routing modes of the basic candidate routing configuration items are compared with the redundancy permission identifiers in the service routing attribute vector. Basic candidate routing configuration items with a multi-link redundancy routing mode and redundancy permission identifiers that do not allow redundancy are deleted. Based on the candidate group identifier and configuration identifier, basic candidate routing configuration items that meet the service's maximum tolerable latency, minimum service reliability requirements, fragmentation permission conditions, and redundancy permission conditions are retained, generating a basic candidate routing configuration item set.

[0139] The algorithm employs a multi-select, multi-dimensional knapsack convex hull routing algorithm based on continuous envelope and shadow capacity coupling. It determines the corresponding basic candidate route configuration item based on the configuration identifier in the basic candidate route configuration item. It associates the link reliability change sequence, link state change parameter set, and candidate link state data corresponding to each target link based on the link identifier in the target link set. It associates the candidate link state data and candidate link capability data corresponding to the backup link based on the link identifier of the backup link. This ensures that the routing mode, target link set, backup link, link priority, initial data allocation ratio, current route benefit, normal resource consumption vector, and expected transmission delay maintain the same connection relationship with the corresponding link data under the same configuration identifier.

[0140] The communication module wake-up time, connection establishment time, network registration time, authentication time, and link detection time of the backup link are accumulated according to the execution order of communication module wake-up, connection establishment, network registration, authentication, and link detection. The communication module wake-up time is added to the connection establishment time, and the network registration time, authentication time, and link detection time are added to the sum to generate the backup link preparation time.

[0141] Based on the current link reliability and the rate of change of link reliability of the target link, the link reliability change of the target link is continuously calculated according to the detection cycle. The rate of change of link reliability indicates when the link reliability decreases. The rate of change of link reliability is multiplied by the detection cycle, and the multiplication result is subtracted from the current link reliability to obtain the link reliability corresponding to the next detection cycle. The same calculation method is continued to update the link reliability corresponding to subsequent detection cycles until the updated link reliability no longer meets the minimum reliability requirements of the service. The number of detection cycles corresponding to the change of the current link reliability to the minimum reliability requirements of the service is counted, and the remaining time for the target link to continue to deteriorate to the point of not meeting the minimum reliability requirements of the service is calculated based on the number of detection cycles and the detection cycle.

[0142] The remaining time before the target link deteriorates to the point of failing to meet the minimum reliability requirements of the service is compared with the backup link preparation time. If the remaining time is greater than the backup link preparation time, the link reliability continues to be updated according to the link reliability change rate and detection cycle. If the remaining time is equal to the backup link preparation time, the corresponding link reliability is determined as the pre-abnormal state starting boundary. The initial link switching triggering conditions are defined based on the pre-abnormal state starting boundary and the minimum reliability requirements of the service, so that when the target link meets the initial link switching triggering conditions, the backup link can complete backup link preparation before the target link fails to meet the minimum reliability requirements of the service.

[0143] Based on the current transmission delay and its rate of change for the target link, the rate of change for transmission delay is multiplied by the detection period, and the result is added to the current transmission delay to obtain the transmission delay for the next detection period; based on the current packet loss rate and its rate of change, the rate of change for packet loss is multiplied by the detection period, and the result is added to the current packet loss rate to obtain the packet loss rate for the next detection period; based on the current available bandwidth and its rate of change, the rate of change for available bandwidth is multiplied by the detection period, and the result is added to the current available bandwidth to obtain the available bandwidth for the next detection period; based on the signal quality and its rate of change, the rate of change for signal quality is multiplied by the detection period, and the result is added to the signal quality to obtain the signal quality for the next detection period; based on the current link reliability and its rate of change, the rate of change for link reliability is multiplied by the detection period, and the result is added to the current link reliability to obtain the link reliability for the next detection period. The updated transmission latency, packet loss rate, available bandwidth, signal quality, and link reliability are used to repeat the corresponding calculations, forming iterative results for each detection cycle.

[0144] The transmission delay, packet loss rate, available bandwidth, signal quality, and link reliability corresponding to each detection cycle between the current link reliability and the pre-abnormal state initiation boundary are defined as normal state stage data. After the target link reaches the pre-abnormal state initiation boundary, the transmission delay, packet loss rate, available bandwidth, signal quality, and link reliability continue to be updated according to the detection cycle. The iteration results between the pre-abnormal state initiation boundary and the first fulfillment of the initial link switching trigger condition are defined as pre-abnormal state stage data, and the simulated timestamp of the first fulfillment of the initial link switching trigger condition is defined as the initial link switching trigger time.

[0145] Based on the available bandwidth and queue occupancy rate for each detection cycle during the normal state phase, the effective transmission rate of the target link for sending data to be transmitted in the corresponding detection cycle is calculated. The effective transmission rate and current routing gain for each detection cycle are used as positive data, while the transmission latency, packet loss rate, and unit data transmission energy consumption for the corresponding detection cycle are used as negative data. The calculation result increases when the effective transmission rate or current routing gain increases, and decreases when the transmission latency, packet loss rate, or unit data transmission energy consumption increases. The calculation results for each detection cycle are accumulated to generate the normal state gain.

[0146] The effective transmission rate is calculated based on the available bandwidth and queue occupancy rate corresponding to each detection cycle within the pre-abnormal state phase. The effective transmission rate and link reliability are used as positive data, while transmission latency, packet loss rate, and data loss risk are used as negative data. The calculation result increases when the effective transmission rate or link reliability increases, and decreases when the transmission latency, packet loss rate, or data loss risk increases. The calculation results of each detection cycle are accumulated to generate the pre-abnormal state benefit.

[0147] Based on the current available bandwidth and queue occupancy rate of the target link, the value obtained by subtracting the queue occupancy rate from the current available bandwidth is multiplied by the current available bandwidth to obtain the bandwidth that the target link can currently use for data transmission. The single-link configuration item and the primary / backup link configuration item allocate all the data to be transmitted corresponding to the initial data allocation ratio to the target link; the multi-link fragmentation configuration item multiplies the bandwidth that the target link can currently use for data transmission with the corresponding initial data allocation ratio; the multi-link redundancy configuration item calculates the corresponding transmission rate based on the routing mode of each target link carrying the same data content or a copy of critical data, and generates the expected transmission rate of the target link.

[0148] The proportion of data successfully transmitted and acknowledged is calculated based on the current link reliability and historical transmission success rate of the target link. A transmission acknowledgment flag indicates when acknowledgment is required. The amount of data that can be acknowledged per unit time is calculated based on the acknowledgment waiting time. The expected data acknowledgment rate is generated by reducing the expected data acknowledgment rate when the current link reliability or historical transmission success rate decreases, and vice versa.

[0149] Compare the current available bandwidth of the backup link with the upper limit of available bandwidth. If the current available bandwidth is not higher than the upper limit of available bandwidth, the current available bandwidth is determined as the expected migration transmission rate; if the current available bandwidth is higher than the upper limit of available bandwidth, the upper limit of available bandwidth is determined as the expected migration transmission rate.

[0150] The maximum tolerable business downtime is used as the migration prediction time window. The data generation rate is multiplied by the maximum tolerable business downtime to calculate the amount of data generated within the migration prediction time window.

[0151] The amount of data to be sent within the migration prediction time window is calculated based on the current amount of data to be sent and the amount of data generated within the migration prediction time window. Then, the amount of data that the target link can complete sending from the current time to the initial link handover trigger time is calculated based on the target link's expected sending rate. The estimated amount of data not yet sent at the initial link handover trigger time is calculated by subtracting the amount of data that the target link can complete sending from the sum of the current amount of data to be sent and the amount of data generated within the migration prediction time window. If the subtraction result is less than zero, the estimated amount of data not yet sent is set to zero.

[0152] Calculate the amount of data expected to be sent within the confirmation waiting time based on the expected transmission rate of the target link. Calculate the amount of data expected to be confirmed within the same confirmation waiting time based on the expected data confirmation rate. Subtract the expected amount of confirmed data from the expected amount of data sent to calculate the expected amount of sent but unconfirmed data at the initial link handover trigger time. If the subtraction result is less than zero, the expected amount of sent but unconfirmed data is set to zero.

[0153] Add the estimated amount of data yet to be sent to the estimated amount of data already sent but not yet confirmed to generate the total estimated amount of data to be migrated.

[0154] Divide the estimated amount of unacknowledged data sent by the average length of the data unit. If there is no remainder in the division, the result is taken as the estimated number of unacknowledged data units; if there is a remainder, add one data unit to the integer number corresponding to the division result to generate the estimated number of unacknowledged data units.

[0155] Add the service sequence number length, fragment sequence number length, and acknowledgment status field length to obtain the amount of transmission sequence number status data corresponding to a single expected unacknowledged data unit. Multiply the sum by the number of expected unacknowledged data units to calculate the amount of transmission sequence number status data that needs to be synchronized. Divide the amount of transmission sequence number status data by the expected migration transmission rate to generate the transmission sequence number synchronization time.

[0156] Divide the total amount of data expected to be migrated by the expected migration sending rate to generate the unconfirmed data migration time.

[0157] Starting from the initial link switchover trigger moment, first set the time range corresponding to the backup link preparation time, then set the time range corresponding to the sequence number synchronization time, and finally set the time range corresponding to the unacknowledged data migration time to generate switchover state phase data. Add the backup link preparation time, sequence number synchronization time, and unacknowledged data migration time together to generate the estimated duration of the switchover state.

[0158] Connect the data in the normal state phase, the pre-abnormal state phase, and the switching state phase in chronological order. Associate the normal state benefit, the pre-abnormal state benefit, the expected transmission rate of the target link, the expected data confirmation rate, the expected migration transmission rate, the expected amount of data not yet transmitted, the expected amount of data transmitted but not confirmed, and the expected total amount of data to be migrated with the corresponding configuration identifiers to generate a candidate configuration state migration sequence.

[0159] Based on the available bandwidth and queue occupancy rate corresponding to each detection period in the normal state phase of the candidate configuration state transition sequence, calculate the effective transmission rate that the target link can actually use for sending the data to be transmitted within each detection period. Compare the effective transmission rates corresponding to each detection period, and determine the effective transmission rate with the smallest value as the minimum effective transmission rate.

[0160] Compare the transmission delays corresponding to each detection cycle in the pre-abnormal state stage of the candidate configuration state transition sequence, and determine the transmission delay with the largest value as the maximum transmission delay of the pre-abnormal state.

[0161] The migration completion time is generated by subtracting the initial link switching trigger time from the end time of the switching state phase.

[0162] The estimated amount of unacknowledged data sent at the initial link switching trigger moment is used as the starting value for the unacknowledged data amount. For each subsequent detection period, the data generation rate is multiplied by the detection period, and the result is added to the unacknowledged data amount of the previous detection period; the estimated data acknowledgment rate is multiplied by the detection period, and the corresponding amount of acknowledged data is subtracted from the added unacknowledged data amount; after the backup link begins migration, the estimated migration sending rate is multiplied by the detection period, and the amount of data that has already been migrated through the backup link is subtracted, thus recursively obtaining the estimated unacknowledged data amount for each detection period.

[0163] Compare the expected unconfirmed data volume for each testing cycle, and determine the expected unconfirmed data volume with the largest value as the maximum unconfirmed data volume.

[0164] Divide the maximum number of unconfirmed data units by the average length of the data units. If there is no remainder in the division result, the result is determined as the maximum number of unconfirmed data units; if there is a remainder, add one data unit to the integer number corresponding to the division result to generate the maximum number of unconfirmed data units.

[0165] The multi-link fragmentation configuration allocates data length to each target link based on the initial data allocation ratio corresponding to each target link. It compares the data length corresponding to the service sequence number, fragment sequence number, and acknowledgment status field length with the maximum transmission unit (MTU) of the link, and divides the data into expected fragments based on the data length that the MTU can carry, thus determining the expected number of data fragments. It continuously sets the expected fragment transmission sequence number according to the transmission order of each expected data fragment, and determines the length of each expected data fragment based on the initial data allocation ratio corresponding to each target link. It also recursively estimates the amount of unacknowledged data.

[0166] in, Indicates the first The estimated amount of unconfirmed data corresponding to each testing cycle; This indicates the expected amount of unconfirmed data for the next testing cycle; Indicates the data generation rate; Indicates the expected data confirmation rate; Indicates the first The data rate that completes migration through the backup link within each detection period is zero before the backup link starts migration and the expected migration transmission rate is taken after the migration starts. Indicates the testing cycle; This represents the maximum value among the expected unconfirmed data volumes for each testing cycle, i.e., the maximum unconfirmed data volume.

[0167] Calculate the time required for each data fragment to complete transmission based on its estimated length and the estimated transmission rate of the corresponding target link. Add the estimated transmission time of the previous data fragment to the time required for transmission to calculate the estimated transmission time of the next data fragment. Add the estimated transmission time of each data fragment to the estimated transmission delay of the corresponding target link to generate the estimated arrival time of each data fragment.

[0168] Arrange the expected fragment transmission sequence numbers in order of their expected arrival times from first to last, determine the largest already arrived fragment transmission sequence number, and determine the smallest consecutively acknowledged fragment sequence number that can maintain continuous acknowledgments starting from the first expected fragment transmission sequence number. Subtract the smallest consecutively acknowledged fragment sequence number from the largest arrived fragment sequence number to generate the largest fragment out-of-order span.

[0169] Multiply the expected migration transmission rate by the maximum tolerable service interruption time to calculate the amount of data that can be migrated within the maximum tolerable service interruption time. If the amount of data that can be migrated is not higher than the total amount of data that is expected to be migrated, divide the amount of data that can be migrated by the total amount of data that is expected to be migrated; if the amount of data that can be migrated is higher than the total amount of data that is expected to be migrated, divide the total amount of data that is expected to be migrated by the total amount of data that is expected to be migrated to generate the proportion of data that can be migrated.

[0170] Associating the pre-abnormal state starting boundary, minimum effective transmission rate, pre-abnormal state maximum transmission delay, migration completion time, maximum unacknowledged data volume, maximum unacknowledged data unit number, maximum fragment out-of-order span, and migrated data ratio with the corresponding configuration identifiers generates a continuous envelope corresponding to the basic candidate route configuration items.

[0171] The maximum transmission delay in the pre-abnormal state within the continuous envelope is compared with the maximum tolerable delay of the service. If the maximum transmission delay in the pre-abnormal state exceeds the maximum tolerable delay of the service, the corresponding basic candidate route configuration item is deleted. The migration completion time is compared with the maximum tolerable interruption time of the service. If the migration completion time exceeds the maximum tolerable interruption time of the service, the corresponding basic candidate route configuration item is deleted. The proportion of migrateable data is compared with the minimum migration proportion of the service. If the proportion of migrateable data is lower than the minimum migration proportion of the service, the corresponding basic candidate route configuration item is deleted.

[0172] The retained basic candidate routing configuration items are associated with the normal state benefits, pre-abnormal state benefits, and continuous envelopes corresponding to the same configuration identifier. The retained basic candidate routing configuration items are arranged according to the candidate group identifier to generate a continuous candidate configuration item set.

[0173] Within the same candidate group, select two different continuous candidate configuration items and compare their normal state gains and pre-abnormal state gains. If the normal state gains and pre-abnormal state gains of the first configuration item are both not lower than those of the second configuration item, continue to compare the normal transmission energy, normal bandwidth usage, normal buffer usage, migration completion time, maximum unconfirmed data volume, and maximum fragment out-of-order span of the two continuous candidate configuration items.

[0174] If the normal transmission energy, normal bandwidth usage, normal cache usage, migration completion time, maximum unconfirmed data volume, and maximum fragment out-of-order span of the first configuration item are all no higher than those of the second configuration item, then the second configuration item is deleted. If the normal state benefit, pre-abnormal state benefit, or various resource data of two consecutive candidate configuration items are mutually superior, then both consecutive candidate configuration items are retained. For the remaining consecutive candidate configuration items within the same candidate group, pairwise comparisons are repeated to generate a set of non-dominated consecutive candidate configuration items.

[0175] Based on the backup link identifier in the non-dominated continuity candidate configuration item, the current available bandwidth of the backup link is associated in the candidate link status data, and the available bandwidth limit, communication module wake-up time, connection establishment time, network registration time, authentication time, link detection time and communication module operating power of the backup link are associated in the candidate link capability data, and the connection relationship between each data and the corresponding configuration identifier is maintained.

[0176] The remaining bandwidth limit of the backup link is generated by subtracting the normal bandwidth usage of the backup link currently being used for normal transmission from the available bandwidth limit of the backup link.

[0177] Compare the currently available bandwidth of the backup link with the maximum remaining bandwidth of the backup link. If the currently available bandwidth of the backup link is not higher than the maximum remaining bandwidth of the backup link, the currently available bandwidth of the backup link is determined as the bandwidth that can be reserved for the backup link; if the currently available bandwidth of the backup link is higher than the maximum remaining bandwidth of the backup link, the maximum remaining bandwidth of the backup link is determined as the bandwidth that can be reserved for the backup link.

[0178] The effective migration and transmission time is generated by subtracting the backup link preparation time from the migration completion time and then subtracting the sequence number synchronization time from the result.

[0179] Divide the maximum amount of unacknowledged data by the effective migration transmission time to calculate the minimum reserved bandwidth for the backup link.

[0180] in, Indicates the effective migration transmission time; Indicates the migration completion time; Indicates the preparation time for the backup link; Indicates the sequence number synchronization time; Indicates the minimum reserved bandwidth for the backup link; This represents the maximum amount of unconfirmed data within the continuous envelope; This indicates that bandwidth can be reserved for backup links.

[0181] The minimum reserved bandwidth of the backup link is compared with the available reserved bandwidth of the backup link. If the minimum reserved bandwidth of the backup link exceeds the available reserved bandwidth of the backup link, the corresponding non-dominated continuity candidate configuration item is deleted; if the minimum reserved bandwidth of the backup link does not exceed the available reserved bandwidth of the backup link, the corresponding non-dominated continuity candidate configuration item is retained.

[0182] Calculate the unacknowledged data migration cache capacity by multiplying the maximum amount of unacknowledged data by the retransmission cache coefficient.

[0183] The length of the service sequence number, the length of the fragment sequence number, and the length of the acknowledgment status field are added together to obtain the transmission sequence number synchronization buffer capacity corresponding to a single data unit. The sum is then multiplied by the maximum number of unacknowledged data units to calculate the transmission sequence number synchronization buffer capacity.

[0184] Starting from the initial link switching trigger time, the communication module wake-up time is set as the first time range, the connection establishment time is connected after the communication module wake-up time, the network registration time is connected after the connection establishment time, the identity authentication time is connected after the network registration time, and the link detection time is connected after the identity authentication time, thus generating a backup link pre-connection time slice.

[0185] The backup link preparation time, the sequence number synchronization time, and the effective migration and transmission time are added together to generate the backup communication module's working time.

[0186] Multiply the maximum out-of-order span of the fragment by the average length of the data unit to calculate the amount of data that needs to be continuously reassembled; divide the amount of data that needs to be continuously reassembled by the maximum tolerable reassembly time of the business to calculate the fragment reassembly continuity bandwidth.

[0187] The initial link switching trigger condition is determined as the initial shadow capacity activation condition, and the termination of the primary configuration, the completion of data connection of the backup link, or the completion of the transmission of the corresponding batch of data to be transmitted are determined as the shadow capacity release conditions.

[0188] The shadow capacity configuration is generated based on the configuration identifier associated with the backup link, the minimum reserved bandwidth of the backup link, the unconfirmed data migration buffer capacity, the sequence number synchronization buffer capacity, the backup link pre-connection time slice, the working duration of the backup communication module, the fragmentation reconstruction connection bandwidth, the initial shadow capacity activation conditions, and the shadow capacity release conditions. The reserved bandwidth of the backup link continues to participate in subsequent verification as a backup link capability constraint, but is not written into the shadow capacity configuration.

[0189] The configuration type for normal transmission is determined based on the routing mode in the non-dominated continuity candidate configuration items. The link for normal transmission is determined based on the target link set. The usage order of each target link is determined based on the link priority. The data ratio carried by each target link is determined based on the initial data allocation ratio. The transmission revenue of the corresponding configuration is recorded based on the current routing revenue. The transmission time of the corresponding configuration is recorded based on the expected transmission delay. The normal transmission energy, normal bandwidth usage, and normal buffer usage are recorded based on the normal resource consumption vector. The main configuration is generated, and the initial data allocation ratio is determined as the data allocation ratio corresponding to the main configuration.

[0190] The main configuration is bound to the corresponding continuity envelope and shadow capacity configuration according to the configuration identifier, so that the normal transmission content, service continuity boundary and abnormal migration resources corresponding to the same configuration identifier are associated, and a main configuration-shadow capacity coupling item is generated.

[0191] Following a unified field order, the current routing benefit in the main configuration-shadow capacity coupling item is written to the corresponding position in the composite configuration vector. The normal transmission energy, normal bandwidth usage, and normal buffer usage are written to the corresponding positions. The migration completion time, maximum unacknowledged data volume, and maximum fragment out-of-order span in the continuous envelope are written to the corresponding positions. The minimum reserved bandwidth of the backup link, the unacknowledged data migration buffer capacity, the sequence number synchronization buffer capacity, and the backup communication module working time in the shadow capacity configuration are written to the corresponding positions to generate the composite configuration vector.

[0192] Determine the maximum and minimum values ​​of the following parameters within the same candidate group: current route benefit, normal transmission energy, normal bandwidth usage, normal buffer usage, migration completion time, maximum unacknowledged data volume, maximum fragment out-of-order span, minimum reserved bandwidth for backup links, unacknowledged data migration buffer capacity, sequence number synchronization buffer capacity, and backup communication module operating time. Convert values ​​of different dimensions to the same range based on these maximum and minimum values. The evaluation principle is to prioritize higher values ​​for current route benefit, while lower values ​​are preferred for normal transmission energy, normal bandwidth usage, normal buffer usage, migration completion time, maximum unacknowledged data volume, maximum fragment out-of-order span, minimum reserved bandwidth for backup links, unacknowledged data migration buffer capacity, sequence number synchronization buffer capacity, and backup communication module operating time.

[0193] The candidate group identifier, configuration identifier, standby link identifier, and standby link pre-connection time slice are associated with the composite configuration vector, so that the composite configuration vector can follow the configuration relationship of the corresponding primary configuration-shadow capacity coupling item.

[0194] Composite configuration vectors with the same candidate group identifier are grouped into the same candidate group, and two different composite configuration vectors are selected within the same candidate group for multidimensional dominance comparison.

[0195] If the current routing benefit of the first composite configuration vector is not lower than that of the second composite configuration vector, and the normal transmission energy, normal bandwidth usage, normal buffer usage, migration completion time, maximum unacknowledged data volume, maximum fragment out-of-order span, minimum reserved bandwidth for backup links, unacknowledged data migration buffer capacity, sequence number synchronization buffer capacity, and backup communication module working time of the first composite configuration vector are all not higher than those of the second composite configuration vector, then the second composite configuration vector shall be deleted. If the current routing benefits or various resource data of the two composite configuration vectors are mutually superior, both composite configuration vectors shall be retained to continue participating in the multidimensional dominance comparison.

[0196] The retained composite configuration vectors are arranged in descending order of current route revenue; when current route revenue is the same, they are arranged in ascending order of normal transmission energy; when current route revenue and normal transmission energy are both the same, they are arranged in ascending order of normal bandwidth usage; when current route revenue, normal transmission energy, and normal bandwidth usage are all the same, they are arranged in ascending order of normal cache usage.

[0197] The sorted composite configuration vectors are mapped to a multi-dimensional configuration space comprised of current route benefits, normal transmission energy, normal bandwidth usage, normal cache usage, migration completion time, maximum unacknowledged data volume, maximum fragment out-of-order span, minimum reserved bandwidth for backup links, unacknowledged data migration cache capacity, sequence number synchronization cache capacity, and backup communication module operating time. First, the top-ranked composite configuration vectors are retained, and then subsequent composite configuration vectors are added sequentially. For each added composite configuration vector, the multi-dimensional positional relationship between the newly added vector and the already retained vectors is compared. If a newly added composite configuration vector is located inside an existing convex hull, it is deleted; if a newly added composite configuration vector expands the boundary of an existing convex hull, it is retained as a vertex of the convex hull. After constructing the convex hulls of all composite configuration vectors within the same candidate group, a set of coupled convex hull vertices is generated.

[0198] Based on the backup link identifier, the vertices of the coupled convex hull that use the same backup link are divided into the same backup link sharing group.

[0199] Subtract the current normal bandwidth usage of the backup link from the available bandwidth limit of the backup link, and compare the result with the current available bandwidth of the backup link. The smaller value is determined as the reserved bandwidth for each backup link.

[0200] Compare the pre-connection time slices of each coupled convex hull vertex in the same pre-connection link group. If the start position of one pre-connection time slice is earlier than the end position of another pre-connection time slice, and the start position of another pre-connection time slice is earlier than the end position of the previous pre-connection time slice, it is determined that there is a time overlap between the corresponding vertex combinations.

[0201] For vertex combinations where the pre-connection time slices of the backup links overlap, the minimum reserved bandwidth of the backup links corresponding to each coupled convex hull vertex during the overlapping period is added together, the unacknowledged data migration buffer capacity is added together, the sequence number synchronization buffer capacity is added together, and the working time of the backup communication module is added together.

[0202] When the cumulative minimum reserved bandwidth of the backup link exceeds the shared reserved bandwidth of the backup link, the corresponding vertex combination is identified as a bandwidth conflict combination. When the sum of the cumulative unacknowledged data migration buffer capacity and the cumulative sequence number synchronization buffer capacity exceeds the abnormal migration buffer budget, the corresponding vertex combination is identified as a buffer conflict combination. When the cumulative working time of the backup communication module exceeds the available working time budget of the communication module, the corresponding vertex combination is identified as a working time conflict combination.

[0203] Based on the configuration identifiers and candidate group identifiers corresponding to bandwidth conflict combinations, cache conflict combinations, and working time conflict combinations, the correspondence between conflicting composite configuration vectors is recorded, and a shadow capacity conflict matrix is ​​generated.

[0204] According to the order of the vertices in the coupled convex hull set corresponding to each candidate group, a composite configuration vector is selected from each candidate group to form a composite configuration combination to be verified.

[0205] The normal transmission energy corresponding to each composite configuration vector in the composite configuration combination to be verified is added together to obtain the cumulative normal transmission energy; the normal bandwidth usage is added together according to the target link identifier; the normal buffer usage corresponding to each composite configuration vector is added together to obtain the cumulative normal buffer usage; the minimum reserved bandwidth of the backup link is added together according to the backup link identifier; the unconfirmed data migration buffer capacity is added together; the sequence number synchronization buffer capacity is added together; and the working time of the backup communication module is added together.

[0206] The following comparisons are made: The cumulative normal transmission energy is compared to the normal transmission energy budget; the cumulative normal buffer usage is compared to the normal transmission buffer budget; the cumulative normal bandwidth usage of each link is compared to the corresponding link's available bandwidth limit; the cumulative minimum reserved bandwidth of each backup link is compared to the corresponding backup link's shared reserved bandwidth; the cumulative unacknowledged data migration buffer capacity and the cumulative sequence number synchronization buffer capacity are compared to the abnormal migration buffer budget; and the cumulative backup communication module operating time is compared to the communication module's available operating time budget.

[0207] Based on the configuration identifier and candidate group identifier corresponding to each composite configuration vector in the composite configuration combination to be verified, query the shadow capacity conflict matrix to determine whether the composite configuration combination to be verified contains bandwidth conflict combination, cache conflict combination or working time conflict combination.

[0208] If the composite configuration combination to be verified satisfies the normal transmission energy budget, normal transmission buffer budget, the upper limit of available bandwidth for each link, the reserved bandwidth shared by each backup link, the abnormal migration buffer budget, and the available working time budget of the communication module, and does not contain bandwidth conflict combinations, buffer conflict combinations, or working time conflict combinations, then the composite configuration combination to be verified is determined as a feasible composite configuration combination.

[0209] When a composite configuration combination to be verified violates any normal transmission resource constraint, abnormal migration resource constraint, or contains shadow capacity conflict, the composite configuration vector that caused the constraint to exceed the limit is determined based on the normal transmission energy, normal bandwidth occupancy, normal buffer occupancy, minimum reserved bandwidth of backup link, unconfirmed data migration buffer capacity, transmission sequence number synchronization buffer capacity, and backup communication module working time corresponding to each composite configuration vector.

[0210] In the set of vertices of the coupled convex hull to which the composite configuration vector that caused the constraint exceedance belongs, adjacent composite configuration vectors are selected according to the order of the vertices of the coupled convex hull. The resource consumption and current route gain of the adjacent composite configuration vectors are compared. The adjacent composite configuration vector with lower resource consumption and the smallest loss of current route gain is selected to replace the composite configuration vector that caused the constraint exceedance.

[0211] For the replaced composite configuration combination, re-accumulate normal transmission energy, normal bandwidth usage of each link, normal buffer usage, minimum reserved bandwidth of each backup link, unconfirmed data migration buffer capacity, sequence number synchronization buffer capacity, and backup communication module operating time. Re-execute resource constraint comparison and shadow capacity conflict judgment until a feasible composite configuration combination is obtained. If there are no composite configuration vectors that can be replaced in the same candidate group, the search for the corresponding composite configuration combination is terminated.

[0212] Change the composite configuration vector selected in each candidate group, and repeat the process of generating composite configuration combinations, accumulating resources, comparing constraints, judging shadow capacity conflicts, and replacing adjacent composite configuration vectors to generate each feasible composite configuration combination.

[0213] The current route revenue corresponding to each composite configuration vector in each feasible composite configuration combination is added together to obtain the total current route revenue of the corresponding feasible composite configuration combination; the total current route revenue of each combination is compared and the feasible composite configuration combination with the largest total current route revenue is determined as the target composite configuration combination.

[0214] in, Indicates the target composite configuration combination; This represents a composite configuration combination to be verified; Represents the set of feasible composite configuration combinations; Indicates the number of candidate groups; Indicates the candidate group number; Indicates from the first The index of the composite configuration vector selected from the set of coupled convex hull vertices corresponding to each candidate group; Indicates the first The candidate group of the first The current routing benefit corresponding to each composite configuration vector.

[0215] Based on the configuration identifiers corresponding to each composite configuration vector in the target composite configuration combination, the corresponding main configuration, continuity envelope, and shadow capacity configuration are associated to ensure that the normal transmission content, continuity boundary, and abnormal migration resources corresponding to each data batch maintain a corresponding relationship.

[0216] Compare the migration completion time with the maximum tolerable service interruption time in the continuity envelope. When the difference between the migration completion time and the maximum tolerable service interruption time decreases, the link switching time corresponding to the initial link switching trigger condition is advanced; when the difference between the migration completion time and the maximum tolerable service interruption time increases, the link switching time corresponding to the initial link switching trigger condition is delayed. Combined with the adjustment range of the pre-abnormal state start boundary limit, the link switching trigger condition is generated.

[0217] Write the link switching trigger condition into the shadow capacity configuration and replace the initial shadow capacity activation condition so that the shadow capacity configuration takes effect when the link switching trigger condition is met.

[0218] The maximum amount of unconfirmed data in the continuous envelope is determined as the upper limit for unconfirmed data migration.

[0219] Generate an executable route configuration by associating the primary configuration, backup link, shadow capacity configuration, link switching trigger conditions, and unconfirmed data migration limit with the data batch identifier.

[0220] The estimated transmission delay in the main configuration is determined as the estimated transmission delay in the expected route execution result.

[0221] The single-link configuration option determines the current packet loss rate of the target link as the expected packet loss rate. The multi-link sharding configuration option multiplies the current packet loss rate of each target link by its corresponding data allocation ratio, and then sums the results to generate the expected packet loss rate. The multi-link redundancy configuration option multiplies the current packet loss rate of each target link to calculate the joint probability that none of the target links successfully completed data transmission, and then determines the joint probability as the expected packet loss rate.

[0222] The normal transmission energy corresponding to the main configuration is used as the expected energy consumption during the normal transmission phase. The working time of the backup communication module is multiplied by the working power of the corresponding communication module to calculate the expected energy consumption during the working period of the backup communication module. The normal transmission energy is added to the expected energy consumption during the working period of the backup communication module to generate the expected transmission energy consumption.

[0223] The migration completion time in the continuous envelope is determined as the expected migration completion time, the maximum amount of unconfirmed data is determined as the expected maximum amount of unconfirmed data, and the maximum out-of-order span of the shard is determined as the expected maximum out-of-order span of the shard.

[0224] Based on the data batch identifier, the expected transmission delay, expected packet loss rate, expected transmission energy consumption, expected migration completion time, expected maximum unacknowledged data volume, and expected maximum fragment out-of-order span are associated to generate the expected routing execution result.

[0225] Based on the routing mode in the executable routing configuration, the configuration option for the data to be transmitted is determined: single-link, primary / backup, multi-link fragmentation, or multi-link redundancy. The target links responsible for data transmission are determined based on the target link set, the usage order of the target links is determined based on link priority, and the amount of data handled by each target link is determined based on the data allocation ratio. Service sequence numbers are configured for the data to be transmitted according to the service sequence number length in the routing encapsulation parameters, fragment sequence numbers are configured for the fragmented data according to the fragmentation sequence number length, and the acknowledgment status field is retained according to its length. When the routing mode corresponds to the multi-link fragmentation configuration, the data to be transmitted is divided into corresponding data fragments according to the data allocation ratio; when the routing mode corresponds to the multi-link redundancy configuration, identical data content or key data copies are replicated. The service sequence number, fragment sequence number, acknowledgment status field, and link identifier are written into the corresponding data content to generate a routing data unit sequence.

[0226] According to the sequence order of the routing data units, each routing data unit is assigned to the transmission queue of the communication module corresponding to the target link. When each routing data unit is written to the transmission queue of the communication module, the system clock of the IoT embedded system is called to read the corresponding system time, and the system time is recorded as the transmission timestamp of the corresponding routing data unit. The service sequence number, fragment sequence number, and link identifier carried by the routing data unit are recorded as the service sequence number, fragment sequence number, and target link identifier in the transmission tracking record, respectively. The transmission timestamp is written to the corresponding position, and the record positions corresponding to the reception confirmation timestamp and data confirmation status are reserved to establish the transmission tracking record for each routing data unit.

[0227] When the communication module begins transmitting routing data units, the operating voltage is continuously collected by the voltage detection circuit in the power supply circuit of the communication module, and the operating current is continuously collected by the current detection circuit. The start and end times of transmission are recorded. The operating duration is calculated based on the start and end times. The operating voltage and operating current are multiplied, and the cumulative multiplication results based on the operating duration are used to calculate the communication module's energy consumption during the transmission of routing data units. The operating voltage, operating current, start and end times, operating duration, and communication module energy consumption are kept correlated to generate a communication module energy metering record.

[0228] When no voltage detection circuit and current detection circuit are configured in the power supply circuit of the communication module, the corresponding operating power of the communication module is determined according to the current operating state of the communication module, the operating duration is calculated according to the start and end time of operation, the operating power of the communication module is multiplied by the operating duration to calculate the energy consumption of the communication module during the transmission of routing data units, and the current operating state of the communication module, the operating power of the communication module, the start and end time of operation, the operating duration and the energy consumption of the communication module are kept in correspondence to generate the energy metering record of the communication module.

[0229] When the routing mode corresponds to the single-link configuration item, the target link carrying all routing data units is determined based on the target link set. Each routing data unit is written into the communication module sending queue of the corresponding target link according to the order of the routing data unit sequence, and the routing data unit sequence is continuously sent through the corresponding target link.

[0230] When the routing mode corresponds to the primary / backup link configuration item, the target link responsible for normal data transmission is determined based on the target link set. Each routing data unit is then sent through the target link according to the sequence of routing data units. Based on the minimum reserved bandwidth of the backup link, the unacknowledged data migration buffer capacity, the sequence number synchronization buffer capacity, the backup link pre-connection time slice, the backup communication module's operating duration, and the fragmentation reconstructing bandwidth in the shadow capacity configuration, abnormal migration resources are reserved for the backup link, ensuring that the backup link maintains the connection relationship with the corresponding target link as specified in the primary / backup link configuration item.

[0231] When configuring multi-link fragmentation in routing mode, the target links in the target link set are arranged according to link priority. The number and length of data fragments handled by each target link are determined based on the data allocation ratio corresponding to each target link. The service sequence number corresponding to the same data to be transmitted is written to each data fragment. Fragment sequence numbers are configured consecutively according to the order of data fragments in the data to be transmitted. The total number of data fragments is written to each data fragment, and the target link identifier responsible for sending the corresponding data fragment is also written to each data fragment. Data fragments with configured service sequence numbers, fragment sequence numbers, total number of fragments, and link identifiers are allocated to different target links according to the data allocation ratio, and the corresponding data fragments are sent through each target link.

[0232] When the routing mode corresponds to the multi-link redundancy configuration item, at least two target links are determined based on the target link set to undertake data transmission. Copying of identical data content or key data copies is performed, ensuring that routing data units corresponding to different target links carry the same service sequence number. The copied identical data content or key data copies are written into the transmission queues of the communication modules of different target links according to link priority, and then transmitted through different target links. This allows the data receiver to identify the repeatedly received data content based on the unified service sequence number.

[0233] The network protocol stack of the IoT embedded system receives the acknowledgment message returned by the data receiving end, and reads the service sequence number, fragment sequence number and acknowledgment status field carried in the acknowledgment message, so that the service sequence number and fragment sequence number in the acknowledgment message can correspond to the service sequence number and fragment sequence number in the transmission tracking record.

[0234] The sequence number in the acknowledgment message is compared with the sequence number in the transmission tracking record. If the sequence numbers are the same, the fragment sequence number is further compared within the transmission tracking record. If both the sequence number and fragment sequence number are the same, the corresponding acknowledgment message is matched with the transmission tracking record. The system clock of the IoT embedded system is used to read the system time corresponding to the arrival of the acknowledgment message, and the system time is written to the successfully matched transmission tracking record. A receive acknowledgment timestamp is generated, and the corresponding data acknowledgment status is updated to "acknowledged" based on the acknowledgment status field in the acknowledgment message.

[0235] The corresponding acknowledgment waiting time is calculated based on the sending timestamp in the sending tracking record. If no acknowledgment message carrying the same service sequence number and fragment sequence number is found within the acknowledgment waiting time after the sending tracking record has expired, the data acknowledgment status in the corresponding sending tracking record will be updated to a timeout unacknowledgment status.

[0236] Arrange the service sequence number and fragment sequence number carried in each confirmation message according to the order in which they arrive at the IoT embedded system, and record the arrival order between each service sequence number and fragment sequence number to generate a receiving-side fragment sequence number record. Associate the service sequence number, fragment sequence number, and corresponding confirmed or timed-out unconfirmed status from the transmission tracking record to generate a data confirmation status record.

[0237] During the transmission of routing data units, the current transmission delay, current packet loss rate, current available bandwidth, current signal quality, and current link reliability are collected according to the detection cycle through the communication module driver, network protocol stack statistics interface, and link detection program corresponding to the current target link. The current transmission delay, current packet loss rate, current available bandwidth, current signal quality, and current link reliability collected in the same detection cycle are kept correlated with the corresponding detection cycle.

[0238] The change in transmission delay between adjacent detection periods is obtained by subtracting the current transmission delay of the previous detection period from the current transmission delay of the current detection period; the change in packet loss rate between adjacent detection periods is obtained by subtracting the current packet loss rate of the previous detection period from the current packet loss rate of the current detection period; the change in available bandwidth between adjacent detection periods is obtained by subtracting the current available bandwidth of the previous detection period from the current available bandwidth of the current detection period; the change in signal quality between adjacent detection periods is obtained by subtracting the current signal quality of the previous detection period from the current signal quality of the current detection period; and the change in link reliability between adjacent detection periods is obtained by subtracting the current link reliability of the previous detection period from the current link reliability of the current detection period. These changes in transmission delay, packet loss rate, available bandwidth, signal quality, and link reliability are then correlated with the corresponding detection periods to generate current link state change parameters.

[0239] Based on the current link status change parameters of the first detection period, the changes corresponding to the increase in current transmission delay and the increase in current packet loss rate are kept in the direction of increasing link anomaly risk. The changes corresponding to the decrease in current available bandwidth, the decrease in current signal quality, and the decrease in current link reliability are converted into the direction of increasing link anomaly risk. The changes after unifying the direction are accumulated to generate the initial link anomaly risk value.

[0240] For each subsequent detection period, the changes in current transmission delay, packet loss rate, available bandwidth, signal quality, and link reliability are aligned to the direction of increasing link anomaly risk. These aligned changes are then added to the link anomaly risk value from the previous detection period to generate an updated link anomaly risk value for the current period. Subsequent detection periods continue to use this updated link anomaly risk value and the current link status change parameters for the next detection period for risk recursion.

[0241] The updated link anomaly risk value is compared with the link switching trigger condition in the executable routing configuration. When the link anomaly risk value meets the link switching trigger condition, the system clock of the IoT embedded system is called to read the corresponding time, which is determined as the link switching trigger time. The corresponding shadow capacity configuration is then activated according to the binding relationship between the primary configuration and the shadow capacity configuration in the executable routing configuration.

[0242] Based on the backup link in the shadow capacity configuration, determine the backup communication module that needs to be woken up, and switch the backup communication module from its current working state to a working state capable of establishing a communication connection; according to the backup link pre-connection time slice, sequentially execute backup link connection establishment, network registration, identity authentication, and link detection to complete the backup link pre-connection; allocate corresponding caches for service sequence number, fragment sequence number, and acknowledgment status field according to the transmission sequence number synchronization cache capacity, and synchronize the current data transmission status to the backup link; allocate cache space for storing migration data according to the unacknowledged data migration cache capacity; reserve the bandwidth required for the backup link to perform unacknowledged data migration and subsequent data continuation according to the minimum reserved bandwidth and fragment reconstructing connection bandwidth of the backup link.

[0243] During the periods of backup communication module wake-up, backup link pre-connection, sequence number synchronization, and unacknowledged data migration buffer allocation, the operating voltage of the backup communication module is collected through the voltage detection circuit in the power supply circuit of the communication module, and the operating current of the backup communication module is collected through the current detection circuit. The operating voltage and operating current are then written into the communication module energy metering record. Based on the communication module energy consumption calculation method already used in the communication module energy metering record, the energy consumption of the communication module during the operation of the backup communication module is accumulated, and the communication module energy metering record is updated.

[0244] Based on the data confirmation status of each routing data unit in the data confirmation status record, routing data units whose data confirmation status has not yet formed a sending record are identified as unsent routing data units, routing data units whose sending records have been formed but have not been updated to the confirmed status are identified as sent but unconfirmed routing data units, and routing data units whose data confirmation status has been updated to the confirmed status are identified as confirmed routing data units.

[0245] Exclude confirmed routing data units, separately count the amount of data in unsent routing data units and the amount of data in sent but unconfirmed routing data units, add the amounts of unsent routing data units and sent but unconfirmed routing data units to generate the total amount of data that actually needs to be migrated; retain the unsent routing data units and the sent but unconfirmed routing data units as routing data units to be migrated.

[0246] The actual total amount of data to be migrated is compared with the upper limit of unconfirmed data migration, and the actual total amount of data to be migrated is compared with the unconfirmed data migration cache capacity in the shadow capacity configuration.

[0247] If the total amount of data to be migrated does not exceed the upper limit of unconfirmed data migration and does not exceed the cache capacity of unconfirmed data migration, all routing data units to be migrated will be identified as migration objects.

[0248] When the actual total amount of data to be migrated exceeds the upper limit for unconfirmed data migration or the unconfirmed data migration cache capacity, the routing data units to be migrated are arranged from high to low according to the service priority corresponding to them. If the service priorities are the same, the routing data units to be migrated are arranged from small to large according to the service sequence number. If both the service priority and the service sequence number are the same, the sent unconfirmed routing data units and the unsent routing data units are distinguished according to the data confirmation status. The data volume of the routing data units to be migrated is accumulated according to the arrangement order, and the routing data units whose accumulated data volume does not exceed the upper limit for unconfirmed data migration and does not exceed the unconfirmed data migration cache capacity are identified as migration targets.

[0249] The data length of each migrated object is compared with the maximum transmission unit (MTU) of the backup link. If the data length of the migrated object does not exceed the MTU, the data content of the migrated object is preserved; if the data length of the migrated object exceeds the MTU, the data of the migrated object is re-fragmented according to the data length that the MTU can carry, so that the data content of each re-fragmented data does not exceed the MTU.

[0250] The original service sequence numbers of the migrated objects are used to maintain the correspondence between data of the same service. The fragment sequence numbers are adjusted according to the arrangement order after data resegmentation, ensuring that each migrated object corresponding to the same service sequence number remains continuous according to the adjusted fragment sequence numbers. The available bandwidth of the backup link determines the order in which each migrated object can be sent via the backup link, and the connection order between migrated objects corresponding to the same service sequence number is adjusted according to the fragment reconstruction connection bandwidth, ensuring that the receiving side can continuously receive migrated objects according to their service sequence number and fragment sequence number. The migrated objects are arranged according to the adjusted service sequence number, fragment sequence number, and connection order to generate a backup link transmission sequence.

[0251] According to the order of migration objects in the backup link transmission sequence, the migration objects are written into the transmission queue of the communication module corresponding to the backup link, and the backup link transmission sequence is transmitted through the backup link. The backup link transmits transmitted but unacknowledged routing data units and untransmitted routing data units, and continues to receive subsequent routing data units after completing the migration of unacknowledged data.

[0252] When the backup link completes the migration of unconfirmed data and begins to continuously carry subsequent routing data units, the system clock of the IoT embedded system is called to read the corresponding time and generate the backup link completion data connection time.

[0253] Write the link switching trigger time into the link switching event record, write the backup link completion data connection time into the link switching event record, write the link identifier corresponding to the current target link that was responsible for the transmission of routing data units before the switch into the original target link identifier into the link switching event record, and write the link identifier corresponding to the backup link that has completed data connection into the link switching event record, thereby generating the link switching event record.

[0254] Mark the current target link that was carrying data transmission before the switchover as the original target link. Update the backup link that has completed the unconfirmed data migration and started to continuously carry subsequent routing data units as the current target link. Stop sending subsequent routing data units through the original target link, release the normal transmission resources occupied by the original target link, and release the resources in the shadow capacity configuration that were not used by the backup link for abnormal migration and data continuity.

[0255] Based on the service sequence number and fragment sequence number in the transmission tracking record, distinguish each routing data unit record, accumulate the number of established routing data unit records in the transmission tracking record, and generate the transmission count; read the data confirmation status corresponding to each routing data unit record, accumulate the number of routing data unit records with the data confirmation status of confirmed, and generate the confirmation count; accumulate the number of routing data unit records with the data confirmation status of timeout and unconfirmed, and generate the timeout and unconfirmed count.

[0256] Based on the service sequence number and fragment sequence number in the transmission tracking record, the transmission timestamp is matched with the corresponding reception acknowledgment timestamp. The transmission timestamp is subtracted from the reception acknowledgment timestamp to calculate the time elapsed from transmission to reception acknowledgment for each acknowledged route data unit. The times corresponding to each acknowledged route data unit are added together, and the sum is divided by the number of acknowledgments to generate the actual transmission delay.

[0257] Divide the number of timeout unacknowledged packets by the number of packets sent to calculate the proportion of timeout unacknowledged routing data units in all sent routing data units; verify the number of timeout unacknowledged packets by subtracting the number of acknowledgments from the number of packets sent to ensure that the number of packets sent, the number of acknowledgments, and the number of timeout unacknowledged packets maintain the correspondence under the same data batch identifier, and generate the actual packet loss rate.

[0258] Based on the data batch identifier, determine the energy consumption of the communication module related to the corresponding data to be transmitted in the energy metering record of the communication module. Accumulate the energy consumption of the communication module recorded during the data routing execution phase, and continue to accumulate the energy consumption of the communication module recorded during the link anomaly migration phase. Add the energy consumption of the communication modules corresponding to the two phases to generate the actual transmission energy consumption.

[0259] Based on the data batch identifier, read the link switching trigger time and the backup link completion data connection time from the link switching event record. Subtract the link switching trigger time from the backup link completion data connection time to generate the actual migration completion time.

[0260] Data confirmation status records are divided according to the detection period. Routing data units with a data confirmation status of "sent but not confirmed" within each detection period are identified as the sent but unconfirmed routing data units for that detection period. The data volume of each sent but unconfirmed routing data unit within the same detection period is accumulated to obtain the data volume of the sent but unconfirmed routing data units for that detection period. The data volumes for each detection period are compared, and the data volume of the sent but unconfirmed routing data unit with the largest value is determined as the actual maximum unconfirmed data volume.

[0261] Based on the arrival order of fragment numbers in the receiving side fragment sequence number record, determine the largest arriving fragment number. Then, starting from the first fragment number corresponding to the same service sequence number, determine the smallest consecutively acknowledged fragment number that can maintain continuous acknowledgment. Subtract the smallest consecutively acknowledged fragment number from the largest arriving fragment number to calculate the fragment out-of-order span for the corresponding detection period. Compare the fragment out-of-order spans for each detection period, and determine the fragment out-of-order span with the largest value as the actual maximum fragment out-of-order span.

[0262] The actual transmission latency, actual packet loss rate, actual transmission energy consumption, actual migration completion time, actual maximum unacknowledged data volume, and actual maximum fragment out-of-order span are associated with the corresponding data batch identifiers, so that the six data items corresponding to the same data batch identifier maintain a fixed arrangement order, and the actual routing execution results are generated.

[0263] Based on the data batch identifier, the actual routing execution results are mapped to the expected routing execution results. The difference between the actual and expected transmission delays is calculated by subtracting the expected transmission delay from the actual transmission delay; the difference between the actual and expected packet loss rates is calculated by subtracting the expected packet loss rate from the actual packet loss rate; the difference between the actual and expected transmission energy consumption is calculated by subtracting the expected transmission energy consumption from the actual transmission energy consumption; the difference between the actual and expected migration completion times is calculated by subtracting the expected migration completion time from the actual migration completion time; the difference between the actual and expected maximum unacknowledged data volume is calculated by subtracting the expected maximum unacknowledged data volume from the actual maximum unacknowledged data volume; and the difference between the actual and expected maximum fragment out-of-order span is calculated by subtracting the expected maximum fragment out-of-order span. These six differences are then vector-encoded according to the order in the actual routing execution results to generate a routing execution residual vector.

[0264] The following parameters are compared in the routing execution residual vector: the difference between the actual and expected transmission delay, the difference between the actual and expected packet loss rate, the difference between the actual and expected transmission energy consumption, the difference between the actual and expected migration completion time, the difference between the actual and expected migration completion time, the difference between the actual and expected maximum unacknowledged data volume, and the difference between the actual and expected maximum fragment out-of-order span. If any difference exceeds the corresponding threshold in the routing execution residual tolerance threshold vector, a feedback correction instruction is generated based on the corresponding data batch identifier.

[0265] Based on the feedback correction instructions, the actual transmission delay is written into the current transmission delay of the corresponding candidate link, and the actual packet loss rate is written into the current packet loss rate of the corresponding candidate link. The corrected current transmission delay is subtracted from the current transmission delay corresponding to the previous detection period, and the result is divided by the time interval between adjacent detection periods to correct the transmission delay change rate; the corrected current packet loss rate is subtracted from the current packet loss rate corresponding to the previous detection period, and the result is divided by the time interval between adjacent detection periods to correct the packet loss rate change rate. The corrected current transmission delay, current packet loss rate, transmission delay change rate, and packet loss rate change rate are kept in correspondence with the current available bandwidth, current signal quality, available bandwidth change rate, signal quality change rate, fluctuation amplitude, and abnormal duration to correct the link state change parameters of the corresponding candidate link, and a corrected set of link state change parameters is generated according to the link identifier.

[0266] Based on the corrected current transmission latency, current packet loss rate, and the existing available bandwidth, current signal quality, fluctuation amplitude, abnormal duration, historical transmission success rate, and historical fault records of the corresponding candidate links, the link reliability, link stability, link congestion level, link energy consumption, and link fault risk are recalculated and fused according to preset confidence weights to correct the link confidence of the corresponding detection time window. The corrected link confidence is arranged according to the sampling timestamp. The link confidence of the current detection time window is subtracted from the link confidence of the previous detection time window, and the result is divided by the time interval between adjacent detection time windows to correct the link confidence change rate, generating a corrected link confidence change sequence.

[0267] Replace the transmission latency, packet loss rate, and transmission energy consumption used in calculating the current route benefit with the actual transmission latency, actual packet loss rate, and actual transmission energy consumption of the corresponding basic candidate route configuration item, and recalculate the current route benefit using the current route benefit calculation relationship of the corresponding basic candidate route configuration item. Use the difference between the actual transmission energy consumption and the expected transmission energy consumption to correct the normal transmission energy. Re-encode the corrected normal transmission energy and the existing normal bandwidth usage and normal buffer usage of the corresponding basic candidate route configuration item according to the original field order, and correct the normal resource consumption vector. Write the corrected current route benefit and normal resource consumption vector into the corresponding basic candidate route configuration item, and generate a corrected set of basic candidate route configuration items according to the candidate group identifier and configuration identifier.

[0268] Based on the corrected set of link state change parameters and the link reliability change sequence, the current transmission delay, current packet loss rate, current available bandwidth, current link reliability, and queue occupancy rate of each candidate link are obtained. Delay adaptation parameters are recalculated based on the difference between the current transmission delay and the service's maximum tolerable delay; reliability adaptation parameters are recalculated based on the difference between the current link reliability and the service's minimum reliability requirement; energy consumption adaptation parameters are recalculated based on unit data transmission energy consumption, the data length of the data to be transmitted, and the normal transmission energy budget; bandwidth congestion adaptation parameters are recalculated based on the current available bandwidth, queue occupancy rate, the data length of the data to be transmitted, and the data generation rate; and handover adaptation parameters are recalculated based on the current target link (or the absence of a current target link marker), the communication module's operating status, and the communication module's wake-up time.

[0269] The recalculated latency adaptation parameters, reliability adaptation parameters, energy consumption adaptation parameters, bandwidth congestion adaptation parameters, and handover adaptation parameters are weighted and fused according to the evaluation weight vector to recalculate the candidate link route adaptation degree for each candidate link to the data to be transmitted. Based on the recalculated candidate link route adaptation degree, the corrected set of link state change parameters, the link credibility change sequence, and the basic candidate route configuration item set, the multi-select multidimensional knapsack convex hull routing algorithm based on continuous envelope and shadow capacity coupling is re-executed to generate updated executable route configurations and updated expected route execution results.

[0270] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A multi-link data routing method based on an IoT embedded system, characterized in that: include: Collect the status of each communication interface of the IoT embedded system, determine candidate links, collect candidate link status data and candidate link capability data, and generate a link reliability change sequence after time alignment, normalization and change calculation. Receive the data to be transmitted, obtain the service transmission requirements, evaluation weights, residual tolerances, node resource status and encapsulation rules, and generate the service routing attribute vector, evaluation weight vector, routing execution residual tolerance threshold vector, node resource constraint vector and routing encapsulation parameters. Based on the candidate link status, service routing attributes, and node resource constraints, latency, reliability, energy consumption, bandwidth congestion, and handover adaptation parameters are calculated, and a weighted sequence of candidate link routing adaptability is generated. For each batch of data to be transmitted, a candidate group is established, and configuration items for single link, primary and backup link, multi-link fragmentation and multi-link redundancy are constructed and matched with backup links. Configuration items that do not meet the requirements for latency, reliability, fragmentation permission and redundancy permission are deleted, and a basic candidate route configuration item set is generated. Based on the set of basic candidate route configuration items, the link credibility change sequence, and the node resource constraint vector, a continuous envelope, shadow capacity configuration, and main configuration-shadow capacity coupling item are generated. The coupled convex hull is constructed and combined selection and conflict verification are performed to generate executable route configuration and expected route execution results. Based on the executable routing configuration, the data to be transmitted is numbered, fragmented, copied, encapsulated, and sent, and a transmission tracking record, a communication module energy metering record, a receiving side fragment sequence number record, and a data confirmation status record are established. When the link anomaly risk value meets the link switching trigger condition, the shadow capacity configuration is activated, the migration object is determined, and data re-fragmentation, transmission sequence number adjustment and connection order rearrangement are performed. Data migration and link switching are completed through the backup link. The actual route execution result is generated based on the transmission tracking record, communication module energy metering record, link switching event record, data confirmation status record, and receiving side fragment sequence number record. The route execution residual is calculated and a feedback correction instruction is generated. The executable route configuration and the expected route execution result are updated.

2. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: The generated link credibility change sequence includes: Read the communication protocol type, driver loading status, interface enable status, network registration status, and link connectability status of the communication interface. Determine the communication interfaces that meet the requirements of driver loading completion, communication protocol stack initialization completion, interface enable status, and data transmission capability as candidate communication interfaces. Register the corresponding communication links according to the link identifier and generate a candidate link set. Collect transmission latency, packet loss rate, retransmission rate, available bandwidth, queue occupancy rate, signal quality, link connection status, energy consumption per unit data transmission, historical transmission success rate and historical fault records for each candidate link, generate candidate link status data, and obtain candidate link capability data. Add link identifiers and sampling timestamps to the candidate link status data, align and arrange them according to a unified detection time window to generate the original link status sequence, and determine the detection period based on the time interval between adjacent sampling timestamps; Based on the communication protocol type, the candidate link status data is converted in units, the value direction is unified and the interval is normalized. The current status value, the difference between adjacent detection time windows, the rate of change, the fluctuation amplitude and the duration of the anomaly are calculated to generate a set of link status change parameters. Based on the set of link status change parameters, historical transmission success rate and historical fault records, calculate the link reliability, link stability, link congestion, link energy consumption and link fault risk, and generate the link credibility according to the preset credibility weights. The link reliability corresponding to each detection time window is arranged according to the sampling timestamp. The ratio of the difference in link reliability between adjacent detection time windows to the time interval is calculated to generate a link reliability change sequence.

3. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: The generated service routing attribute vector, evaluation weight vector, route execution residual tolerance threshold vector, node resource constraint vector, and route encapsulation parameters include: Receive data to be transmitted through the application programming interface, and read the business identifier, data length and data type; Based on the service identifier, query the service transmission policy table to obtain the service priority, maximum tolerable latency, minimum reliability requirement, maximum allowable packet loss rate, fragmentation permission identifier, redundancy permission identifier, order preservation identifier, transmission confirmation identifier, confirmation waiting time, maximum tolerable interruption time, minimum migration ratio, and maximum tolerable reassembly time. Calculate the data generation rate and average data unit length, and generate the service routing attribute vector according to the unified field order. Based on the service priority, query the service evaluation weight table to obtain the latency weight, reliability weight, energy consumption weight, bandwidth congestion weight, and handover weight, and generate an evaluation weight vector; based on the service identifier, query the residual tolerance rule table to obtain the residual thresholds corresponding to transmission latency, packet loss rate, transmission energy consumption, migration completion time, unacknowledged data volume, and fragmentation out-of-order span, and generate a routing execution residual tolerance threshold vector. Collect remaining power, power supply status, transmission buffer status, task scheduling status, communication module working status, and current amount of data to be transmitted; determine normal transmission energy budget, normal transmission buffer budget, communication module available working time budget, and abnormal migration buffer budget; and generate node resource constraint vectors. Based on the network protocol stack configuration file and routing data encapsulation rules, obtain the retransmission buffer coefficient, service sequence number length, fragment sequence number length, and acknowledgment status field length, and generate routing encapsulation parameters.

4. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: The candidate link route adaptability sequence includes: The current transmission delay of each candidate link is compared with the maximum tolerable delay of the service. The current transmission delay is subtracted from the maximum tolerable delay of the service, and the difference is divided by the maximum tolerable delay of the service to generate the delay adaptation parameters. The current link reliability is compared with the minimum reliability requirement of the service. The minimum reliability requirement of the service is subtracted from the current link reliability. The difference is then divided by the minimum reliability requirement of the service to generate reliability adaptation parameters. Multiply the unit data transmission energy consumption by the data length of the data to be transmitted, subtract the multiplication result from the normal transmission energy budget, and divide the difference by the normal transmission energy budget to generate the energy consumption adaptation parameters. Multiply the value obtained by subtracting the queue occupancy rate from 1 by the current available bandwidth, divide the data length by the result of the multiplication, divide the data generation rate by the current available bandwidth, add the two ratios together, and then subtract the result of the addition from 1 to generate the bandwidth congestion adaptation parameter. When a current target link exists, handover adaptation parameters are generated based on the comparison results of the link identifiers of the candidate link and the current target link, the working status of the communication module, and the wake-up time of the communication module; when there is no current target link marker, handover adaptation parameters are generated based on the working status of the communication module and the wake-up time of the communication module. The latency adaptation parameter, reliability adaptation parameter, energy consumption adaptation parameter, bandwidth congestion adaptation parameter, and handover adaptation parameter are multiplied by their respective weights. The results of each multiplication are summed, and the sum is divided by the sum of the weights to generate the route adaptation degree. The route adaptation degrees of each candidate link are arranged according to the link identifier to generate a candidate link route adaptation degree sequence.

5. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: The basic candidate route configuration items include: Configure a candidate group identifier for each batch of data to be transmitted, and associate the link identifier and routing adaptability of the candidate links with the candidate group identifier; Each candidate link is sequentially identified as the target link carrying all the data to be transmitted, and a single link configuration item is generated; two different candidate links are selected, the one with higher routing adaptability is identified as the target link, and the other candidate link is identified as the backup link, and a primary and backup link configuration item is generated. Select at least two candidate links and write them into the target link set. Determine the link priority according to the route adaptability. Determine the ratio of the route adaptability of each target link to the total route adaptability as the initial data allocation ratio and generate a multi-link fragmentation configuration item. Determine the initial data allocation ratio of each target link as the ratio corresponding to all data to be transmitted and generate a multi-link redundancy configuration item. For single-link configuration items, multi-link sharding configuration items, and multi-link redundancy configuration items, candidate links in the target link set are excluded, and the remaining candidate links that meet the minimum reliability requirements of the service and have the highest routing adaptability are determined as backup links. Based on route adaptability, unit data transmission energy consumption, data generation rate, data length, and current transmission latency, determine the current route benefit, normal transmission energy, normal bandwidth usage, normal buffer usage, and expected transmission latency, and generate a normal resource consumption vector. Configure configuration identifiers for each configuration item, and associate them with candidate group identifiers, routing modes, target link sets, backup links, link priorities, initial data allocation ratios, current route benefits, normal resource consumption vectors, and expected transmission delays; Delete configuration items that do not meet the maximum tolerable latency, minimum reliability requirements, sharding permission conditions, and redundancy permission conditions, and generate a set of basic candidate route configuration items.

6. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: Generate an executable route configuration and the expected route execution results, including: Associate basic candidate route configuration items with link reliability change sequences, link status change parameter sets and candidate link status data, and associate candidate link capability data with backup links; accumulate backup link preparation time, determine the pre-abnormal state start boundary and initial link switching trigger conditions, iterate the target link status, and generate candidate configuration state migration sequences; Extract the minimum effective transmission rate, maximum transmission delay in pre-abnormal state, migration completion time, maximum unacknowledged data volume, maximum out-of-order fragment span, and proportion of migrated data to generate a continuous envelope. Then, generate a set of non-dominated continuous candidate configuration items through business continuity filtering and state condition dominance screening. The minimum reserved bandwidth of the backup link is determined based on the available bandwidth of the backup link, the effective migration and transmission time, and the maximum amount of unacknowledged data. The unacknowledged data migration buffer capacity, the transmission sequence number synchronization buffer capacity, the backup link pre-connection time slice, the working time of the backup communication module, and the fragmentation reconstruction connection bandwidth are calculated to generate the shadow capacity configuration. The main configuration is generated based on the routing mode, target link set, link priority, initial data allocation ratio, current routing benefit, expected transmission delay and normal resource consumption vector. The main configuration, continuous envelope and shadow capacity configuration are bound together to generate the main configuration-shadow capacity coupling item. The coupled convex hull vertex set is generated through composite encoding, dominance comparison and incremental convex hull construction. A shadow capacity conflict matrix is ​​generated based on the overlap of pre-connection time slices and resource occupancy of backup links; a composite configuration vector is selected from each candidate group, resource constraints and shadow capacity conflict verification are performed, feasible composite configuration combinations are generated, the combination with the largest total routing benefit is determined as the target composite configuration combination, and an executable routing configuration and expected routing execution results are generated.

7. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: The generation of transmission tracking records, communication module energy metering records, receiver-side fragment sequence number records, and data acknowledgment status records includes: Based on the routing mode, target link set, link priority, data allocation ratio and routing encapsulation parameters in the executable routing configuration, the data to be transmitted is numbered, fragmented, copied and encapsulated to generate a sequence of routing data units. When each routing data unit enters the communication module's sending queue, the sending timestamp is recorded, and the service sequence number, fragment sequence number, target link identifier, sending timestamp, and data confirmation status are associated to generate a sending tracking record; The system collects the operating voltage, operating current, and start and end times of the communication module during data transmission, calculates the energy consumption of the communication module, and generates an energy metering record for the communication module. When no voltage detection circuit and current detection circuit are configured, the system calculates the energy consumption of the communication module based on the operating status, operating power, and operating duration of the communication module. The single-link configuration item sends the routing data unit sequence through the corresponding target link; the primary / backup link configuration item sends the routing data unit sequence through the target link and reserves abnormal migration resources for the backup link; the multi-link sharding configuration item allocates the routing data unit sequence according to the data allocation ratio and adds the service sequence number, shard sequence number, total number of shards and link identifier; the multi-link redundancy configuration item sends the same data content or key data copies through different target links. Upon receiving an acknowledgment message, the system reads the service sequence number, fragment sequence number, and acknowledgment status field, matches the sending tracking record, generates a received acknowledgment timestamp, and updates the data acknowledgment status to "acknowledged." If no acknowledgment message is matched after the acknowledgment waiting time, the system updates the data acknowledgment status to "timeout unacknowledged." Record the service sequence number and fragment sequence number according to the arrival order of the confirmation messages, generate the receiving side fragment sequence number record, and generate the data confirmation status record based on the data confirmation status in the transmission tracking record.

8. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: The process of completing data continuity and generating link switching event records via the backup link includes: During the transmission of routing data units, the current transmission delay, current packet loss rate, current available bandwidth, current signal quality, and current link reliability are collected according to the detection cycle through the communication module driver, network protocol stack statistics interface, and link detection program corresponding to the current target link. Calculate the changes in current transmission delay, current packet loss rate, current available bandwidth, current signal quality, and current link reliability in adjacent detection periods, generate current link status change parameters, generate an initial link anomaly risk value based on the current link status change parameters of the first detection period, and recursively generate an updated link anomaly risk value based on the current link status change parameters of subsequent detection periods and the link anomaly risk value of the previous detection period. When the link anomaly risk value meets the link switching triggering condition, record the link switching triggering time, activate the shadow capacity configuration, and perform standby communication module wake-up, standby link pre-connection, sequence number synchronization, and unacknowledged data migration cache allocation. Based on the data confirmation status record, the routing data units are divided into unsent routing data units, sent but unconfirmed routing data units, and confirmed routing data units. Confirmed routing data units are excluded, and the data volume of the remaining routing data units is accumulated to generate the total amount of data that actually needs to be migrated and the routing data units to be migrated. The total amount of data that actually needs to be migrated is compared with the upper limit of unconfirmed data migration and the cache capacity of unconfirmed data migration. If neither limit is exceeded, all routing data units to be migrated are identified as migration objects. If either limit is exceeded, migration objects are determined according to business priority, business sequence number and data confirmation status. Based on the maximum transmission unit of the backup link, the current available bandwidth, and the fragmentation reconstruction connection bandwidth, perform data re-fragmentation, transmission sequence number adjustment, and connection order rearrangement on the migration object to generate a backup link transmission sequence, and then send the backup link transmission sequence through the backup link. When the backup link completes the migration of unconfirmed data and begins to continuously carry subsequent routing data units, the time when the backup link completes the data connection is recorded. The link switching trigger time, the time when the backup link completes the data connection, the original target link identifier, and the backup link identifier are written into the link switching event record. The backup link is updated to the current target link, and the normal transmission resources and unused shadow capacity configuration occupied by the original target link are released.

9. The multi-link data routing method based on an IoT embedded system according to claim 1, characterized in that: Generating the actual route execution results and updating the executable route configuration based on the route residuals includes: Count the total number of routing data unit records, the number of confirmed status records, and the number of timeout unacknowledged status records in the transmission tracking record, and generate the number of transmissions, the number of acknowledgments, and the number of timeout unacknowledged records. The actual transmission delay is calculated based on the sending timestamp and the receiving confirmation timestamp. The actual packet loss rate is calculated based on the number of packets sent, the number of confirmations, and the number of unacknowledged packets that timed out. The actual transmission energy consumption is generated by accumulating the energy consumption of the communication module. The actual migration completion time is calculated based on the link switching trigger time and the backup link data connection completion time. The actual maximum unconfirmed data volume is determined according to the detection cycle. The actual maximum out-of-order fragment span is calculated based on the maximum arriving fragment sequence number and the minimum consecutively confirmed fragment sequence number. The actual routing execution results are generated by associating the actual transmission latency, actual packet loss rate, actual transmission energy consumption, actual migration completion time, actual maximum unacknowledged data volume, and actual maximum fragment out-of-order span with the data batch identifier. Calculate the difference between the actual route execution result and the corresponding data in the expected route execution result, generate a route execution residual vector, compare each residual with the corresponding threshold, and generate a feedback correction instruction when any residual exceeds the corresponding threshold. Based on the feedback correction instructions and the actual route execution results, the link state change parameters, link credibility and link credibility change rate of the candidate links are corrected, and the current route benefit and normal resource consumption vector of the basic candidate route configuration items are corrected. Based on the corrected set of link state change parameters, the link credibility change sequence, and the set of basic candidate route configuration items, the candidate link route fitness is recalculated and the multi-select multidimensional knapsack convex hull routing algorithm is executed to generate updated executable route configurations and updated expected route execution results.