Model fragment distribution method and device for industrial equipment, equipment and medium

By dividing the machine learning model into functionally independent sub-modules and dynamically allocating and reallocating them according to the device's computing power and task risk level, the adaptation problem of devices with different hardware performance is solved, enabling the model to run efficiently and be continuously optimized in industrial scenarios.

CN121542047APending Publication Date: 2026-02-17GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511740862.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-17

Smart Images

  • Figure CN121542047A_ABST
    Figure CN121542047A_ABST
Patent Text Reader

Abstract

The invention discloses a model fragment distribution method and device for industrial equipment, equipment and a medium. The method comprises the following steps: dividing a pre-trained machine learning model into a plurality of model fragments according to a preset function type; obtaining the computing power performance level of each device in the target industrial scene and the task risk level of the corresponding to-be-executed task, and according to the computing power performance level and the task risk level, generating an adaptation model fragment subset of each device, so that each device executes the reasoning task by using the respective adaptation model fragment subset; running state data and to-be-executed task data of each device are continuously collected, so that a real-time comprehensive performance index and a real-time comprehensive risk index are calculated respectively, and if there are indexes which do not meet preset requirements, new adaptive model fragment subsets are generated for the corresponding devices. According to the invention, model fragmentation distribution can be carried out according to computing power and task requirements of different devices, and the adaptation degree of each hardware device and the intelligent reasoning model in an industrial scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent industrial equipment technology, and in particular to a method, apparatus, equipment and medium for model segmentation and allocation for industrial equipment. Background Technology

[0002] With the rapid development of the Industrial Internet and intelligent manufacturing, more and more devices need to be connected to a unified data acquisition and analysis platform for condition monitoring, fault diagnosis, and intelligent optimization. These devices include high-performance edge servers and industrial controllers, as well as low-power sensors, inspection robots, and embedded terminals, with varying hardware performance.

[0003] Existing lightweight model deployment methods typically load a uniform inference model directly onto hardware with varying performance levels, lacking hardware awareness and differentiated adaptation mechanisms. This "one-size-fits-all" approach results in some low-computing-power devices being unable to run the model properly, or experiencing a significant drop in operating efficiency, thus limiting the widespread adoption and application of the model in industrial scenarios. Summary of the Invention

[0004] This invention provides a model sharding allocation method, apparatus, device, and medium for industrial equipment, which can improve the adaptability of various hardware devices and intelligent inference models in industrial scenarios by allocating model shards according to the computing power and task requirements of different devices.

[0005] In a first aspect, embodiments of the present invention provide a model fragmentation allocation method for industrial equipment, including:

[0006] The pre-trained machine learning model is divided into several model slices according to the preset function type; each model slice is set with a corresponding minimum computing power requirement and risk threshold.

[0007] The computing power performance level of each device in the target industrial scenario and the task risk level of the corresponding task to be executed are obtained. Based on the computing power performance level and task risk level, an adaptation model shard subset is generated for each device so that each device can use its own adaptation model shard subset to execute inference tasks.

[0008] Continue to collect the operating status data and pending task data of each device to calculate the real-time comprehensive performance index and real-time comprehensive risk index respectively. If the real-time comprehensive performance index of a device is lower than the preset performance threshold or the real-time comprehensive risk index is higher than the preset risk threshold, the preset model sharding redistribution mechanism will be triggered to generate a new adapted model sharding subset for the corresponding device.

[0009] This invention employs model fragmentation, breaking down a complete model into functionally independent sub-modules. This allows for differentiated deployment based on device computing power. Each model fragment has minimum computing power requirements and risk thresholds to ensure matching between fragments and device capabilities, preventing overload of low-power devices while prioritizing high-risk tasks. By dynamically evaluating device status and task requirements, optimal matching between fragments and devices is achieved, ensuring that devices only load fragments supported by their computing power, improving inference efficiency and resource utilization. Real-time monitoring and dynamic reallocation adapt to changes in device performance and fluctuations in task risk, ensuring adaptive optimization and stability during system operation. This invention addresses the compatibility issues caused by differences in computing power across heterogeneous devices through dynamic allocation and reallocation of model fragments, ensuring efficient operation and continuous optimization in industrial scenarios. Compared to existing technologies, this invention improves the compatibility between various hardware devices and intelligent inference models in industrial settings by allocating model fragments according to the computing power and task requirements of different devices.

[0010] Furthermore, the acquisition of the computing power performance level of each device in the target industrial scenario and the corresponding task risk level of the task to be executed specifically involves:

[0011] Collect real-time computing power parameters of each device, and calculate the computing power performance level of each device based on the real-time computing power parameters;

[0012] Network status data and task weight data of each device are collected, and the task risk level of each task is generated by linearly weighting the computing power performance level, network status data and task weight data.

[0013] This invention provides a reliable basis for shard allocation by combining linear weighting with multi-dimensional data (computing power, network, task weight) to comprehensively reflect the device status and task urgency.

[0014] Furthermore, before generating the adaptation model shard subsets for each device based on the aforementioned computing power performance level and task risk level, the process also includes:

[0015] Real-time computing power parameters of each device and task-related data of the tasks to be executed are collected, and a comprehensive evaluation vector for each device is generated based on the real-time computing power parameters and task-related data; wherein, the task-related data includes the importance level, real-time requirement data and security level of the tasks to be executed.

[0016] Through multidimensional cluster analysis, the comprehensive evaluation vectors of each device are classified into categories, generating several device capability categories;

[0017] Based on the minimum computing power requirements and risk thresholds of each model shard, each model shard is matched with each device capability category, and the model shards that match each device capability category are determined as the appropriate model shard subsets under the corresponding device capability category.

[0018] Based on the matching relationship between each device capability category and each adaptation model shard subset, a category-shard mapping matrix is ​​generated.

[0019] This invention integrates multi-source data to form a comprehensive profile of devices, providing a foundation for classification; it simplifies allocation logic and improves allocation efficiency by stratifying devices according to their capabilities (such as high-performance and high-risk categories, and low-performance and low-risk categories); and it enables fast querying and distribution through predefined sharding allocation strategies, reducing real-time computing overhead.

