A method and system for testing a low-voltage switchgear circuit based on end-cloud cooperation
By using edge-side adaptive protocol parsing and cloud-side federated learning-transfer learning framework, the problem of fragmented communication protocols in medium and low voltage switch cabinets was solved, achieving efficient cross-protocol testing and adaptation and data processing, and improving the system's adaptability and parsing accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI ZHONGKE ELECTRIC EQUIP CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-26
Smart Images

Figure CN122293759A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical test data processing technology, specifically to a method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration. Background Technology
[0002] The edge-cloud collaborative testing and processing of electrical circuits in medium and low voltage distribution cabinets is a method that integrates edge computing (edge) and cloud computing (cloud) technologies to conduct intelligent and efficient testing and fault diagnosis of electrical circuits in medium and low voltage distribution cabinets. This technology aims to improve the operation and maintenance efficiency of power equipment, ensure the reliability of power supply, and realize data-driven intelligent decision-making.
[0003] When implementing existing technical solutions, the equipment in the control panel comes from different manufacturers, such as Schneider Electric, ABB, and Siemens, and uses Modbus, IEC 61850, CANopen, and proprietary protocols. This makes it difficult for the end-side gateway to access the system uniformly, and the cloud platform data model is chaotic. There are also problems such as fragmented communication protocols and poor interoperability. Summary of the Invention
[0004] The purpose of this invention is to provide a method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration, which solves the problems of fragmented communication protocols and poor interoperability in existing solutions.
[0005] The objective of this invention can be achieved through the following technical solutions:
[0006] A method for testing and processing electrical circuits in medium- and low-voltage switchgear based on edge-cloud collaboration includes:
[0007] An edge-side adaptive protocol parsing engine is built, which combines edge reinforcement learning algorithms to collect communication protocols of devices from different manufacturers in the cabinet in real time. The protocol parsing rules are dynamically adjusted through the interaction feedback between the reinforcement learning agent and the device, and the heterogeneous protocol data is converted into structured test data containing unique device identifiers, standardized test indicators, and data quality labels.
[0008] Based on the generated structured test data, a cloud-side federated learning-transfer learning collaborative framework is constructed. Without sharing the original test data, federated learning enables distributed training of multi-device cross-protocol test models. At the same time, transfer learning is used to transfer the test model knowledge of mature devices to newly connected niche protocol devices, generating a globally unified cross-protocol test adaptation model. This model is then pushed to the edge, dynamically updating the adaptive protocol parsing rules and reinforcement learning strategies to achieve closed-loop optimization of edge-cloud collaboration.
[0009] Furthermore, when deploying reinforcement learning agents, a deep deterministic policy gradient algorithm is used to construct the agents, which includes defining the state space and action space.
[0010] Furthermore, when adjusting the dynamic protocol parsing rules driven by reinforcement learning, the agent uses a policy network with a deep deterministic policy gradient algorithm to perform forward propagation calculations on the current state space and output the optimal action.
[0011] The parsing engine updates the built-in field offset mapping table, encoding format conversion library and verification threshold configuration in real time based on the optimal action parameters, and applies the adjusted rules to parse the message.
[0012] The reward value of the agent is calculated based on the analysis results, and the optimization direction of the strategy is guided by positive and negative rewards.
[0013] Furthermore, the implemented policy network update maximizes the value of state-action pairs through the policy network loss function, thereby improving the optimality of action decisions.
[0014] Furthermore, the accuracy of value assessment is improved by minimizing the mean square error between the predicted and target values through the value network loss function.
[0015] Furthermore, the successfully parsed data is standardized and mapped, converting different protocol indicators into standardized fields, unifying data units and precision, and adding a unique device identifier to the standardized data.
[0016] Calculate the data quality score of the preliminary structured data, perform data analysis on the calculated data quality score, generate quality labels and bind them to the preliminary structured data;
[0017] Structured test data, including the unique identifier of the bound device, standardized test indicators, and quality labels, is stored in the edge cache and simultaneously pushed to the cloud platform, providing reliable input for subsequent cloud-side collaborative optimization.
[0018] Furthermore, when constructing the federated learning distributed training framework, a set of federated learning participants is defined;
[0019] Each edge device trains a local cross-protocol parsing model based on the generated local structured test data. The cloud server aggregates the local model parameters through a federated averaging algorithm to generate a global model.
[0020] Furthermore, for newly connected niche protocol devices, transfer learning is used to transfer the model knowledge of mature protocol devices to the target domain. Niche protocol devices correspond to the target domain, and mature protocol devices correspond to the source domain.
[0021] The maximum mean difference is used to measure the difference in feature distribution between the source domain and the target domain, and knowledge transfer is achieved by minimizing the maximum mean difference loss.
[0022] Furthermore, the cloud-side server merges the global model aggregated by federated learning with the target domain model optimized by transfer learning to generate a globally unified cross-protocol test adaptation model.
[0023] A structured pruning algorithm is used to compress the cross-protocol test adaptation model, and the importance score of each convolutional channel or fully connected layer neuron is calculated.
[0024] Furthermore, based on the preset target compression rate, a pruning threshold is calculated; channels with importance scores below the pruning threshold are removed, and the cross-protocol test adaptation model structure is reconstructed.
[0025] A test and processing system for electrical circuits of medium and low voltage switchgear based on edge-cloud collaboration, comprising:
[0026] Edge-side adaptive protocol parsing and edge reinforcement learning optimization module: Construct an edge-side adaptive protocol parsing engine, combine edge reinforcement learning algorithms, collect communication protocols of devices from different manufacturers in the cabinet in real time, and dynamically adjust the protocol parsing rules through the interaction feedback between the reinforcement learning agent and the device, and convert heterogeneous protocol data into structured test data containing unique device identifiers, standardized test indicators and data quality labels;
[0027] Cloud-side federated learning and transfer learning collaborative adaptation module: Based on the generated structured test data, a cloud-side federated learning-transfer learning collaborative framework is constructed. Without sharing the original test data, distributed training of multi-device cross-protocol test models is achieved through federated learning. At the same time, transfer learning is used to transfer the test model knowledge of mature devices to newly connected niche protocol devices, generating a globally unified cross-protocol test adaptation model. This model is then pushed to the edge, dynamically updating the adaptive protocol parsing rules and reinforcement learning strategies to achieve closed-loop optimization of edge-cloud collaboration.
[0028] Compared to existing solutions, the beneficial effects achieved by this invention are:
[0029] This invention utilizes a reinforcement learning-based dynamic adjustment mechanism to adapt to mainstream and proprietary protocols without manual intervention, effectively improving protocol parsing success rates compared to traditional static templates. Through multi-dimensional verification and quality labeling mechanisms, it effectively controls data non-compliance rates, providing a reliable data foundation for cloud-side analysis. Local parsing, standardization, and verification on the device side reduce cloud data transmission volume and computational pressure, thereby improving cloud-side processing efficiency. The reinforcement learning closed-loop feedback mechanism gradually improves system adaptability and parsing accuracy with increasing interaction frequency, achieving continuous long-term performance optimization.
[0030] Under the federated learning framework, this invention allows edge devices to upload only model parameters rather than raw test data, thus preventing the leakage of sensitive industrial data. By transferring model knowledge from mature protocols to devices using less common protocols through transfer learning, it eliminates the need for extensive labeled data, effectively reducing adaptation time and improving the success rate. By combining multi-device distributed training with cross-protocol knowledge transfer, the global model adapts to over 95% of heterogeneous industrial protocols, effectively improving the parsing accuracy of individual devices. By combining model compression with a lightweight push protocol, it shortens model transmission time and edge update time without affecting the real-time parsing requirements of industrial scenarios. The bidirectional flow of data between the edge and cloud, along with the model, enables continuous optimization of system performance, allowing the system performance to approach its theoretical optimum over long-term operation. Attached Figure Description
[0031] The invention will now be further described with reference to the accompanying drawings.
[0032] Figure 1 This is a flowchart illustrating the steps of implementing the electrical circuit testing and processing method for medium and low voltage switchboards based on end-to-cloud collaboration according to the present invention.
[0033] Figure 2 This is a block diagram of a medium- and low-voltage switchboard electrical circuit testing and processing system based on end-to-cloud collaboration according to the present invention. Detailed Implementation
[0034] 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.
[0035] Example 1, such as Figure 1 As shown, this invention is a method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration, comprising:
[0036] An edge-side adaptive protocol parsing engine is constructed, combining edge reinforcement learning algorithms to collect communication protocols of devices from different manufacturers within the control panel in real time. Through the interaction feedback between the reinforcement learning agent and the devices, the protocol parsing rules are dynamically adjusted, converting heterogeneous protocol data into structured test data containing unique device identifiers, standardized test metrics, and data quality labels. Specific steps include:
[0037] When initializing the edge-side adaptive protocol parsing engine, a pre-trained multi-protocol template library is loaded, covering field mapping rules, encoding formats, and verification algorithms for mainstream protocols such as Modbus RTU, TCP, IEC 61850 MMS, and CANopen DS30; encoding formats include ASCII, BCD, and floating-point; verification algorithms include CRC16 and MD5.
[0038] Additionally, initialize a standardized data output template, defining the field formats and constraints for unique device identifiers, standardized test indicator sets, and data quality labels; among which, data quality labels are used to mark the integrity, accuracy, and legality of data;
[0039] When deploying a reinforcement learning agent, the Deep Deterministic Policy Gradient (DDPG) algorithm is used to construct the agent, which includes defining the state space S and the action space A; specifically:
[0040] The state space S is used to integrate the current protocol environment and historical interaction results, serving as the input for the agent's decision-making. The relevant expressions are: ;in, This is the type identifier for the protocol to be parsed, containing a value of 0, 1, or 2. Specifically, 0 represents Modbus, 1 represents IEC 61850, and 2 represents a proprietary protocol. The representation can be adjusted according to the application requirements of the actual application scenario. This represents the protocol parsing success rate at the previous moment, with a value ranging from 0 to 1. The data quality score for the previous time step is normalized to the range of 0 to 1. The current message is a 16-dimensional feature vector, including the frame header byte sequence, frame tail identifier, data segment length, check code type, field separator, total message length, transmission direction, message time interval, number of fields, percentage of numeric fields, percentage of string fields, percentage of repeated fields, percentage of reserved fields, protocol version, device address, and function code / service identifier.
[0041] The expression for calculating the data quality score is as follows:
[0042] ;in, Rate the data quality; These are the weighting coefficients for the field missing rate, the field parsing error rate, and the field length violation rate, respectively, all of which are real numbers between 0 and 1. ; This refers to the field missing rate, which is the proportion of fields in the structured test data that were not successfully parsed out of the total number of protocol fields. The field parsing error rate is the proportion of fields in the structured test data whose parsed values do not match the actual values out of the total number of parsed fields. The field length violation rate is the proportion of fields in the structured test data whose length does not conform to the protocol's specifications out of the total parsed fields.
[0043] Action space A is used to define the adjustable parsing rule parameters of the agent to achieve dynamic adaptation. The relevant expressions are: ;in, Adjust the field mapping relationship, for example, map the private protocol 0x02 field to the standardized Current metric; Adjust the encoding format conversion rules, such as converting BCD encoding to decimal floating-point; Adjust the data verification threshold, for example, modify the current index to a reasonable range of 0~100A;
[0044] When implementing real-time acquisition and preliminary feature extraction of multi-protocol messages, the end-side gateway acquires the protocol messages of the devices in the control panel in real time with a period of 100ms through multiple channels such as RS485, Ethernet, and CAN. During the acquisition process, hardware filtering is used to remove message noise caused by electromagnetic interference.
[0045] In addition, a 16-dimensional feature vector is extracted from the original message;
[0046] Among them, features such as frame header, frame trailer, and checksum are directly used for protocol type identification;
[0047] Features such as data segment length and number of fields guide the adjustment of the complexity of parsing rules;
[0048] Optimize the agent's decision cycle and policy update frequency by considering features such as transmission direction and time interval;
[0049] By using collaborative input of multi-dimensional features, the agent can more accurately adjust the protocol parsing rules, improving the adaptive compatibility of heterogeneous protocols and the quality of data parsing.
[0050] When adjusting the dynamic protocol parsing rules driven by reinforcement learning, the agent uses a policy network with a deep deterministic policy gradient algorithm to adjust the current state space. Perform forward propagation calculations and output the optimal action. For example, for a device with a private protocol, if the agent detects that the parsing success rate is only 75%, it will automatically adjust the field offset from bytes 5-8 to bytes 6-9.
[0051] The parsing engine updates its built-in field offset mapping table, encoding format conversion library, and verification threshold configuration in real time based on optimal action parameters, and applies the adjusted rules to parse the message.
[0052] If the parsing is successful, preliminary structured data containing the device's unique identifier and standardized test metrics will be generated.
[0053] If parsing fails, for example, due to a mismatch in the checksum, the agent receives a negative reward, such as Reward = −0.5, triggering a secondary rule adjustment until parsing succeeds or the maximum number of adjustments is reached, with a maximum of 5 adjustments.
[0054] The agent's reward value is calculated based on the analysis results. The optimization direction is guided by positive and negative rewards. The relevant expression is: ;in, This is the reward value at the current moment; These are weights for parsing success rate and data quality, respectively. The default values are 0.6 and 0.4 respectively; This is a time penalty coefficient, which penalizes excessive parsing time. The portion exceeding 10ms is normalized to 0~1, with a default value of 0.1. To avoid invalid iterations, the penalty coefficient is adjusted repeatedly, penalizing rule adjustments that occur more than 3 times consecutively. The default value is 0.2. The current protocol parsing success rate; The data quality score for the current moment is normalized to the range of 0 to 1. To analyze the normalized value of the time consumption, , The time spent on parsing; The adjustment flag is set to 1 if the adjustment is repeated ≥3 times, otherwise it is 0.
[0055] When implementing experience replay and policy network updates, the current state space is... Optimal action Current reward value Next state space Form a quadruple and store it in an experience replay pool with a capacity of 10,000 records;
[0056] When the storage capacity of the experience replay pool reaches the threshold of 1000 records, 64 experience tuples are randomly sampled to break the correlation of experience and avoid local optima.
[0057] The implemented policy network update maximizes the value of state-action pairs through the policy network loss function, thereby improving the optimality of action decisions. The relevant expression is: ;in, The loss value of the policy network is the objective function that needs to be minimized during model training; The expected value of the sampled state s is calculated, where Batch is a set of batch experience tuples randomly selected from the experience replay pool; s is the current environmental state observed by the agent, which contains core information of the protocol parsing scenario, such as parsing success rate, message characteristics, data quality score, etc. For the value network Critic, output actions to the policy network for the current state s. The value assessment of this action, that is, the expected long-term reward that the action can bring; The action output by the policy network in the current state s includes adjustment instructions for protocol parsing rules, such as field offsets, encoding conversion rules, and verification thresholds.
[0058] Furthermore, by minimizing the mean squared error between the predicted and target values through the value network loss function, the accuracy of value assessment is improved. The relevant expression is as follows:
[0059] ;in, The loss value of the value network is the objective function that needs to be minimized during model training. Empirical tuples for batch sampling Calculate the expected value. Batch contains a quadruple of state, action, reward, and next state; 'a' is the specific action taken by the agent in the current state 's', such as adjusting the field offset to bytes 6-9; 'r' is the immediate reward obtained by the agent after taking action 'a', such as +1 for successful parsing and -0.5 for failure. The next state that the agent enters after taking action 'a', for example, the parsing success rate is increased to 90% after adjusting the rules; The discount factor, ranging from 0 to 1, is used to weigh the importance of current rewards against future rewards; the target value network considers the next state. and target policy network output actions Value assessment; For the target policy network in the next state The optimal action to output; The value prediction of the current state s and action a by the main value network is the predicted long-term reward expectation.
[0060] After every 200 parsing interactions, the parameters of the policy network and value network are synchronized to the corresponding target network to ensure the stability of the training process.
[0061] The successfully parsed data is standardized and mapped, and different protocol indicators are uniformly converted into standardized fields. At the same time, the data units and precision are unified, and a unique device identifier is added to the standardized data. The unique device identifier is generated by combining the MAC address and the model code, such as 00:1A:2B:3C:4D:5E_ModelX, forming preliminary structured data.
[0062] Calculate the data quality score of the preliminary structured data, perform data analysis on the calculated data quality score, generate quality labels and bind them to the preliminary structured data;
[0063] If the data quality score is greater than the first score threshold, an excellent quality label is generated.
[0064] If the data quality score is greater than or equal to the second scoring threshold and less than or equal to the first scoring threshold, a qualified quality label is generated.
[0065] If the data quality score is less than the second scoring threshold, an unqualified quality label is generated; the first scoring threshold is greater than the second scoring threshold, with the first scoring threshold set to 95 by default and the second scoring threshold set to 80 by default.
[0066] Structured test data, including the unique identifier of the bound device, standardized test indicators, and quality labels, is stored in the edge cache and simultaneously pushed to the cloud platform, providing reliable input for subsequent cloud-side collaborative optimization.
[0067] In this embodiment of the invention, a reinforcement learning dynamic adjustment mechanism can adapt to mainstream and proprietary protocols without manual intervention, effectively improving the protocol parsing success rate compared to traditional static templates. A multi-dimensional verification and quality labeling mechanism can effectively control the data non-compliance rate, providing a reliable data foundation for cloud-side analysis. Local parsing, standardization, and verification on the device side reduces cloud data transmission volume and computational pressure, thereby improving cloud-side processing efficiency. The reinforcement learning closed-loop feedback mechanism enables the system's adaptability and parsing accuracy to gradually improve with increasing interaction frequency, achieving continuous long-term performance optimization.
[0068] Based on the generated structured test data, a cloud-side federated learning-transfer learning collaborative framework is constructed. Without sharing the original test data, federated learning enables distributed training of multi-device cross-protocol test models. Simultaneously, transfer learning is used to transfer test model knowledge from mature devices to newly connected devices using less common protocols, generating a globally unified cross-protocol test adaptation model. This model is then pushed to the edge, dynamically updating adaptive protocol parsing rules and reinforcement learning strategies to achieve closed-loop optimization of edge-cloud collaboration. Specific steps include:
[0069] When constructing a federated learning distributed training framework, define the set of federated learning participants. ,in, For the i-th edge device, the cloud server acts as the federation coordinator; i is the index of the edge device, i=1, 2, 3, ..., N; N is the total number of edge devices;
[0070] Each end-side device is based on the generated local structured test data. Training a local cross-protocol parsing model The cloud-based server aggregates local model parameters using a federated averaging algorithm to generate a global model. ;
[0071] When updating the global model, the expression involved is:
[0072] ;in, These are the parameters of the global cross-protocol parsing model after the (t+1)th iteration; The number of local structured test data samples for the i-th end-side device, derived from the packet parsing results; The total number of samples across all end-side devices; These are the local model parameters of the i-th edge device after the t-th iteration.
[0073] For newly connected devices using niche protocols, transfer learning is used to transfer model knowledge from mature protocol devices to the target domain, with the niche protocol devices corresponding to the target domain. Mature protocol devices correspond to source domains ;
[0074] The maximum mean difference (MMD) is used to measure the difference in feature distributions between the source and target domains. Knowledge transfer is achieved by minimizing the MMD loss. The relevant expression is as follows:
[0075] ;in, This represents the loss value for the difference in feature distributions between the source and target domains. The smaller the value, the more similar the distributions are, and the better the transfer effect. The number of structured test data samples for mature protocol devices in the source domain is derived from historical analysis results; The number of structured test data samples for niche protocol devices in the target domain is derived from the parsing results of newly accessed devices; This is a feature mapping function that maps the generated structured test data to a high-dimensional feature space. This is a sample of structured test data from the source domain, including device identifiers, test metrics, protocol characteristics, etc. This refers to structured test data samples within the target domain.
[0076] The cloud-based server merges the global model aggregated through federated learning with the target domain model optimized through transfer learning to generate a globally unified cross-protocol test adaptation model. The relevant expressions are as follows:
[0077] ;in, A globally unified cross-protocol testing adaptation model; This is the global model weight coefficient, which controls the fusion ratio between the global model and the target domain model. Its value ranges from 0 to 1, and it dynamically adjusts based on the number of devices using the niche protocol. When the proportion of niche protocol devices is less than 10%, The value is set to 0.8 to prioritize the generalization ability of the global model; when the proportion of niche protocol devices is ≥10%, The value is 0.6, balancing global generalization with the ability to adapt to niche protocols; The target domain model optimized for transfer learning;
[0078] To reduce model transmission bandwidth consumption, a structured pruning algorithm is used to compress the cross-protocol test adaptation model. The importance score for each convolutional channel or fully connected layer neuron is calculated, and the L1 norm evaluation method is employed.
[0079] ;in, For the first The importance score of each channel; For the first The j-th weight parameter in each channel; For the first The number of weight parameters for each channel;
[0080] Based on the preset target compression ratio The expression for calculating the pruning threshold T is as follows:
[0081] ;in, This indicates that the importance scores of all channels are sorted in ascending order; This is a floor function that converts floating-point results to integers to ensure that the number of prunes is an integer. Total number of channels for cross-protocol testing adaptation models;
[0082] It should be noted that this formula converts the target compression ratio into an executable pruning threshold by quantifying parameters, forming a complete closed loop with the channel importance assessment mentioned above and the subsequent channel pruning operation, ensuring the accuracy and repeatability of structured pruning, while ensuring that the inference accuracy loss of the model after pruning is controlled within 1%.
[0083] Remove channels with importance scores below the pruning threshold T, and restructure the cross-protocol test adaptation model. Specifically:
[0084] For convolutional layers, remove the kernel parameters of the corresponding channels and adjust the number of input channels for subsequent layers;
[0085] For fully connected layers, remove the weight parameters of the corresponding neurons and adjust the input dimensions of subsequent layers. The adjustment of the number of input channels and input dimensions of subsequent layers is a conventional technical solution. The specific implementation steps and content are not limited here and can be customized and adjusted according to the application requirements of the actual application scenario.
[0086] The compressed cross-protocol test adaptation model is pushed to the end device via the lightweight MQTT protocol. After receiving the model, the end device updates its local model storage. The model push time is less than 10 seconds and the end model loading time is less than 500ms.
[0087] When implementing edge-cloud collaborative closed-loop optimization, edge devices use a globally unified cross-protocol testing and adaptation model to update protocol parsing rules and reinforcement learning strategies.
[0088] Specifically, when updating the protocol parsing rules, the weights of the field mapping table are adjusted, using the following formula: ;in, The updated final field mapping table is the latest set of rules for parsing protocol data on the client side; This indicates a mapping rule that sorts mappings from highest to lowest priority, prioritizing the retention of mappings for fields with high contribution and high accuracy. This is the original field mapping table, which is the rule for corresponding standard fields of the protocol currently being used on the end side; This indicates new mapping rules added based on the importance of cross-protocol test adaptation model features, such as supplementing uncovered protocol fields; This indicates the mapping priority of field f. The higher the score, the greater the contribution of that field to the training of the cross-protocol test adaptation model, and the higher the priority of the mapping rule. , To test the feature weight parameters of the standardized field f in the cross-protocol test adaptation model, reflecting the importance of this field in the model prediction; This represents the historical accuracy of parsing field f on the client-side, with a value ranging from 0 to 1. For example, 95% means that the success rate of parsing this field is 95%. This is the sorting direction parameter; True indicates descending order, with higher scores listed first.
[0089] When updating the reinforcement learning strategy, adjust the state space. The weights of each feature are given by the formula: , For the first New weights for each state feature; The original state feature weights; In the cross-protocol testing adaptation model, the first The weights of each state feature; Indexing of features in the adaptation model for cross-protocol testing;
[0090] The updated parsing rules and reinforcement learning strategies are applied to message parsing to generate new structured test data, which is then uploaded to the cloud, forming a closed-loop optimization of edge data generation, cloud model training, edge model updating, and edge data generation.
[0091] In this embodiment of the invention, under the federated learning framework, the edge device only uploads model parameters instead of the original test data, which can avoid the leakage of sensitive industrial data; by transferring the model knowledge of mature protocols to devices with niche protocols through transfer learning, no large amount of labeled data is required, which can effectively reduce the adaptation time and improve the adaptation success rate; by combining multi-device distributed training with cross-protocol knowledge transfer, the global model can adapt to more than 95% of industrial heterogeneous protocols, which can effectively improve the parsing accuracy of single devices.
[0092] By combining model compression with a lightweight push protocol, model transmission time and edge update time can be shortened without affecting the real-time parsing requirements of industrial scenarios; the bidirectional flow of edge-cloud data and models enables continuous optimization of system performance, allowing the system performance to approach the theoretical optimal value under long-term operation.
[0093] Example 2, as Figure 2 As shown, a test processing system for electrical circuits of medium and low voltage switchgear based on edge-cloud collaboration includes an edge-side adaptive protocol parsing and edge reinforcement learning optimization module and a cloud-side federated learning and transfer learning collaborative adaptation module.
[0094] Edge-side adaptive protocol parsing and edge reinforcement learning optimization module: Construct an edge-side adaptive protocol parsing engine, combine edge reinforcement learning algorithms, collect communication protocols of devices from different manufacturers in the cabinet in real time, and dynamically adjust the protocol parsing rules through the interaction feedback between the reinforcement learning agent and the device, and convert heterogeneous protocol data into structured test data containing unique device identifiers, standardized test indicators and data quality labels;
[0095] Cloud-side federated learning and transfer learning collaborative adaptation module: Based on the generated structured test data, a cloud-side federated learning-transfer learning collaborative framework is constructed. Without sharing the original test data, distributed training of multi-device cross-protocol test models is achieved through federated learning. At the same time, transfer learning is used to transfer the test model knowledge of mature devices to newly connected niche protocol devices, generating a globally unified cross-protocol test adaptation model. This model is then pushed to the edge, dynamically updating the adaptive protocol parsing rules and reinforcement learning strategies to achieve closed-loop optimization of edge-cloud collaboration.
[0096] In the several embodiments provided by this invention, it should be understood that the disclosed system can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative; for example, the division of modules is only a logical functional division, and there may be other division methods in actual implementation.
[0097] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0098] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.
[0099] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the essential characteristics of the present invention.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration, characterized in that, include: An edge-side adaptive protocol parsing engine is built, which combines edge reinforcement learning algorithms to collect communication protocols of devices from different manufacturers in the cabinet in real time. The protocol parsing rules are dynamically adjusted through the interaction feedback between the reinforcement learning agent and the device, and the heterogeneous protocol data is converted into structured test data containing unique device identifiers, standardized test indicators, and data quality labels. Based on the generated structured test data, a cloud-side federated learning-transfer learning collaborative framework is constructed. Without sharing the original test data, federated learning enables distributed training of multi-device cross-protocol test models. At the same time, transfer learning is used to transfer the test model knowledge of mature devices to newly connected niche protocol devices, generating a globally unified cross-protocol test adaptation model. This model is then pushed to the edge, dynamically updating the adaptive protocol parsing rules and reinforcement learning strategies to achieve closed-loop optimization of edge-cloud collaboration.
2. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 1, characterized in that, When deploying reinforcement learning agents, a deep deterministic policy gradient algorithm is used to construct the agents, which includes defining the state space and action space.
3. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 2, characterized in that, When adjusting the dynamic protocol parsing rules driven by reinforcement learning, the agent uses a policy network with a deep deterministic policy gradient algorithm to perform forward propagation calculations on the current state space and output the optimal action. The parsing engine updates the built-in field offset mapping table, encoding format conversion library and verification threshold configuration in real time based on the optimal action parameters, and applies the adjusted rules to parse the message. The reward value of the agent is calculated based on the analysis results, and the optimization direction of the strategy is guided by positive and negative rewards.
4. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 3, characterized in that, The implemented policy network update maximizes the value of state-action pairs through the policy network loss function, thereby improving the optimality of action decisions. Furthermore, the accuracy of value assessment is improved by minimizing the mean square error between the predicted and target values through the value network loss function.
5. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 4, characterized in that, The successfully parsed data is standardized and mapped, and different protocol indicators are uniformly converted into standardized fields. At the same time, the data units and precision are unified, and a unique device identifier is added to the standardized data. Calculate the data quality score of the preliminary structured data, perform data analysis on the calculated data quality score, generate quality labels and bind them to the preliminary structured data; Structured test data, including the unique identifier of the bound device, standardized test indicators, and quality labels, is stored in the edge cache and simultaneously pushed to the cloud platform, providing reliable input for subsequent cloud-side collaborative optimization.
6. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 5, characterized in that, When constructing a federated learning distributed training framework, define the set of federated learning participants; Each edge device trains a local cross-protocol parsing model based on the generated local structured test data. The cloud server aggregates the local model parameters through a federated averaging algorithm to generate a global model.
7. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 6, characterized in that, For newly connected devices with niche protocols, transfer learning is used to transfer the model knowledge of mature protocol devices to the target domain. The niche protocol devices correspond to the target domain, and the mature protocol devices correspond to the source domain. The maximum mean difference is used to measure the difference in feature distribution between the source domain and the target domain, and knowledge transfer is achieved by minimizing the maximum mean difference loss.
8. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 7, characterized in that, The cloud-side server merges the global model aggregated by federated learning with the target domain model optimized by transfer learning to generate a globally unified cross-protocol test adaptation model. A structured pruning algorithm is used to compress the cross-protocol test adaptation model, and the importance score of each convolutional channel or fully connected layer neuron is calculated.
9. The method for testing and processing electrical circuits of medium and low voltage switchgear based on end-to-cloud collaboration according to claim 8, characterized in that, Calculate the pruning threshold based on the preset target compression rate; Remove channels with importance scores below the pruning threshold and restructure the cross-protocol test adaptation model.
10. A testing and processing system for medium and low voltage switchboard electrical circuits based on end-to-cloud collaboration, characterized in that, include: Edge-side adaptive protocol parsing and edge reinforcement learning optimization module: Construct an edge-side adaptive protocol parsing engine, combine edge reinforcement learning algorithms, collect communication protocols of devices from different manufacturers in the cabinet in real time, and dynamically adjust the protocol parsing rules through the interaction feedback between the reinforcement learning agent and the device, and convert heterogeneous protocol data into structured test data containing unique device identifiers, standardized test indicators and data quality labels; Cloud-side federated learning and transfer learning collaborative adaptation module: Based on the generated structured test data, a cloud-side federated learning-transfer learning collaborative framework is constructed. Without sharing the original test data, distributed training of multi-device cross-protocol test models is achieved through federated learning. At the same time, transfer learning is used to transfer the test model knowledge of mature devices to newly connected niche protocol devices, generating a globally unified cross-protocol test adaptation model. This model is then pushed to the edge, dynamically updating the adaptive protocol parsing rules and reinforcement learning strategies to achieve closed-loop optimization of edge-cloud collaboration.