[0020] Furthermore, the step of generating an adaptation model shard subset for each device based on the computing power performance level and task risk level specifically involves:

[0021] For each device, the device capability category is determined based on the current device's computing power performance level and task risk level. Then, based on the device capability category and the category-sharding mapping matrix, the corresponding adaptation model shard subset is obtained.

[0022] This invention utilizes predefined mapping relationships to quickly allocate suitable fragments, ensuring the reliability of the allocation, avoiding redundant calculations, and achieving efficient and consistent fragment allocation.

[0023] Furthermore, each device performs inference tasks using its respective adapted model subset, including:

[0024] For each device, if there are multiple model shards in the corresponding adapted model shard subset that perform the same task, the output results of the multiple model shards that perform the same task type are fused using the pre-acquired fusion weights to obtain the final output result; wherein, the fusion weights are generated according to the computing power performance level and task risk level of the corresponding device.

[0025] This invention improves inference accuracy and robustness by fusing and integrating sharding results. The fusion weights are based on device computing power or task risk to optimize output quality.

[0026] Furthermore, it also includes:

[0027] While each device is performing inference tasks using its own adapted model shard subset, network communication data of each device is continuously collected, and the network communication data is used to determine whether the corresponding device has a network interruption.

[0028] When a device experiences a network outage, the system retrieves locally cached historical feature vectors and redundant parameters, and inputs the corresponding adapted model shard subsets to enable the adapted model shard subsets to continue performing inference tasks.

[0029] This invention maintains inference functionality using cached data during network interruptions, preventing task interruptions, ensuring system continuity, resolving network fluctuation issues in industrial settings, and guaranteeing uninterrupted core functions.

[0030] Furthermore, it also includes updating the parameters of the machine learning model through a preset parameter differential update mechanism;

[0031] Specifically, the machine learning model's parameters are updated using a preset parameter differential update mechanism, as follows:

[0032] Based on the new parameter values ​​of the parameters to be updated in the machine learning model, a corresponding differential update package is generated; wherein, the differential update package is used to identify the difference between the old parameter values ​​and the new parameter values ​​of the parameters to be updated.

[0033] Without stopping the inference task currently being performed by the machine learning model, the differential update package is superimposed with the old parameter value of the parameter to be updated through a preset weighted fusion mechanism to update the value of the parameter to be updated.

[0034] This invention significantly reduces the amount of update data and lowers network load by transmitting only the parameter changes; it also achieves hot replacement by updating parameters through weighted fusion without stopping the inference task, avoiding downtime, smoothly transitioning to the new model, maintaining inference continuity, thereby reducing maintenance costs and downtime, and enabling continuous model optimization.

[0035] Secondly, embodiments of the present invention provide a model fragmentation and allocation device for industrial equipment, including a model partitioning module, a model fragmentation and allocation module, and a dynamic reallocation module, wherein...

[0036] The model partitioning module is used to divide a pre-trained machine learning model into several model slices according to a preset function type; wherein, each model slice is set with a corresponding minimum computing power requirement and risk threshold.

[0037] The model sharding allocation module is used to obtain the computing power performance level of each device in the target industrial scenario and the task risk level of the corresponding task to be executed, and generate an adaptive model sharding subset for each device based on the computing power performance level and the task risk level, so that each device can use its own adaptive model sharding subset to execute inference tasks.

[0038] The dynamic redistribution module is used to continuously collect the operating status data and task data to be executed of each device to calculate the real-time comprehensive performance index and the real-time comprehensive risk index respectively. If the real-time comprehensive performance index of a device is lower than the preset performance threshold or the real-time comprehensive risk index is higher than the preset risk threshold, the preset model shard redistribution mechanism is triggered to generate a new adapted model shard subset for the corresponding device.

[0039] This invention employs a model partitioning module to fragment the complete inference model, breaking it down into functionally independent sub-modules. This allows the model to be deployed differently based on device computing power. Each model fragment has minimum computing power requirements and risk thresholds to ensure matching between fragments and device capabilities, preventing overload of low-computing-power devices while prioritizing high-risk tasks. A model fragment allocation module dynamically assesses device status and task requirements to achieve optimal matching between fragments and devices, ensuring that devices only load fragments their computing power can support, improving inference efficiency and resource utilization. A dynamic reallocation module monitors and dynamically reallocates data in real time to adapt to changes in device performance and fluctuations in task risk, ensuring adaptive optimization and stability of the system during operation.

[0040] Thirdly, embodiments of the present invention provide a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;

[0041] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the model fragmentation allocation method for industrial equipment as described in any of the above.

[0042] Fourthly, embodiments of the present invention provide a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the model fragmentation allocation method for industrial equipment as described in any of the preceding claims.

[0043] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of a model segmentation and allocation method for industrial equipment provided in an embodiment of the present invention;

[0045] Figure 2This is a schematic diagram of a model fragmentation allocation mechanism provided in an embodiment of the present invention;

[0046] Figure 3 This is a comparative diagram of the overall replacement and differential update methods provided in the embodiments of the present invention;

[0047] Figure 4 A flowchart of a model segmentation and allocation method for industrial equipment provided in an embodiment of the present invention;

[0048] Figure 5 A system overall structure diagram provided for an embodiment of the present invention;

[0049] Figure 6 This is a structural diagram of a model segmentation and allocation device for industrial equipment provided in an embodiment of the present invention. Detailed Implementation

[0050] 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.

[0051] Example 1:

[0052] like Figure 1 As shown, an embodiment of the present invention provides a model fragmentation allocation method for industrial equipment, comprising the following steps:

[0053] S101, the pre-trained machine learning model is divided into several model slices according to the preset function type; each model slice is set with a corresponding minimum computing power requirement and risk threshold.

[0054] In one specific embodiment, the central server splits the complete model into multiple structured fragments, such as feature extraction fragments, risk detection fragments, and environmental prediction fragments, through a fragment management module.

[0055] S102, obtain the computing power performance level of each device in the target industrial scenario and the task risk level of the corresponding task to be executed, and generate the adaptation model shard subset for each device according to the computing power performance level and task risk level, so that each device can use its own adaptation model shard subset to execute the inference task.

[0056] In this embodiment, obtaining the computing power performance level of each device in the target industrial scenario and the corresponding task risk level of the task to be executed specifically involves: collecting real-time computing power parameters of each device and calculating the computing power performance level of each device based on the real-time computing power parameters; collecting network status data of each device and task weight data of the task to be executed, and generating the task risk level of each task to be executed by linearly weighting the computing power performance level, network status data, and task weight data.

[0057] In one specific embodiment, various devices proactively report their computing power status, task importance, and network quality to the central server before executing a task. Upon receiving the information, the central server normalizes the data, removes noise, and filters outliers to form a standardized input dataset.

[0058] D input ={C i ,T i N i}

[0059] Among them, C i T represents the feature vector of device computing power. i N represents the task weight feature vector. i This represents the network state feature vector. Subsequently, this data is input into the risk level assessment module, where a comprehensive risk level index is calculated using a linear weighted model.

[0060] R i =αC i +βT i +γN i

[0061] Wherein, α, β, and γ are adjustment coefficients. This risk level result will serve as a key reference for subsequent shard allocation and dynamic updates.

[0062] In this embodiment, before generating the adaptive model shard subsets for each device based on the computing power performance level and task risk level, the method further includes: collecting real-time computing power parameters of each device and task-related data of the task to be executed, and generating a comprehensive evaluation vector for each device based on the real-time computing power parameters and task-related data; wherein, the task-related data includes the importance level, real-time requirement data, and security level of the task to be executed; classifying the comprehensive evaluation vectors of each device through multi-dimensional clustering analysis to generate several device capability categories; matching each model shard with each device capability category one by one according to the minimum computing power requirement and risk threshold of each model shard, and determining the model shards that match each device capability category as the adaptive model shard subsets under the corresponding device capability category; generating a category-shard mapping matrix based on the matching relationship between each device capability category and each adaptive model shard subset.

[0063] In one specific embodiment, the generation process of the category-slice mapping matrix is ​​as follows:

[0064] (1) Equipment status acquisition and pre-assessment:

[0065] During the task initialization phase, each device reports its computing power parameters in real time through the hardware monitoring interface, including CPU clock speed, number of GPU computing units, memory capacity, current load rate, and available bandwidth, along with the task's importance level, real-time requirements, and security level labels. The risk assessment module of the central server standardizes this data to generate a comprehensive assessment vector.

[0066] F i =(C i M i B i ,T i E i ,S i )

[0067] Among them, C i M represents the computing power level. i B represents memory resources. i Indicates bandwidth availability, T i E represents the task's real-time weight. i S represents the energy consumption constraint coefficient. i This indicates the security level factor.

[0068] (2) Joint analysis of computing power and risk.

[0069] The sharding management module performs multidimensional clustering analysis or hierarchical partitioning on the comprehensive evaluation vectors of all devices, forming several device capability categories. This process is equivalent to introducing multidimensional weighting factors and clustering weight matrices to achieve multi-level classification based on traditional binary classification rules (whether the minimum computing power threshold and risk level threshold for sharding are met). Typical categories include:

[0070] High-performance, high-risk (HH) class: suitable for performing full sharding.

[0071] Medium performance, medium risk (MM class): Execution part is reduced fragmentation.

[0072] Low-performance, high-risk (LH) class: Executes core security-related fragments.

[0073] Low-performance, low-risk category (LL category): Only basic monitoring shards are executed.

[0074] (3) Differentiated decision generation.

[0075] Once the classification is complete, the system calculates the sharding loading strategy for each category based on the device type and task risk level, generating a "category-sharding mapping matrix":

[0076] M j =f(C i R i )

[0077] Among them, M j C represents the set of partitions corresponding to a category. i R indicates the capability level of the equipment. i Indicates the risk level of the task.

[0078] In this embodiment, generating the adaptation model shard subset for each device based on the computing power performance level and task risk level specifically involves: for each device, determining the device capability category based on the current device's computing power performance level and task risk level, and obtaining the adaptation model shard subset corresponding to the current device based on the device capability category and the category-shard mapping matrix.

[0079] In one specific embodiment, the sharding priority is determined according to the function f in the category-sharding mapping matrix based on the principle of "computing power priority, risk compensation", that is:

[0080] When both Ci and Ri are high, allocate the complete set of fragments;

[0081] When Ci is medium and Ri is low, only core function shards and simplified shards are issued;

[0082] When Ci is low but Ri is high, risk detection and security constraint related fragments are prioritized for distribution.

[0083] When both Ci and Ri are low, only the minimum monitoring shard set is issued.

[0084] Furthermore, after the allocation strategy is determined, the central server distributes the corresponding model fragments to each device in parallel via multi-protocol communication interfaces (such as 5G, WiFi, or LoRa) according to fragment priority. During the distribution process, the system adaptively adjusts the fragment compression rate and transmission batches based on bandwidth conditions to ensure transmission reliability. Upon receiving the fragments, the device-side fragment inference engine performs loading verification, performs rollback operations on incompatible fragments, and caches received fragments to support resuming interrupted transmissions. For a better explanation of the above model fragment allocation mechanism, see [link to relevant documentation]. Figure 2 One example, Figure 2 This is a schematic diagram of a model fragmentation allocation mechanism provided in an embodiment of the present invention.

[0085] Preferably, the system monitors the bandwidth utilization, data transmission rate, and packet loss rate of the communication link in real time. When the bandwidth utilization exceeds a preset threshold or the transmission rate falls below the minimum requirement for fragmented transmission, the system automatically increases the fragmentation compression ratio and reduces the number of transmission batches per batch. When the bandwidth utilization is below the threshold and the transmission rate is stable, the system reduces the compression ratio to decrease decompression time and increases the number of transmission batches to improve delivery efficiency, ensuring transmission reliability through dynamic adjustments.

[0086] Preferably, after receiving a fragment, the device-side fragmented inference engine first verifies the fragment's integrity (checking if the fragment size, checksum, and metadata sent by the server are consistent), structural compatibility (checking if the fragmented operators match the operator library supported by the local hardware), and version compatibility (confirming that the fragment version is compatible with the baseline version of the model currently running on the device). If any verification step fails, it is determined to be an incompatible fragment, and a rollback operation is immediately triggered (deleting the fragment file and sending a retransmission request to the server). If the verification passes, the fragment is cached in the local storage unit, and the fragment reception status is recorded to support breakpoint resumption after subsequent network interruptions.

[0087] In one specific embodiment, the device-side sharded inference engine completes local inference based on the model shard content issued by the central server. The core of this process lies in utilizing the device's local computing resources to achieve targeted data processing and shard-level inference computation, thereby independently completing sub-task inference without relying on the complete model, ensuring the stable operation of the system in a heterogeneous hardware environment.

[0088] (1) Model Slice Loading and Initialization: At the start of task execution, the device first loads and initializes the received model slices. The inference engine verifies the structural integrity of the slices, the compatibility of the weight files, and the consistency between the operators and the hardware platform to ensure that the slices can be safely executed in the current device environment.

[0089] Subsequently, the system dynamically activates the corresponding inference submodules according to the functional type of the shard (such as feature extraction shard, risk detection shard, or environmental prediction shard), and completes the necessary weight mapping and operator registration in memory.

[0090] For devices with limited computing power, the system adopts an on-demand loading and lightweight operator scheduling mechanism, retaining only the core operators required for the current partition during the task execution cycle to reduce initialization overhead.

[0091] After the fragmentation initialization is complete, the device begins to preprocess the input data.

[0092] Input data can come from local sensors, task command interfaces, or other collaborative nodes, and typically includes multimodal information such as image frames, temperature and humidity signals, and device operating status vectors. The inference engine performs standardization and structuring operations on the data according to the input specifications defined by the segmentation, including dimension normalization, unit conversion, outlier correction, and sliding window segmentation, to ensure that the input data meets the model's computational requirements. When the device's real-time computing power is limited, the system uses sparse sampling and incremental caching strategies to retain only key feature fragments for subsequent inference, reducing the computational load.

[0093] (2) Model Segmentation for Inference: After preprocessing, the data is input into the segmented inference module for forward computation. Different segments correspond to different inference logic:

[0094] A. Feature extraction segmentation is mainly used to extract structured high-dimensional feature vectors from multi-source sensing data. The system first performs convolution operations on the input raw data to extract local features, and then performs multimodal feature concatenation and weight normalization operations through the feature fusion layer to obtain a unified feature tensor.

[0095] In high-performance computing devices, this segmented loading of a complete convolutional neural network enables all convolutional layers, attention mechanisms, and multi-channel feature fusion structures. Its output is a high-dimensional, dense feature vector (typically 512–1024 dimensions), simultaneously reflecting spatial texture, temperature gradients, and temporal variations. For example, in cable tunnel temperature detection tasks, high-performance computing devices output a heat distribution matrix and temperature change curves across the entire cable surface, enabling the location of specific hotspots and their heating rates.

[0096] In low-computing-power devices, the system only enables the core convolutional layer and lightweight mapping module, omitting the high-dimensional feature aggregation layer and outputting a low-dimensional sparse feature vector (typically 64-128 dimensions), retaining only the key information required for task judgment. For example, a low-computing-power device only outputs the key feature indicator "maximum surface temperature = 78℃, hotspot located in the 3rd test area," without including the complete thermal distribution curve. This retains the core diagnostic capabilities while significantly reducing computational and storage overhead.

[0097] B. Risk detection segmentation is used to identify the risk level of equipment or task status. The system inputs the feature vectors output from the feature extraction segmentation into a Bayesian classification network, calculates the risk confidence vector, and generates a classification probability distribution through the Softmax function.

[0098] In high-computing-power devices, the model is fully loaded with a multi-channel classification structure, which can simultaneously output multi-dimensional risk assessment results, such as three independent confidence levels for structural risk, energy consumption risk, and environmental risk.

[0099] On low-computing-power devices, the model only uses a single-channel classification structure to perform a binary classification judgment to determine whether a high-risk situation exists. The output is usually a single confidence value, such as "high-risk probability = 0.81", based on which the system triggers a warning or executes a safe mode. Although this result is simplified, it meets real-time requirements and is uniformly summarized and comprehensively evaluated through a central server.

[0100] C. Result Generation Process of Environmental Prediction Segmentation. Environmental prediction segmentation is mainly used to predict the time series trends of key operating parameters. The system uses a temporal neural network to perform sliding window modeling on continuous input data and extract time-dependent features. Subsequently, the model recursively predicts state parameters (such as temperature, humidity, current, or energy consumption) within the next τ time steps and outputs the predicted sequence.

[0101] In high-performance computing devices, the system employs a complete multi-layer time-series network structure, which can output multi-step continuous prediction curves and their confidence intervals.

[0102] In low-computing-power devices, the model only uses a single-layer linear recursion or a shallow TCN structure to output single-step trend results or directional labels. Although such results do not have full curve accuracy, they can respond quickly.

[0103] In this embodiment, each device performs inference tasks using its own adapted model shard subset, including: for each device, if there are multiple model shards performing the same task in the corresponding adapted model shard subset, the output results of the multiple model shards performing the same task type are fused using pre-acquired fusion weights to obtain the final output result; wherein, the fusion weights are generated according to the computing power performance level and task risk level of the corresponding device.

[0104] In one specific embodiment, after local inference is completed, the system stores the output results of each slice in a cache storage unit and performs result fusion and temporary storage according to task requirements. For multiple slices of the same task, the device can use methods such as feature concatenation, weighted averaging, or confidence weighting to fuse the results to obtain more stable and reliable local inference outputs. The fusion weight is usually determined by both the device's computing power level and the task's risk level, giving higher weight to the output of key slices in high-risk tasks, thereby enhancing the system's robustness and security.

[0105] Finally, the device sends the fused inference results and related performance metrics (including inference time, memory usage, and energy consumption estimates) back to the central server. If the network is unstable, the device will temporarily store the results and operation logs in a local cache and report them in batches after the network recovers, ensuring the continuity of task execution and the integrity of data synchronization. Based on this feedback information, the central server continuously updates the shard performance database, providing a reference for model allocation and parameter optimization for subsequent tasks.

[0106] Through the above process, the local inference execution on the device achieves a complete closed loop from fragment loading, data preprocessing, forward inference to result fusion and backhaul. This mechanism not only improves the flexibility and efficiency of inference in heterogeneous computing environments, but also provides a stable operational foundation for subsequent network outage fault tolerance compensation and incremental hot updates.

[0107] S103, continue to collect the operating status data and pending task data of each device to calculate the real-time comprehensive performance index and real-time comprehensive risk index respectively. If the real-time comprehensive performance index of a device is lower than the preset performance threshold or the real-time comprehensive risk index is higher than the preset risk threshold, the preset model sharding redistribution mechanism is triggered to generate a new adapted model sharding subset for the corresponding device.

[0108] In one specific embodiment, the system continuously monitors multi-dimensional indicators such as computing power utilization, energy consumption level, task execution latency and risk level of each device during operation, and performs sliding window evaluation and comprehensive scoring on them to achieve dynamic optimization of the sharding allocation strategy.

[0109] (1) Performance evaluation and threshold setting: The system uses a sliding window mechanism (window length W, generally 5-10s) to denoise and smooth the operating data of each device, and calculates the comprehensive performance index ψ(t):

[0110] Ψ(t)=w1·(1-T inf / T max )+w2·(Q / Q max )+w3·(1-U cpu )+w4·(1

[0111] -U mem )+w5·(1-E / E max )

[0112] Among them, T inf Let Q be the inference latency, and U be the throughput. cpu U mem These represent CPU and memory utilization, respectively, with E representing energy consumption per unit.

[0113] When Ψ(t) is below the performance threshold Ψ min (Usually the P10 quantile of the historical average is used), or when any performance indicator reaches the following conditions, the system determines that the device's performance has degraded and triggers reallocation:

[0114] CPU or GPU utilization ≥85% for K evaluation windows, inference latency T inf ≥T max Or throughput Q≤Q min Energy consumption E≥E maxOr temperature T≥T max When triggering, a hysteresis strategy is adopted (the recovery threshold is 5% to 10% lower) to avoid frequent jitter.

[0115] (2) Risk threshold and triggering conditions: The system's risk assessment module determines the risk threshold based on the device's computing power status C. i Task Importance T i With network state N i Calculate the comprehensive risk index:

[0116] R i =αC i +βT i +γN i

[0117] And set three levels of risk thresholds:

[0118] When R≥R high (High-risk threshold, usually the historical P85–P90 percentile) When the K-window is in effect, reallocation is immediately triggered to add security or risk detection fragments.

[0119] When R mid ≤R <R high At that time, only minor adjustments were made.

[0120] When R≤R low When the (P30–P40 quantile) continuous K-window is in effect, the system determines that the task risk has been eliminated and automatically reclaims high-load fragments to reduce energy consumption.

[0121] Preferably, the system continuously monitors the real-time changes in device computing power utilization and task risk level during operation. If it detects a performance degradation or increased task risk of a device during task execution, the sharding management module will trigger a dynamic reallocation mechanism to adjust its shard set.

[0122] The adjustment process of this fragment set is basically the same as the process described in the "fragment generation and allocation" step above. The fragment management module recalculates the fragment set based on the device computing power parameters, task risk level and communication bandwidth status, and completes compressed transmission, loading verification and version rollback according to the established differentiated distribution strategy.

[0123] The difference is that the reallocation in this step is triggered in real time during the operation, while the aforementioned allocation belongs to the pre-allocation in the task initialization stage. The two processes are consistent in execution logic and technical path.

[0124] In this embodiment, the method further includes: continuously collecting network communication data of each device while each device is performing inference tasks using its own adapted model shard subset, and determining whether the corresponding device has a network interruption based on the network communication data; when a device has a network interruption, calling the locally cached historical feature vectors and redundant parameters, and inputting the corresponding adapted model shard subset, so that the adapted model shard subset can continue to perform inference tasks.

[0125] In one specific embodiment, to address common network fluctuations or temporary communication interruptions in industrial settings during system operation, a network outage fault-tolerant compensation mechanism is designed on the device side. The core idea of ​​this mechanism is that upon detecting a network disconnection, the device side does not rely on data updates from the central server. Instead, it calls upon locally cached historical feature vectors and redundant parameters to perform local adaptive inference, thereby maintaining the continuous output of critical functions.

[0126] Network outage detection relies on multi-source status acquisition by the communication monitoring module.

[0127] Under normal communication conditions, the device periodically receives heartbeat packets, timestamp synchronization signals, or model fragment update acknowledgments from the central server. The communication monitoring module records the heartbeat packet reception interval, the signal-to-noise ratio of the data channel, and the handshake response time of the TCP / UDP connection in real time.

[0128] When the number of lost heartbeat packets exceeds a preset threshold N within a continuous monitoring period. th Or average delay time T avg Exceeding the network tolerance limit T max The system then determines that the network has entered an interrupted state. This process can be represented as:

[0129]

[0130] Among them, S net =1 indicates a network interruption, and δ is the maximum packet loss rate threshold. When the system confirms a network interruption, it immediately triggers the network failure tolerance mode, suspends the remote parameter synchronization and fragment update process, and instead enables the local caching mechanism.

[0131] The main difference between local inference and normal inference in a network-off state lies in the input source and parameter update method. During normal inference, the device obtains input from real-time sensor data and the latest fragment weights issued by the central server; while in a network-off state, the system uses historical feature vectors stored in the cache storage unit. Redundant parameters from the most recent synchronization These cached data are periodically saved by the system when the network is normal, and typically contain feature snapshots and redundant copies of key parameters within a few recent time windows.

[0132] Preferably, the execution process of offline local inference includes three stages. First, the inference engine extracts the most recent feature vector sequence from the cache. The system performs sliding window averaging or exponential weighted smoothing to eliminate abrupt noise caused by breakpoints. Secondly, the system is based on redundant parameters. Construct local sub-models and perform approximate inference calculations on the input features:

[0133]

[0134] Where Φ(·) represents the local nonlinear inference function, These are the main parameters and the time redundancy compensation parameters, respectively, with β being the time smoothing coefficient. This calculation method corrects for data lag caused by network outages by incorporating historical time-series information, ensuring the model output maintains continuity and stability even in the absence of real-time data input. Finally, the system outputs the local result Y. t Cache the results in the results buffer and mark it as "offline mode output" so that consistency correction can be performed after the network recovers.

[0135] When the network recovers, the global synchronization module initiates the alignment and compensation process. This module first pulls the latest global parameter W from the server. g and compare it with the device-side cache parameters. Perform a difference comparison and calculate the parameter offset:

[0136]

[0137] Subsequently, the system based its offline inference results Y during the network outage. t With global model inference output Y g Perform consistency correction:

[0138] Y′ t =Y t +λ·(Y g -Y t )

[0139] Here, λ is the synchronization correction coefficient, used to balance the credibility of offline results and global inference results. Through the above comparison and correction, the device can quickly restore a globally consistent state after the network is restored, without reloading the complete model, significantly shortening the synchronization time.

[0140] In summary, the network outage fault tolerance compensation mechanism is implemented through a four-stage closed loop: "state detection—cache retrieval—local inference—result restoration." When communication is interrupted, the device relies on cache features and redundant parameters to perform adaptive local inference, ensuring that critical functions are not interrupted. After the network is restored, differential correction and parameter synchronization are used to achieve consistent updates between the global model and the local state, thereby significantly improving the system's reliability and continuous operation capability in complex industrial environments.

[0141] In this embodiment, the method further includes updating the parameters of the machine learning model through a preset parameter-level differential update mechanism. Specifically, updating the parameters of the machine learning model through the preset parameter-level differential update mechanism involves: generating a corresponding differential update package based on the new parameter values ​​of the parameter to be updated in the machine learning model; wherein the differential update package is used to identify the difference between the old parameter values ​​and the new parameter values ​​of the parameter to be updated; without stopping the inference task currently being performed by the machine learning model, the differential update package is superimposed with the old parameter values ​​of the parameter to be updated through a preset weighted fusion mechanism to update the value of the parameter to be updated.

[0142] In one specific embodiment, during the long-term operation of the model, the central server needs to periodically optimize and iterate the model to adapt to new operating environments or task characteristics.

[0143] To avoid requiring a complete model replacement for every update, which would cause device downtime, this system employs a parameter-level differential update mechanism. This mechanism generates differential update packages on the server side and performs hot loading on the device side, enabling smooth replacement of model parameters without interrupting inference tasks.

[0144] On the server side, the parameter update module first retrieves the parameter snapshot W from the global model repository, representing the most recent device synchronization version. t and compared with the current optimized global model parameters W t+1 A comparison is performed. The system establishes a mapping matrix based on the partition dimension and parameter weight hierarchy, and calculates the difference in parameter weights for each partition layer by layer:

[0145]

[0146] Among them, △W i Let represent the parameter difference vector of fragment i. To avoid transmission redundancy caused by invalid small updates, the system introduces threshold filtering and sparse coding mechanisms during the calculation process: when the parameter change magnitude |ΔW i When the value is less than a preset threshold, the parameter is considered a stable term and is not included in the differential update packet, thereby significantly compressing the amount of transmitted data.

[0147] After differential extraction is complete, the system enters the differential packet generation stage. The parameter update module establishes a hierarchical index table based on the fragmentation structure, recording the start and end positions, dimension information, and corresponding differential identifiers of each fragment. Subsequently, the module performs secondary compression and encryption on the differential data, and serializes it using a lightweight binary format to ensure efficient and secure transmission. Finally, the system generates a complete differential update packet △W={△W1,△W2,...,△W n The data includes metadata such as version number, signature verification code, and dependency mapping table.

[0148] Once the differential update packet is ready, the central server distributes it to each device via the communication network. The system uses an asynchronous multi-threaded approach to transmit multiple shards of differential data in parallel, while simultaneously monitoring the transmission status in real time. When bandwidth is limited or the signal is unstable, the server will adaptively adjust the transmission rate and support breakpoint resumption to ensure that the differential data arrives completely.

[0149] On the device side, after receiving the differential update packet, the sharded inference engine first verifies the packet's signature and version consistency to confirm that the differential data matches the local model version W. t Matching. After successful verification, the system enters the hot replacement process. Without stopping the current inference task, the inference engine incrementally adds differential parameters in a layered loading manner to achieve incremental updates:

[0150] W t+1 =W t +△W

[0151] To avoid abrupt changes in inference results, the system employs a smooth transition strategy when loading new parameters. Specifically, this involves linear interpolation or weighted fusion of the old and new parameters.

[0152] W load =α·W t+1 +(1-α)·W t

[0153] Where α∈[0,1] represents the smoothing coefficient, which is usually dynamically adjusted with the loading progress to ensure that the inference process is continuous and stable, without producing accuracy jumps or output drift.

[0154] After the update is completed, the device will send the loading log and running status report back to the central server. The server will then perform consistency correction on the global parameter distribution based on the feedback from multiple devices to form a new global parameter baseline, providing a reference for the next differential update.

[0155] Through the above process, the system completes a full-link update mechanism from parameter difference extraction, data compression, packet generation, network distribution to device hot loading. This mechanism significantly reduces network traffic and system update latency while ensuring the continuity of inference tasks, enabling devices to quickly obtain the latest model capabilities and maintain continuous optimization and evolution of model performance. Figure 3 As shown, Figure 3 This is a diagram comparing the overall replacement and differential update methods.

[0156] For a better explanation of the working principle and process of this invention, see [link to relevant documentation]. Figure 4 One example is a flowchart of a model segmentation and allocation method for industrial equipment provided in an embodiment of the present invention.

[0157] Preferably, embodiments of the present invention provide a system framework for applying the above-described model fragmentation allocation method for industrial equipment. The system consists of a device hardware layer, a central control server, and a communication network layer.

[0158] The device hardware layer includes a local computing unit, a cache storage unit, and a sharded inference engine. The local computing unit is used to perform the received model sharded inference operations, and its performance depends on the device's CPU / GPU computing power or a dedicated AI acceleration unit.

[0159] The cache storage unit is used to temporarily store local feature vectors, historical inference results, and the latest differential update parameters, ensuring that the device can maintain limited functionality even when the network is unstable. The sharded inference engine is responsible for loading the specified model shards, performing forward computation, and outputting the results, while also supporting dynamic replacement and updating of shards. The central control server consists of a shard management module, a risk level assessment module, a parameter update module, and a global synchronization module.

[0160] The fragmentation management module divides the complete model into several fragments and establishes a mapping relationship between fragments and computing power requirements; the risk level assessment module calculates a comprehensive risk index based on device computing power utilization and task importance level, thereby determining the allocation priority of different fragments on various types of devices; the parameter update module is responsible for generating differential update packages and controlling the distribution rhythm; the global synchronization module is used to perform consistency correction between local inference results and the global model on the server side after network recovery; the communication network layer is used to ensure data interaction between the server and devices. This layer simultaneously supports multiple communication methods such as 5G, WiFi, and LoRa, achieving a combination of high speed, low latency, and long-distance low power consumption, ensuring the transmission of model fragments and update packages in different scenarios. Figure 5 As shown, Figure 5 The overall structure of the system is shown, including the device hardware layer, the central control server, and the communication network layer.

[0161] This invention employs model fragmentation, breaking down a complete model into functionally independent sub-modules. This allows for differentiated deployment based on device computing power. Each model fragment has minimum computing power requirements and risk thresholds to ensure matching between fragments and device capabilities, preventing overload of low-power devices while prioritizing high-risk tasks. By dynamically evaluating device status and task requirements, optimal matching between fragments and devices is achieved, ensuring that devices only load fragments supported by their computing power, improving inference efficiency and resource utilization. Real-time monitoring and dynamic reallocation adapt to changes in device performance and fluctuations in task risk, ensuring adaptive optimization and stability during system operation. This invention addresses the compatibility issues caused by differences in computing power across heterogeneous devices through dynamic allocation and reallocation of model fragments, ensuring efficient operation and continuous optimization in industrial scenarios. Compared to existing technologies, this invention improves the compatibility between various hardware devices and intelligent inference models in industrial settings by allocating model fragments according to the computing power and task requirements of different devices.

[0162] Example 2:

[0163] like Figure 6 As shown, this embodiment provides a model fragmentation and allocation device for industrial equipment, including a model partitioning module 201, a model fragmentation and allocation module 202, and a dynamic reallocation module 203, wherein...

[0164] The model partitioning module 201 is used to divide the pre-trained machine learning model into several model slices according to the preset function type; wherein, each model slice is set with a corresponding minimum computing power requirement and risk threshold.

[0165] The model sharding allocation module 202 is used to obtain the computing power performance level of each device in the target industrial scenario and the task risk level of the corresponding task to be executed, and generate an adaptive model sharding subset for each device based on the computing power performance level and the task risk level, so that each device can use its own adaptive model sharding subset to execute inference tasks.

[0166] In this embodiment, the model sharding allocation module 202 obtains the computing power performance level of each device in the target industrial scenario and the task risk level of the corresponding task to be executed. Specifically, the model sharding allocation module 202 collects the real-time computing power parameters of each device and calculates the computing power performance level of each device according to the real-time computing power parameters; it collects the network status data of each device and the task weight data of the task to be executed, and generates the task risk level of each task to be executed by linearly weighting the computing power performance level, network status data and task weight data.

[0167] In this embodiment, the model shard allocation module 202 generates a subset of suitable model shards for each device based on the computing power performance level and the task risk level. Specifically, for each device, the model shard allocation module 202 determines the device capability category of the current device based on the computing power performance level and the task risk level, and obtains the subset of suitable model shards corresponding to the current device based on the device capability category and the pre-acquired category-shard mapping matrix.

[0168] The dynamic redistribution module 203 is used to continuously collect the operating status data and task data to be executed of each device to calculate the real-time comprehensive performance index and the real-time comprehensive risk index respectively. If the real-time comprehensive performance index of a device is lower than the preset performance threshold or the real-time comprehensive risk index is higher than the preset risk threshold, the preset model shard redistribution mechanism is triggered to generate a new adapted model shard subset for the corresponding device.

[0169] For a more detailed explanation of the working principle and procedures of this embodiment, please refer to the relevant description in Embodiment 1.

[0170] This invention employs a model partitioning module 201 to fragment the complete inference model, breaking it down into functionally independent sub-modules. This allows the model to be deployed differently based on device computing power. Each model fragment is configured with minimum computing power requirements and risk thresholds to ensure matching between fragments and device capabilities, preventing overload of low-computing-power devices while prioritizing high-risk tasks. A model fragment allocation module 202 dynamically assesses device status and task requirements to achieve optimal matching between fragments and devices, ensuring that devices only load fragments supported by their computing power, thus improving inference efficiency and resource utilization. A dynamic reallocation module 203 monitors and dynamically reallocates fragments in real time to adapt to changes in device performance and fluctuations in task risk, ensuring adaptive optimization and stability of the system during operation.

[0171] Example 3:

[0172] This embodiment provides a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;

[0173] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the model fragmentation allocation method for industrial equipment as described in any of the above.

[0174] Example 4:

[0175] This invention provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the model fragmentation allocation method for industrial equipment as described in any of the preceding claims.

[0176] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0177] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A model slicing and distribution method for industrial equipment, characterized by, The application relates to an industrial scene model slice allocation method and device. According to a preset function type, a pre-trained machine learning model is divided into a plurality of model slices, wherein each model slice is provided with a corresponding minimum computing power requirement and a risk threshold value; The computing power performance level of each device in the target industrial scene and the task risk level of the corresponding to-be-executed task are obtained, and an adaptive model slice subset of each device is generated according to the computing power performance level and the task risk level, so that each device executes an inference task by using the adaptive model slice subset thereof; The running state data and to-be-executed task data of each device are continuously collected to calculate real-time comprehensive performance indexes and real-time comprehensive risk indexes, and if the real-time comprehensive performance index of a device is lower than a preset performance threshold value or the real-time comprehensive risk index is higher than a preset risk threshold value, a preset model slice re-distribution mechanism is triggered to generate a new adaptive model slice subset for the corresponding device.

2. The model slicing and distribution method for industrial devices according to claim 1, wherein, The computing power performance level of each device in the target industrial scene and the task risk level of the corresponding to-be-executed task are obtained, and an adaptive model slice subset of each device is generated according to the computing power performance level and the task risk level, so that each device executes an inference task by using the adaptive model slice subset thereof; Before the adaptive model slice subset of each device is generated according to the computing power performance level and the task risk level, the following steps are further included: Real-time computing power parameters of each device are collected, and the computing power performance level of each device is calculated according to the real-time computing power parameters; 3. The model slicing and distribution method for industrial devices according to claim 1, wherein, Network state data of each device and task weight data of the to-be-executed task are collected, and the task risk level of each to-be-executed task is generated by linear weighting of the computing power performance level, the network state data and the task weight data. Before the adaptive model slice subset of each device is generated according to the computing power performance level and the task risk level, the following steps are further included: Real-time computing power parameters of each device and task-related data of the to-be-executed task are collected, and a comprehensive evaluation vector of each device is generated according to the real-time computing power parameters and the task-related data; wherein the task-related data includes importance level, real-time requirement data and security level of the to-be-executed task; The comprehensive evaluation vectors of the devices are classified by multidimensional cluster analysis to generate a plurality of device capability categories; Each model slice is matched with each device capability category according to the minimum computing power requirement and the risk threshold value of each model slice, and the model slice matched with each device capability category is determined as an adaptive model slice subset of the corresponding device capability category; 4. The model slicing allocation method for industrial devices according to claim 3, wherein, A category-slice mapping matrix is generated according to the matching relationship between each device capability category and each adaptive model slice subset. The adaptive model slice subset of each device is generated according to the computing power performance level and the task risk level, and the adaptive model slice subset of each device is generated according to the computing power performance level and the task risk level.

5. The model slicing and distribution method for industrial devices according to claim 1, wherein, For each device, the device capability category of the current device is determined according to the computing power performance level and the task risk level of the current device, and the adaptive model slice subset corresponding to the current device is obtained according to the device capability category and the category-slice mapping matrix. For each device, if there are a plurality of model slices for executing the same task in the corresponding adaptive model slice subset, the output results of the plurality of model slices for executing the same task type are fused by using a pre-obtained fusion weight to obtain a final output result; wherein the fusion weight is generated according to the computing power performance level and the task risk level of the corresponding device.

6. The model slicing allocation method for industrial devices according to claim 1, wherein, Also include: When each device performs the inference task by using the respective adaptive model slice subset, the network communication data of each device is continuously collected, and whether the corresponding device has a network interruption condition is determined according to the network communication data; When there is a device with a network interruption condition, the locally cached historical feature vector and redundant parameters are called and input into the corresponding adaptive model slice subset, so that the adaptive model slice subset continues to perform the inference task.

7. The model slicing and distribution method for industrial devices as claimed in claim 1, wherein, Also include updating the parameters of the machine learning model through a preset parameter level difference update mechanism; Wherein, the parameters of the machine learning model are updated through a preset parameter level difference update mechanism, specifically: According to the new parameter value of the to-be-updated parameter in the machine learning model, a corresponding difference update package is generated; wherein, the difference update package is used to identify the difference between the old parameter value and the new parameter value of the to-be-updated parameter; Without stopping the inference task currently performed by the machine learning model, the difference update package and the old parameter value of the to-be-updated parameter are superimposed through a preset weighted fusion mechanism to update the value of the to-be-updated parameter.

8. An industrial device-oriented model fragment allocation apparatus characterized by, It includes a model division module, a model slice allocation module and a dynamic reallocation module, wherein, The model division module is configured to divide a pre-trained machine learning model into a plurality of model slices according to a preset function type; wherein each model slice is provided with a corresponding minimum computing power requirement and a risk threshold; The model slice allocation module is configured to obtain the computing power performance level of each device in a target industrial scene and the task risk level of the corresponding to-be-executed task, and generate an adaptive model slice subset for each device according to the computing power performance level and the task risk level, so that each device performs an inference task by using the respective adaptive model slice subset; The dynamic reallocation module is configured to continue to collect the running state data and to-be-executed task data of each device to calculate real-time comprehensive performance indicators and real-time comprehensive risk indicators, respectively, and if the real-time comprehensive performance indicator of a device is lower than a preset performance threshold or the real-time comprehensive risk indicator is higher than a preset risk threshold, a preset model slice reallocation mechanism is triggered to generate a new adaptive model slice subset for the corresponding device.

9. A terminal device, comprising: It includes: A processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction makes the processor execute the operations of the model slice allocation method for industrial equipment as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device or apparatus where the computer readable storage medium is located to execute the model slice allocation method for industrial equipment as claimed in any one of claims 1 to 7.

Citation Information

Cited By

  • A health data processing method, system, device, medium and product

    CN122365549A