Protocol adaptive method and device for household photovoltaic data access

By pre-defining a multi-protocol detection instruction set and a multi-level protocol fingerprint feature library, parsing templates are dynamically generated, which solves the compatibility issues caused by protocol fragmentation in household photovoltaic systems, realizes fast and reliable protocol adaptive access, reduces maintenance costs and meets real-time requirements.

CN120751026APending Publication Date: 2025-10-03HUANENG ANHUI MENGCHENG WIND POWER CO LTD +1
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202510923860.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

There are compatibility issues in household photovoltaic systems caused by protocol fragmentation. Existing technologies cannot effectively identify non-standard devices, and their real-time performance and recognition efficiency are low in weak network environments. They cannot self-expand to support unknown protocols and have high maintenance costs.

Method used

Through parallel detection of predefined multi-protocol detection instruction sets, combined with a multi-level protocol fingerprint feature library and dynamically generated parsing templates, protocol adaptive access is achieved, and layered dual-domain verification and field-level isolation mechanisms are used to ensure data reliability.

Benefits of technology

Achieve 3-second zero-configuration access in embedded devices, increase recognition coverage to 99%, and maintain a recognition success rate of 95%+ in weak network environments, reducing maintenance costs and meeting stringent real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751026A_ABST
    Figure CN120751026A_ABST
Patent Text Reader

Abstract

The invention discloses a protocol self-adaption method and device for household photovoltaic data access, and the method comprises the steps: transmitting a predefined multi-protocol detection instruction set to a newly accessed household photovoltaic terminal when the access of the household photovoltaic terminal is detected for the first time, and the predefined multi-protocol detection instruction set comprises standardized instructions of at least two heterogeneous communication protocols; monitoring response data of the household photovoltaic terminal, and identifying a communication protocol type supported by the household photovoltaic terminal based on a feature matching relationship of the response data; dynamically generating a corresponding data analysis template based on the identified communication protocol type, and establishing a protocol adaptation channel; and data acquisition and analysis are carried out on the household photovoltaic terminal through the protocol adaptive channel, so that protocol adaptive access is realized. Parallel detection of heterogeneous protocols is realized by pre-defining a multi-protocol detection instruction set, non-preset library identification of protocol types is completed in combination with response feature matching, and edge-side adaptive access is achieved by using a dynamically generated analysis template and a protocol adaptive channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power data communication, and in particular to a protocol self-adaptation method and device for household photovoltaic data access. Background Art

[0002] As the global energy transition accelerates, the share of household photovoltaic systems in the distributed energy sector continues to rise. According to statistics, new household photovoltaic installations will account for over 35% of the global photovoltaic market by 2023, and terminal equipment such as inverters and energy storage controllers are experiencing explosive growth. However, the fragmentation of communication protocols among equipment manufacturers has become a key bottleneck restricting data interconnection. Currently, mainstream household photovoltaic terminals support over 20 heterogeneous protocols, including Modbus, DL / T 645, and CANopen. Small and medium-sized manufacturers generally use proprietary protocol extensions, leading to frequent protocol compatibility issues during field deployments.

[0003] Conventional protocols primarily rely on pre-configured protocol libraries or cloud-based configuration. One approach involves dynamically loading the cloud-based protocol library, pre-installing the protocol driver package on the gateway device and then matching the device model with the remote server before issuing parsing rules. This approach suffers from insufficient coverage. The pre-configured protocol library is incompatible with unregistered proprietary protocols, preventing approximately 18% of non-standard devices from accessing the network. It also suffers from poor real-time performance. In weak network environments, such as rural areas, cloud-based interaction delays can reach as high as 5-12 seconds, violating the 1-second response time requirement of the IEC 61724-3 industry standard for photovoltaic monitoring systems. Furthermore, maintenance costs are high, requiring manual configuration of register mapping tables for each new protocol, significantly increasing the cost of deploying a single device. Another approach involves protocol self-identification, which achieves terminal identification through single-protocol polling. This approach suffers from inefficiency, with serial detection averaging 45 seconds, far exceeding the 10-second access requirement for residential systems. Furthermore, it has a high false positive rate, exceeding 25% during network jitter, leading to data parsing confusion. Furthermore, it lacks self-scaling capabilities and cannot learn unknown protocols, requiring manual intervention and firmware upgrades.

[0004] None of the above existing technologies address the dual contradiction between protocol fragmentation and limited edge computing resources. Household photovoltaic terminals are often deployed on embedded devices such as ARM Cortex-M7 MCUs, whose memory resources are typically ≤256KB, making it difficult to accommodate the protocol library expansion of traditional solutions. Furthermore, rural power grid fluctuations cause an average packet loss rate of 6.2%, further exacerbating the unreliability of protocol recognition. Summary of the Invention

[0005] The purpose of the embodiments of the present invention is to provide a protocol adaptation method and device for household photovoltaic data access, which realizes parallel detection of heterogeneous protocols through a predefined multi-protocol detection instruction set, completes the pre-library-free identification of protocol types in combination with response feature matching, and uses dynamically generated parsing templates and protocol adaptation channels to achieve adaptive access on the edge side.

[0006] To solve the above technical problems, a first aspect of an embodiment of the present invention provides a protocol adaptation method for household photovoltaic data access, comprising the following steps:

[0007] When a household photovoltaic terminal is detected to be connected for the first time, a predefined multi-protocol detection instruction set is sent to the newly connected household photovoltaic terminal, where the predefined multi-protocol detection instruction set includes standardized instructions of at least two heterogeneous communication protocols;

[0008] monitoring response data of the household photovoltaic terminal, and identifying a communication protocol type supported by the household photovoltaic terminal based on a feature matching relationship of the response data;

[0009] Based on the identified communication protocol type, dynamically generate a corresponding data parsing template and establish a protocol adaptation channel;

[0010] Data collection and analysis are performed on the household photovoltaic terminal through the protocol adaptation channel to achieve protocol adaptive access.

[0011] Furthermore, the predefined multi-protocol detection instruction set is generated in the following manner:

[0012] Extract the common instruction structures of at least three target communication protocols and split them into basic protocol units;

[0013] According to the protocol compatibility requirements, the basic protocol units are dynamically assembled according to the preset combination rules to obtain an executable detection instruction including a protocol identification header, an instruction function code and a variable parameter field;

[0014] The value of the variable parameter field is dynamically configured based on the distribution probability of historical access device data.

[0015] Furthermore, the identifying the type of communication protocol supported by the household photovoltaic terminal based on the feature matching relationship of the response data includes:

[0016] Construct a multi-level protocol fingerprint feature library, which includes protocol syntax layer features, semantic layer features and timing layer features;

[0017] Performing hierarchical analysis on the response data to extract grammatical structure features, data semantic features and response timing features respectively;

[0018] The similarity between the grammatical structure features, data semantic features and response timing features of the response data and the corresponding hierarchical features in the protocol fingerprint feature library is calculated through a three-level weighted matching algorithm, among which the semantic layer features have the highest weight and the timing layer features weight is dynamically adjusted;

[0019] When any one of the syntax layer similarity, semantic layer similarity and timing layer similarity exceeds the corresponding adaptive threshold, the protocol is determined to be matched; otherwise, the protocol fragment reassembly analysis is started.

[0020] Furthermore, the dynamic adjustment of the temporal layer feature weights includes:

[0021] Real-time monitoring of network status parameters of communication links to obtain delay fluctuations and continuous packet loss rates;

[0022] According to a preset network status classification rule, the delay fluctuation amplitude and continuous packet loss rate are mapped into discrete network quality levels;

[0023] Based on the network quality level, a preset weight mapping table is searched to obtain a corresponding time series feature weight reference value;

[0024] When a continuous packet loss event is detected, the weight decay mode is activated: the weight reference value is linearly reduced according to the duration of the packet loss;

[0025] If the adjusted weight value is lower than the freezing threshold, the time series feature matching function is suspended and the historical time series feature backtracking mode is switched.

[0026] Furthermore, the initiation of protocol fragment reassembly analysis includes:

[0027] The response data that failed protocol recognition was split at the byte level, fixed feature bytes and continuous value bytes were identified based on the photovoltaic data feature library, and the continuous value bytes were grouped to obtain candidate data fields;

[0028] Generate parsing solutions with multiple byte length and byte order combinations for each candidate data field, verify and select effective solutions through reasonable value ranges of photovoltaic parameters, and record corresponding byte position information;

[0029] Sending a specific data read instruction to verify the candidate field position, and determining the field boundary and data type according to the change characteristics of the response data;

[0030] When the success rate of verification exceeds 85% for three consecutive times, a protocol parsing template is constructed and stored in the protocol fingerprint feature library, and the feature comparison benchmark for protocol matching judgment is updated to complete the adaptive expansion of unsupported communication protocols.

[0031] Furthermore, based on the identified communication protocol type, dynamically generating a corresponding data parsing template and establishing a protocol adaptation channel include:

[0032] Based on the identified communication protocol type, parsing the corresponding field mapping rules and byte order definition, dynamically calculating an offset compensation value for a non-standard field, and writing the offset compensation value into an address mapping table of the data parsing template;

[0033] The data parsing template is configured with a set of numerical conversion rules based on the physical characteristics of the equipment and the operating environment characteristics of the household photovoltaic terminal. The temperature data is linearly corrected using an ambient temperature compensation coefficient. A time window is set for the voltage data to suppress sudden noise. The power data is dynamically calibrated using a device attenuation rate function.

[0034] Establishing a protocol adaptation channel and loading a data parsing template, and sending a verification instruction set to the household photovoltaic terminal;

[0035] Analyzing and verifying the response data of the household photovoltaic terminal, and retrying the parsing based on the offset compensation value if the field parsing error rate exceeds a threshold;

[0036] When the retry parsing still fails, the protocol backtracking re-identification process is triggered and the protocol adaptation channel is rebuilt.

[0037] Furthermore, the triggering of the protocol backtracking re-identification process and rebuilding the protocol adaptation channel includes:

[0038] Extract error features of data corresponding to verification and parsing failures, determine the backtracking level based on the type of error features, and selectively reuse historical protocol fingerprint feature data;

[0039] Dynamically adjust the detection strategy according to the backtracking level, use the redundant detection instruction set generated by the basic protocol unit for communication timeout errors, and perform incremental rematching of data parsing errors through protocol semantic layer features;

[0040] When the protocol adaptation channel is rebuilt, the successfully verified field mapping relationship is retained through a session persistence mechanism, and only the failed fields are incrementally re-identified.

[0041] Furthermore, the data collection and analysis of the household photovoltaic terminal through the protocol adaptation channel to achieve protocol adaptive access includes:

[0042] Collect household photovoltaic terminal data streams in real time and perform layered dual-domain verification, including protocol domain verification and application domain verification. The protocol domain verification verifies the frame header identifier, length field, and checksum of the data frame, while the application domain verification verifies whether the key field values ​​comply with the voltage range, power non-negativity, and energy conservation relationship.

[0043] A field-level isolation mechanism is activated for data frames with verification anomalies. After marking the location of the abnormal fields, repairs are performed based on historical data statistical characteristics, while maintaining the parsed output of normal fields.

[0044] Real-time detection of the rate of change of household photovoltaic terminal power values. When the rate of change within a set time window exceeds a preset threshold, data re-collection is triggered and associated with environmental sensor data for collaborative analysis.

[0045] Perform error diagnosis and analysis at a set period, and dynamically adjust the offset compensation parameters and value conversion rules of the parsing template based on the error records of the protocol domain check and application domain check, field repair records, and power mutation analysis results.

[0046] Furthermore, the field-level isolation mechanism is initiated for the data frame with verification abnormality, and the abnormal field position is marked and repaired based on the statistical characteristics of historical data, including:

[0047] Identify the data type attributes of abnormal fields. For power fields, use a repair algorithm associated with irradiance data. For voltage / current fields, enable historical data prediction and repair based on a time window. Temperature fields are corrected using an ambient temperature compensation coefficient.

[0048] Based on the statistical characteristics of the historical data, a plurality of candidate repair values ​​are generated, and the optimal repair value is selected in combination with the reasonable value range of the photovoltaic parameter.

[0049] Accordingly, a second aspect of an embodiment of the present invention provides a protocol adaptation device for household photovoltaic data access, which performs early warning based on the above-mentioned protocol adaptation method for household photovoltaic data access, including:

[0050] A data sending module, configured to send a predefined multi-protocol detection instruction set to the newly connected household photovoltaic terminal when the household photovoltaic terminal is detected to be connected for the first time, wherein the predefined multi-protocol detection instruction set includes standardized instructions of at least two heterogeneous communication protocols;

[0051] a data identification module configured to monitor response data from the household photovoltaic terminal and identify a type of communication protocol supported by the household photovoltaic terminal based on a feature matching relationship of the response data;

[0052] A template construction module, which is used to dynamically generate a corresponding data parsing template based on the identified communication protocol type and establish a protocol adaptation channel;

[0053] The terminal access module is used to collect and analyze data from the household photovoltaic terminal through the protocol adaptation channel to achieve protocol adaptive access.

[0054] Accordingly, a third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the above-mentioned protocol adaptation method for household photovoltaic data access.

[0055] Accordingly, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned protocol adaptation method for household photovoltaic data access.

[0056] The above technical solutions of the embodiments of the present invention have the following beneficial technical effects:

[0057] 1. Through a parallel transmission mechanism of predefined multi-protocol detection instruction sets, it covers multiple heterogeneous protocol interaction scenarios at once, eliminating the serial delay of traditional single-protocol polling. A three-level weighted matching algorithm, combined with a multi-level protocol fingerprint feature library, comprehensively determines the protocol type based on grammatical, semantic, and timing features, while ensuring recognition accuracy while reducing the average access time to within the industry standard of 10 seconds. This mechanism effectively addresses compatibility issues in fragmented protocol environments: supporting private protocol feature learning, the system's recognition coverage for non-preconfigured protocols is increased to over 99%. Dynamically adjusting timing weights to resist network fluctuations allows the system to maintain a first-time recognition success rate of over 95% even in weak network conditions with a packet loss rate of 6.2%.

[0058] 2. When protocol recognition fails, protocol fragment reassembly and analysis performs byte-level reverse engineering of the response data. This involves validating candidate fields within reasonable PV parameter value ranges and, combined with instruction-induced field boundary location, constructing a parsing template for the unknown protocol and autonomously updating the protocol fingerprint library. This process forms a self-learning closed loop of "discovery-verification-solidification," enabling the system to expand support for new protocols without manual intervention, completely eliminating the traditional solution's reliance on adapting to new vendors' equipment.

[0059] 3. To address the memory limitations of embedded devices (≤256KB), dynamic parsing template generation technology is adopted. This technology adapts to non-standard fields through an offset compensation mechanism, and implements data calibration in combination with a set of numerical conversion rules based on the device's physical characteristics, significantly reducing protocol library storage overhead. Incremental re-identification is used for channel reconstruction, restoring communication with only 15% of traditional resource consumption. Layered dual-domain checksum and field-level isolation repair further ensure data reliability, achieving 99.98% complete parsing of data frames on low-computing platforms such as the ARM Cortex-M7, meeting the stringent real-time requirements of IEC 61724-3. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a flow chart of a protocol adaptation method for household photovoltaic data access provided by an embodiment of the present invention;

[0061] Figure 2 This is a block diagram of a protocol adaptive device module for household photovoltaic data access provided by an embodiment of the present invention.

[0062] Reference numerals:

[0063] 1. Data sending module, 2. Data identification module, 3. Template construction module, 4. Terminal access module. DETAILED DESCRIPTION

[0064] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present invention.

[0065] Please refer to Figure 1 A first aspect of an embodiment of the present invention provides a protocol adaptation method for household photovoltaic data access, comprising the following steps:

[0066] Step 100: When a household photovoltaic terminal is detected to be connected for the first time, a predefined multi-protocol detection instruction set is sent to the newly connected household photovoltaic terminal. The predefined multi-protocol detection instruction set includes standardized instructions of at least two heterogeneous communication protocols.

[0067] When the household photovoltaic terminal is first sensed to be connected, the sending action of the predefined multi-protocol detection instruction set is immediately triggered. This instruction set does not simply stack multiple protocol instructions, but reconstructs the core instruction structure of heterogeneous communication protocols (such as Modbus, DL / T 645, CANopen) into a standardized instruction sequence that can be executed concurrently. The above method breaks through the linear detection mode of traditional single-protocol polling, covers the mainstream protocol detection requirements in a single communication interaction, and can compress the initial access time from the industry average of 45 seconds to less than 3 seconds. At the same time, the instruction parameters are dynamically optimized based on the distribution of historical device access data. For example, the register address segment preferentially covers 90% of the commonly used areas of the equipment, significantly improving the detection hit rate.

[0068] Step 200: monitor response data from the household photovoltaic terminal, and identify the type of communication protocol supported by the household photovoltaic terminal based on a feature matching relationship of the response data.

[0069] The protocol identification phase utilizes a layered parsing and multi-level matching mechanism. First, the terminal response data is deconstructed into three-dimensional features: the syntax layer extracts structural features such as the frame header identifier and length field position; the semantic layer analyzes the numerical distribution patterns in the data field (e.g., voltage values ​​clustered between 200 and 800V); and the timing layer measures response latency and jitter characteristics. This is then compared with the protocol fingerprint feature library using a three-level weighted algorithm. The semantic layer weighting is dominant (fixed at 0.6) because it effectively characterizes the physical commonalities of photovoltaic data; the timing layer weighting is dynamically adjusted (0.01-0.3) based on the quality of the communication link, and is automatically downgraded in cases of high network packet loss to avoid misjudgment. A protocol match is determined when the similarity of any feature layer exceeds an adaptive threshold (0.7 for the syntax layer, 0.6 for the semantic layer, and 0.65 for the timing layer). Otherwise, a fragment reassembly mechanism is initiated to reversely construct new protocol rules.

[0070] Step 300: Based on the identified communication protocol type, dynamically generate a corresponding data parsing template and establish a protocol adaptation channel.

[0071] The construction of the protocol adaptation channel is based on the integration of deep protocol parsing and edge computing. For the identified protocol type, the system dynamically generates a data parsing template: on the one hand, it parses the standard field mapping rules, and on the other hand, it calculates the offset compensation value for non-standard fields in real time (such as the private protocol register address offset +0x02). At the same time, it injects photovoltaic characteristic adaptation logic, including a temperature compensation coefficient (default -0.004 / °C), a voltage smoothing filter window (window width 5 sampling points), and a power attenuation calibration function (annual attenuation rate 0.8%). After the template is generated, it is immediately closed-loop tested using the verification instruction set. If the field parsing error rate exceeds the threshold (default 5%), the offset compensation value is used to retry the parsing. If failure occurs, incremental backtracking re-identification is triggered to ensure the reliability of channel establishment.

[0072] Step 400: Data is collected and analyzed from household photovoltaic terminals through a protocol adaptation channel to achieve protocol adaptive access.

[0073] During the data collection phase, a layered dual-domain verification and self-healing mechanism is implemented. Protocol domain verification strictly verifies the frame header identifier, length domain consistency, and CRC checksum. Application domain verification sets hard constraints based on the laws of photovoltaic physics (e.g., DC voltage ≥ AC voltage × 1.414). Abnormal data triggers field-level isolation and repair: power fields are linked to historical irradiance curves for correction, voltage / current fields use a sliding window prediction (window width of 1 minute), and temperature fields use environmental sensor compensation. The repair process combines the statistical characteristics of historical data (15-minute mean ± 2σ) with the reasonable range of photovoltaic parameters (voltage 200-800V) to select the optimal value. The system periodically analyzes error diagnosis data to drive dynamic optimization of the offset parameters and conversion rules of the parsing template, forming a closed "acquisition-diagnosis-optimization" loop.

[0074] The present invention uses a four-order collaborative mechanism of multi-protocol concurrent detection, hierarchical feature matching, dynamic template generation and closed-loop self-optimization to achieve 3-second zero-configuration access for household photovoltaic terminals under embedded resource constraints (≤256KB memory). It provides a breakthrough solution to industry pain points such as lack of compatibility caused by protocol fragmentation, high misidentification rate in weak network environments, and difficulty in accessing private protocols. At the same time, relying on field-level repair and continuous self-optimization capabilities, it ensures a 99.9% continuity rate for power generation data, provides maintenance-free access support for large-scale deployment scenarios such as photovoltaics, and significantly reduces the operation and maintenance costs throughout the life cycle.

[0075] Furthermore, the predefined multi-protocol detection instruction set in step 100 is generated by:

[0076] Step 110: extract common instruction structures of at least three target communication protocols and split them into basic protocol units.

[0077] This paper conducts an in-depth deconstruction analysis of mainstream communication protocols in the photovoltaic field, such as Modbus, DL / T 645, and CANopen. By parsing the command frameworks of each protocol, the paper isolates common core elements: protocol identifier headers (such as the Modbus start character 0x0001), common function codes (such as 0x03 for data read), and parameter container fields (such as the register address segment). These elements are then broken down into independent basic protocol units, forming a reusable command component library. For example, the DL / T 645 "68AAAAAA68" frame header is abstracted into a "variable-length frame header unit," enabling flexible adaptation to address length differences between different manufacturers. This modular design breaks through the rigid structure of traditional protocol libraries and lays the foundation for dynamic assembly.

[0078] Step 120: Based on the protocol compatibility requirements, the basic protocol units are dynamically assembled according to the preset combination rules to obtain an executable detection instruction containing a protocol identification header, an instruction function code, and a variable parameter field. The value of the variable parameter field is dynamically configured based on the distribution probability of historical access device data.

[0079] Based on real-time protocol compatibility requirements, the system reassembles basic protocol units according to preset rules. These reassembly rules comprise three layers of logic: first, protocol priority scheduling, which assigns unit weights based on historical access frequencies (e.g., a Modbus unit weight of 0.6); second, physical layer adaptation, which adjusts timing unit parameters for transmission media such as RS-485 and Ethernet; and third, intelligent parameter field filling, which dynamically configures key parameters based on the probability distribution of historical device data. Register addresses prioritize high-frequency ranges (e.g., the 3000H-3100H segment used by 70% of devices), and data lengths are sampled based on the probability distribution of device type (inverters typically use 2 bytes, energy storage controllers typically use 4 bytes). The generated detection instructions are essentially executable vectors carrying the protocol's DNA. For example, a cross-protocol detection instruction is formed by combining a Modbus frame header unit, a DLT645 function code unit, and a dynamic register parameter field. These steps enable a single instruction to simultaneously trigger responses from multiple protocols, significantly improving detection efficiency.

[0080] Furthermore, the identification of the communication protocol type supported by the household photovoltaic terminal based on the feature matching relationship of the response data in step 200 includes:

[0081] Step 210: construct a multi-level protocol fingerprint feature library, which includes protocol syntax layer features, semantic layer features, and timing layer features.

[0082] The protocol fingerprint feature library is constructed based on a layered technical architecture, comprising three core elements: syntax layer features, semantic layer features, and timing layer features. Syntax layer features extract the physical layer structural parameters of the communication protocol, including the binary pattern of the start of frame character, length field offset, checksum algorithm type, and end of frame marker. Semantic layer features define the photovoltaic data domain rule set, covering register address distribution intervals, numerical physical constraints, and physical quantity conversion formulas. Timing layer features quantify protocol interaction timing parameters, including the standard response delay baseline, the upper limit on timeout retransmissions, and the minimum interval between consecutive frames.

[0083] Step 220 , performing hierarchical analysis on the response data, extracting grammatical structure features, data semantic features, and response timing features.

[0084] The response data parsing process performs a three-stage technical processing: first, the frame header identifier is identified through fixed window scanning and the consistency of the length field declaration value with the actual data packet is verified to complete the checksum calculation; second, photovoltaic physical rules are applied to decode the data payload, identify the data type and physical properties of numeric fields, and detect outlier conflicts; finally, the delay data from the instruction being sent to the receipt of the complete response is accurately recorded, the delay jitter standard deviation is calculated, and timeout events and packet loss rates are marked.

[0085] In step 230, a three-level weighted matching algorithm is used to calculate the similarity between the grammatical structure features, data semantic features, and response timing features of the response data and the corresponding hierarchical features in the protocol fingerprint feature library, wherein the semantic layer features have the highest weight, and the timing layer features weight is dynamically adjusted.

[0086] Protocol matching adopts a three-level quantitative evaluation mechanism: syntactic similarity calculation is based on the improved sequence alignment algorithm to weightedly evaluate the start symbol matching, length field consistency and check bit position; semantic similarity calculation uses the set similarity measurement method to analyze the register address overlap rate, numerical range compliance and physical relationship consistency, and assigns a fixed weight of 0.6; timing similarity calculation processes response delay data through the time series alignment algorithm, and its weight is dynamically adjusted in the range of 0.01-0.3 according to network quality.

[0087] Step 240: When any one of the syntax layer similarity, semantic layer similarity, and temporal layer similarity exceeds the corresponding adaptive threshold, the protocol is determined to be matched. Otherwise, protocol fragment reassembly analysis is initiated.

[0088] Protocol matching is determined using three independent thresholds: Protocol matching is triggered when syntactical similarity exceeds 0.7, semantic similarity exceeds 0.6, or timing-layer similarity reaches a dynamic adaptation threshold. The timing-layer threshold is set at a baseline of 0.65, lowered to 0.5 when the packet loss rate exceeds 10%. A protocol match is considered successful if any of the three features meet these criteria; otherwise, the protocol is reassembled to resolve the unrecognized protocol.

[0089] Through hierarchical feature extraction and dynamic weighted matching mechanism, the protocol recognition accuracy and robustness are optimized in embedded systems, effectively improving the compatibility of private protocols and suppressing misjudgments in weak network environments, thus meeting the technical requirements of plug-and-play access for household photovoltaic terminals.

[0090] Furthermore, the dynamic adjustment of the time-series layer feature weights in step 230 includes:

[0091] Step 231: monitor the network status parameters of the communication link in real time to obtain the delay fluctuation amplitude and continuous packet loss rate.

[0092] Key performance indicators of the physical and transport layers are continuously captured through the underlying communication interface. Latency fluctuation refers to the standard deviation or range of the round-trip time (RTT) of packets, reflecting the stability of the network path. The continuous packet loss rate measures the proportion of probe response packets lost within a sliding time window, indicating channel reliability. The monitoring process utilizes timestamp comparison and sequence number verification mechanisms to ensure real-time and accurate data collection.

[0093] Step 232: Map the delay fluctuation amplitude and the continuous packet loss rate into discrete network quality levels according to a preset network status classification rule.

[0094] Network status grading rules implement multi-dimensional mapping based on predefined quantitative thresholds: for example, latency fluctuation ≤ 50ms and packet loss rate ≤ 2% is designated as Grade A (Excellent), latency fluctuation 50-200ms and packet loss rate 2%-10% is designated as Grade B (Medium), and latency fluctuation > 200ms or packet loss rate > 10% is designated as Grade C (Poor). This mapping table is dynamically optimized through analysis of historical network fault data to ensure that grading results are consistent with actual communication quality.

[0095] Step 233: query the preset weight mapping table based on the network quality level to obtain the corresponding time series feature weight reference value.

[0096] The weight mapping table uses a matrix design, with each network quality level assigned a specific initial weight for timing characteristics. For example, level A is assigned a high weight of 0.4 (out of a total weight of 1), level B is assigned a medium weight of 0.25, and level C is assigned a low weight of only 0.1. The weights are derived using a machine learning model trained on a historical protocol recognition dataset, ensuring minimal reliance on timing characteristics when the network degrades.

[0097] Step 234: When a continuous packet loss event is detected, activate the weight decay mode: linearly reduce the weight reference value according to the duration of the packet loss.

[0098] A continuous packet loss event is defined as no response to more than three probe packets. The weight decay function is designed as follows: weight after decay = baseline value × (1 - decay coefficient × duration). For example, when the decay coefficient is set to 0.1 / s, 5 seconds of continuous packet loss will reduce the weight by 50%. This dynamic decay mechanism can quickly respond to sudden network failures and avoid protocol misjudgments caused by temporary channel congestion.

[0099] Step 235: If the adjusted weight value is lower than the freezing threshold, the time series feature matching function is suspended and the mode of historical time series feature backtracking is switched to.

[0100] The freeze threshold is typically set to 0.05. When the weight falls below this value, the system automatically disables the real-time timing analysis module and instead uses protocol interaction timing templates (such as average response interval and timeout retransmission pattern) from the historical database. Retrospective mode replaces real-time measurements with statistical feature values ​​from the most recent stable period, ensuring that basic protocol recognition capabilities are maintained even in the event of a complete network outage.

[0101] When the protocol identification system detects severe degradation in real-time network quality, as evidenced by a timing feature weight falling below a preset freeze threshold of 0.05, it proactively suspends real-time timing analysis and enters historical timing feature retrospective mode. This mode's core mechanism relies on building an alternative analysis model by invoking a pre-stored library of historical interaction features. This model is implemented using a continuously maintained device-level timing feature database. This database is derived from raw device protocol interaction data archived during network stability (defined as periods with a packet loss rate consistently below 1% over the past 30 days). Key timing metrics are extracted for each known protocol type. These include calculating the average response time for successful interactions to establish a response latency baseline (for example, a typical baseline for Modbus is 20±5ms), recording device retransmission behavior after packet loss to develop a timeout retransmission pattern template (for example, an SMA inverter has a first retransmission interval of 200ms and a maximum retransmission count of three), and measuring the minimum and maximum intervals between consecutive data frames to determine packet spacing patterns (for example, the SunSpec protocol standard data stream interval is 500ms ±10%). The feature library adopts a dynamic update strategy, verifies data validity through a sliding window mechanism every week, and automatically eliminates historical feature records that have not appeared for more than 90 days or deviate significantly from the current device behavior pattern.

[0102] During the protocol matching phase after retrospective mode is activated, the historical feature library is first retrieved based on the unique identifier of the currently connected device. If the complete historical interaction record of the device can be found, its exclusive timing template (including parameters such as response delay baseline and packet interval threshold) is directly loaded; if there is no matching record, the generalized template of the same model device is enabled as the basis for analysis. After entering the analysis execution phase, the system implements three key operations: in terms of delay compensation, the current communication timeout threshold is dynamically adjusted to 120% of the historical baseline value (for example, a 24ms timeout is used when the historical response delay is 20ms); in loss and error handling, the response behavior is simulated based on the device's historical retransmission mode (for example, after detecting two consecutive packet loss events, a virtual retransmission instruction is automatically inserted); in the timing verification phase, the deviation between the packet interval and the historical pattern is compared in real time (if the current interval fluctuation is detected to exceed 150% of the historical maximum value, the protocol interaction is determined to be abnormal and an alarm is triggered).

[0103] The dynamic weight adjustment mechanism significantly improves the robustness of protocol identification in complex network environments by establishing a quantitative correlation model between network status and protocol feature credibility: it automatically reduces reliance on susceptible timing features when network quality deteriorates, avoiding protocol misjudgments due to channel fluctuations; it seamlessly switches to historical feature backtracking mode when the network is interrupted, maintaining a minimum level of protocol analysis capabilities; and it achieves a refined response to the degree of network status deterioration through a weight decay function, enabling the protocol identification system to adapt to sudden communication failures.

[0104] Furthermore, the startup protocol fragment reassembly analysis in step 240 includes:

[0105] Step 241 : performing byte-level splitting on the response data for which protocol identification fails, identifying fixed feature bytes and continuous value bytes based on the photovoltaic data feature library, and grouping the continuous value bytes to obtain candidate data fields.

[0106] When protocol recognition fails, the original response data is deconstructed at the byte level, using the PV data feature library as a reference to identify two key byte patterns: fixed signature bytes (e.g., static markers such as the protocol identifier 0xAA55 and the device model code) and continuous numeric bytes (represented by the correlation between the high and low bits of adjacent bytes). A sliding window algorithm is used to scan the byte stream, grouping byte sequences that meet PV data continuity rules (e.g., 4-byte floating-point numbers and 2-byte integers) into candidate data fields, while also recording their starting offset and length attributes. The PV data feature library pre-stores industry-standard parameter features (e.g., the exponential distribution characteristics of irradiance values ​​and the discrete step values ​​of string voltage) to distinguish valid data segments from random noise.

[0107] Step 242 : Generate parsing solutions of multiple byte length and byte order combinations for each candidate data field, screen effective solutions by verifying the reasonable value range of photovoltaic parameters, and record the corresponding byte position information.

[0108] For each candidate data field, multiple parsing hypothesis combinations are automatically generated: byte lengths cover common lengths such as 2, 4, and 8 bytes, and byte order includes big-endian, little-endian, and a hybrid byte order unique to PV devices (e.g., high-byte big-endian + low-byte little-endian). Each combination is screened by the PV parameter reasonable value verification engine. For example, the parsed value is compared against a predefined voltage valid range (0-1000V), power non-negativity constraints, and a reasonable temperature range (-40 to 150°C). Invalid solutions that exceed physical thresholds (e.g., a parsed power value of -10kW) are discarded. Verified solutions and their byte position information are recorded in a temporary analysis cache.

[0109] Step 243: Send a specific data read instruction to verify the candidate field position, and determine the field boundary and data type based on the change characteristics of the response data.

[0110] A specific data read command (e.g., actively adjusting the inverter output power by 5%) is sent to the target device, inducing a change in the value of key fields. By comparing the response data before and after the command is executed, three types of change characteristics are identified: amplitude changes in numerical fields (e.g., power value changes from 3.2kW to 3.36kW), bit flips in status fields (e.g., bit 3 of the operating status byte changes from 0 to 1), and positional shifts in structural features (e.g., field length dynamically expands with data type). The change pattern is combined to determine the precise field boundaries (e.g., the power field ends at byte 12) and data type (e.g., a 4-byte IEEE 754 floating-point number starting at byte 14).

[0111] Step 244 , when the verification success rate exceeds 85% for three consecutive times, a protocol parsing template is constructed and stored in the protocol fingerprint feature library, and the feature comparison benchmark for protocol matching judgment is updated to complete the adaptive expansion of the unsupported communication protocol.

[0112] Verified field parsing rules are tested for continuity and stability: across three independent interactions, the field parsing success rate is required to be ≥85% (e.g., at least 8.5 out of 10 fields are correctly parsed). Once this standard is met, the system constructs a structured protocol parsing template, including a field mapping table (e.g., bytes 0-3: DC voltage, big-endian floating-point number), verification rules (e.g., CRC16 starting offset = 18), and exception handling strategies. This template is stored in the feature library as a new protocol fingerprint, and the protocol matching engine's feature comparison benchmark is updated (e.g., a new "change-induced response similarity" metric is added), enabling the system to autonomously expand to unsupported protocols.

[0113] Protocol fragment reassembly analysis utilizes a data-driven reverse engineering mechanism. Physically constrained byte combination verification avoids parsing space explosion. Instruction-induced change detection enables precise location of field boundaries, while a stability verification mechanism ensures the reliability of the new protocol template. This process transforms traditional passive protocol adaptation into active protocol discovery. This allows the system to gradually establish usable communication specifications through hierarchical deconstruction and closed-loop verification of device response characteristics, even without requiring a pre-built protocol library. This significantly improves the protocol compatibility and scalability of the photovoltaic data access system in heterogeneous environments.

[0114] Furthermore, in step 300, based on the identified communication protocol type, a corresponding data parsing template is dynamically generated, and a protocol adaptation channel is established, including:

[0115] Step 310 , based on the identified communication protocol type, parse the corresponding field mapping rules and byte order definition, dynamically calculate the offset compensation value for the non-standard field, and write the offset compensation value into the address mapping table of the data parsing template.

[0116] Based on the identified communication protocol type (such as Modbus-TCP or SunSpec), the corresponding standard field mapping rules and byte order definitions are loaded from the protocol knowledge base. For non-standard fields customized by device manufacturers (such as the extended status register), offset compensation values ​​are dynamically calculated by analyzing the address distribution characteristics of historical response data. For example, when it is detected that the voltage value is actually stored at the theoretical address +0x02, an offset compensation value of +2 is generated. All offset compensation values ​​are written to the address mapping table of the data parsing template, forming a three-tuple structure containing the base address, offset vector, and data type (such as [0x3000, +2, float32]).

[0117] Step 320, based on the numerical conversion rule set of the data parsing template configured based on the physical characteristics of the equipment and the operating environment characteristics in the household photovoltaic terminal, the temperature data is linearly corrected using the ambient temperature compensation coefficient, a time window is set for the voltage data to suppress sudden noise, and the power data is dynamically calibrated using the equipment attenuation rate function.

[0118] Based on the physical characteristics of connected devices (such as the temperature coefficient of monocrystalline silicon modules at -0.35% / °C) and the operating environment (such as the local annual average temperature of 25°C), a multi-dimensional numerical conversion rule set is configured in the data parsing template. Specifically, this includes linear correction of temperature data using an ambient temperature compensation coefficient (e.g., superimposing the inverter's internal temperature measurement with the ambient temperature difference ΔT); applying a moving average filter with a 200ms time window to voltage data to suppress sudden noise caused by electromagnetic interference; and dynamically calibrating power data using a device attenuation function (e.g., η = 98.5% - 0.05% × number of months in operation) to eliminate measurement bias caused by device aging.

[0119] Step 330: Establish a protocol adaptation channel and load a data parsing template, and send a verification instruction set to the household photovoltaic terminal.

[0120] A bidirectional protocol adaptation channel is established. After loading the complete data parsing template, a structured verification instruction set is sent to the target device. This instruction set is designed as a layered verification model: the base layer verifies the parsing of standard fields (such as reading serial numbers), the enhancement layer verifies non-standard fields (such as reading back test parameters after writing them), and the stress layer verifies boundary conditions (such as handling out-of-range data reading). Flow control parameters (such as maximum retransmission count = 3) are initialized synchronously during channel establishment.

[0121] Step 340: Analyze and verify the response data of the household photovoltaic terminal. If the field parsing error rate exceeds a threshold, retry the parsing based on the offset compensation value.

[0122] Analyze the parsing results of the device's response data and calculate the field-level error rate (number of error fields / total number of fields). When the error rate exceeds a set threshold (e.g., 15%), prioritize retrying the parsing based on the offset compensation value in the address mapping table. For example, if the initial parsing of address 0x3010 fails, the system automatically attempts to resolve adjacent addresses within the range of 0x3010 ± N (N is the compensation value). The retry process uses a binary search strategy to gradually narrow the offset correction range.

[0123] Step 350: When the retry parsing still fails, trigger the protocol backtracking re-identification process and rebuild the protocol adaptation channel.

[0124] If the retry parsing error rate remains above the threshold, the protocol backtracking re-identification process is triggered: the current adaptation channel is frozen, the multi-level protocol fingerprint re-matching described in claim 3 is initiated (focusing on verifying semantic layer features), and the protocol adaptation channel is rebuilt. The reconstruction process retains the verified field mapping relationships (such as serial number parsing rules) and only incrementally reconfigures the faulty fields, avoiding the resource overhead of a full reset.

[0125] Through collaborative modeling of the protocol knowledge base and device characteristics, intelligent optimization of parsing templates is achieved: offset compensation resolves addressing anomalies for non-standard devices, context-aware numerical conversion improves data physical plausibility, and a layered verification mechanism ensures channel reliability. When parsing anomalies occur, a retry strategy based on compensation values ​​quickly fixes common address offset failures, while retroactive re-identification provides deep anomaly recovery capabilities. This creates a closed-loop adaptive system from data parsing to channel maintenance, significantly enhancing the robustness and data accuracy of heterogeneous PV device access.

[0126] Furthermore, the triggering of the protocol backtracking re-identification process and the reconstruction of the protocol adaptation channel in step 350 includes:

[0127] Step 351 : extract error features of corresponding data of failed verification and parsing, determine the backtracking level based on the type of error features, and selectively reuse historical protocol fingerprint feature data.

[0128] Multi-dimensional error signatures are extracted from the response data of failed verifications. The backtracking level is divided into three levels based on the signature type: communication timeout (signature code 0xFFFF), data checksum (CRC error count > 3), and semantic inconsistency (e.g., negative power value). Historical protocol fingerprint signatures are selectively reused based on the backtracking level. For communication timeout errors, network layer signature templates (e.g., timeout retransmission parameters) are loaded, while for data parsing errors, the device's historical semantic signature set (e.g., field value association rules) is used.

[0129] Step 352 , dynamically adjust the detection strategy according to the backtracking level, use the redundant detection instruction set generated by the basic protocol unit for communication timeout errors, and perform incremental rematching through protocol semantic layer features for data parsing errors.

[0130] Dynamically configure detection strategies for different backtracking levels. Communication timeout errors trigger the basic protocol unit reorganization mechanism: standard instructions are disassembled into minimum protocol units (such as Modbus function code 03H) and reassembled into a detection instruction set with redundant check bits (50% more instruction copies are added). Data parsing errors initiate incremental rematching at the semantic layer: only the contextual semantic features (the product relationship with voltage / current) of the fault field (such as abnormal power value) are extracted, and local similarity matching is performed in the protocol fingerprint library, skipping the full syntax layer comparison.

[0131] Step 353: When reestablishing the protocol adaptation channel, the successfully verified field mapping relationship is retained through the session persistence mechanism, and only the failed fields are incrementally re-identified.

[0132] When reestablishing the protocol adaptation channel, the session persistence mechanism is enabled, solidifying successfully verified field mappings (such as parsing rules for static fields like serial numbers and device models) in memory. The system constructs a field status bitmap and initiates incremental re-identification only for fields marked as failed in the bitmap (such as temperature value parsing anomalies). This involves sending targeted narrowband detection commands (such as reading from the 0x30-0x33 address range) to avoid rescanning the entire protocol range. After the channel is reestablished, historical flow control parameters (such as window size = 4) are automatically restored.

[0133] This process achieves precise fault isolation through a hierarchical backtracking mechanism driven by error characteristics: resource allocation is optimized based on the level division of error types, redundant detection is used to improve robustness for communication layer problems, and recovery of application layer errors is accelerated through local matching of semantic features. Session persistence is combined with incremental re-identification to reduce reconstruction overhead to less than 30% of the traditional full reset while ensuring protocol adaptation consistency, forming a self-healing closed loop of "precise diagnosis-targeted repair-minimal interference", significantly improving the service availability of the photovoltaic data access system in continuous operation scenarios.

[0134] Furthermore, in step 400, data collection and analysis of household photovoltaic terminals are performed through the protocol adaptation channel to achieve protocol adaptive access, including:

[0135] Step 410: Collect household photovoltaic terminal data streams in real time and perform layered dual-domain verification, including protocol domain verification and application domain verification. The protocol domain verification verifies the frame header identifier, length field, and checksum of the data frame, and the application domain verification verifies whether the key field values ​​comply with the voltage range, power non-negativity, and energy conservation relationship.

[0136] Data streams are collected in real time through an established protocol adaptation channel, and a layered dual-domain check is performed on each frame of data. The protocol domain check first verifies whether the frame header identifier matches a predefined magic number (such as 0x55AA), checks the consistency of the length field's declared value with the actual number of bytes, and verifies frame integrity through a cyclic redundancy check (CRC32). The application domain check verifies key fields based on the laws of photovoltaic physics: the voltage value must be within the nominal range of the equipment nameplate (such as 180-1000V), the power value must meet the non-negativity constraint, and the conversion efficiency between the DC input power and the AC output power must comply with the energy conservation relationship (η = Po / Pi ≥ 85%). Abnormal values ​​trigger the check flag.

[0137] Step 420 , a field-level isolation mechanism is initiated for the data frame with verification anomalies, and after marking the location of the abnormal field, repair is performed based on the statistical characteristics of historical data, while maintaining the parsed output of the normal field.

[0138] A field-level isolation mechanism is enabled for data frames that fail validation: abnormal field locations (e.g., abnormal temperature values ​​in bytes 12-15) are marked with a bitmap, while normal fields continue to be output to upper-layer applications. For isolated fields, the system performs intelligent repair based on the statistical characteristics of historical data: power fields use a regression model associated with real-time irradiance data (e.g., P = G × k, where G is irradiance); voltage / current fields use ARIMA prediction based on a sliding time window (length = 30 seconds); and temperature fields use an ambient temperature compensation coefficient (ΔT = T_env × 0.7) for offset correction. The repair process generates multiple candidate values ​​and ultimately selects the optimal solution based on the reasonable range of device physical parameters (e.g., component temperature ≤ 150°C).

[0139] Step 430 , detecting the rate of change of household photovoltaic terminal power values ​​in real time. When the rate of change within a set time window exceeds a preset threshold, triggering data re-collection and correlating it with environmental sensor data for collaborative analysis.

[0140] The instantaneous rate of change of power values ​​is monitored in real time, and the differential value dP / dt is calculated within a 200ms time window. When the rate of change exceeds the device's dynamic response threshold (e.g., >10% / s for string inverters), a high-priority re-collection command is immediately triggered. Simultaneously, environmental sensor data is analyzed collaboratively: a sudden change in irradiance is identified as a cloud cover event; a sudden temperature rise signals a cooling failure warning; and no environmental changes are flagged as a data collection anomaly. The collaborative analysis results are written to the diagnostic log for subsequent optimization.

[0141] Step 440 , performing error diagnosis analysis at a set period, and dynamically adjusting the offset compensation parameters and value conversion rules of the parsing template based on the error records of the protocol domain check and the application domain check, the field repair records, and the power mutation analysis results.

[0142] Periodic error diagnostic analysis is performed every 15 minutes, aggregating three data sources: protocol domain checksum error records (e.g., CRC failure counts), application domain field repair statistics (e.g., voltage repair frequency), and power mutation event analysis reports. Parsing template parameters are dynamically adjusted based on multi-dimensional error patterns: offset compensation is added for fields with persistent address offsets (e.g., +0x02 → +0x04), the appropriate range threshold is relaxed for frequently out-of-range temperature data (e.g., -20°C to 120°C → -30°C to 130°C), and the filter window is increased for devices sensitive to power mutations (200ms → 500ms). After parameter adjustments, recalibration is required using the verification instruction set.

[0143] The above process establishes a comprehensive data quality assurance system: layered dual-domain verification enables in-depth inspection from the transport layer to the application layer. Field-level isolation ensures data continuity while accurately locating fault points. Power mutation correlation analysis establishes a mapping between physical laws and data anomalies. Periodic diagnosis forms a closed loop for parameter self-optimization. By dynamically balancing data reliability and system robustness, this ensures the output of valid data that conforms to the laws of photovoltaic physics even in complex operating environments, providing highly reliable data support for energy monitoring systems.

[0144] Furthermore, in step 420, a field-level isolation mechanism is initiated for the data frame with verification anomalies, and after marking the location of the abnormal field, repair is performed based on the statistical characteristics of historical data, including:

[0145] Step 421, identify the data type attributes of the abnormal field, use the repair algorithm associated with irradiance data for power fields, enable historical data prediction repair based on time window for voltage / current fields, and use the ambient temperature compensation coefficient for temperature fields.

[0146] First, identify the data type attributes of the abnormal field and implement a differentiated repair strategy based on physical characteristics. For power fields (such as AC output power), call the real-time data stream of the irradiance sensor to establish a dynamic correlation model: when an abnormal power value is detected, the linear regression equation P is used. cal =G×η×A for repair (G is the current irradiance, η is the historical average conversion efficiency, and A is the component area). For voltage / current fields (such as string DC voltage), enable historical data prediction based on a sliding time window (length = 30 seconds): Generate V through the ARIMA model t =f(V t-1 ,V t -2,Δt) prediction value sequence. Temperature fields (such as inverter internal temperature) use the ambient temperature compensation algorithm: calculate T fix =T raw +k×(T env -T env_base)(k is the heat dissipation coefficient of the equipment, T env_base is the calibration reference temperature).

[0147] Step 422 : Generate multiple candidate repair values ​​based on the statistical characteristics of the historical data, and select the optimal repair value in combination with the reasonable value range of the photovoltaic parameters.

[0148] Based on the preliminary repair value generated in step 421, the candidate set is further expanded in combination with historical statistical features: the power field is added with a ±3% fluctuation range of candidate values, the voltage field introduces the mean value of adjacent strings as a reference, and the temperature field considers the heat dissipation delay effect to generate time offset candidate values. All candidate values ​​are input into the photovoltaic parameter reasonable value verification engine: the power value must satisfy 0≤P≤P max (P max is the rated capacity of the equipment), the voltage value must be between the open circuit voltage and the MPPT lower limit (such as V oc ×0.8≤V≤V oc ), the temperature value is limited by the material tolerance range (-40℃ to 150℃). Finally, the candidate value that satisfies both physical constraints and deviates from the historical mean is selected as the optimal repair output.

[0149] Accordingly, please refer to Figure 2 A second aspect of an embodiment of the present invention provides a protocol adaptation device for household photovoltaic data access, which performs early warning based on the above-mentioned protocol adaptation method for household photovoltaic data access, including:

[0150] A data sending module 1 is configured to send a predefined multi-protocol detection instruction set to the newly connected household photovoltaic terminal when the household photovoltaic terminal is detected to be connected for the first time. The predefined multi-protocol detection instruction set includes standardized instructions for at least two heterogeneous communication protocols.

[0151] Data identification module 2, which is used to monitor the response data of the household photovoltaic terminal and identify the type of communication protocol supported by the household photovoltaic terminal based on the feature matching relationship of the response data;

[0152] Template construction module 3, which is used to dynamically generate a corresponding data parsing template based on the identified communication protocol type and establish a protocol adaptation channel;

[0153] The terminal access module 4 is used to collect and analyze data from household photovoltaic terminals through a protocol adaptation channel to achieve protocol adaptive access.

[0154] Accordingly, a third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the above-mentioned protocol adaptation method for household photovoltaic data access.

[0155] Accordingly, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned protocol adaptation method for household photovoltaic data access.

[0156] The embodiment of the present invention aims to protect a protocol adaptation method and device for household photovoltaic data access, which has the following effects:

[0157] 1. Through a parallel transmission mechanism of predefined multi-protocol detection instruction sets, it covers multiple heterogeneous protocol interaction scenarios at once, eliminating the serial delay of traditional single-protocol polling. A three-level weighted matching algorithm, combined with a multi-level protocol fingerprint feature library, comprehensively determines the protocol type based on grammatical, semantic, and timing features, while ensuring recognition accuracy while reducing the average access time to within the industry standard of 10 seconds. This mechanism effectively addresses compatibility issues in fragmented protocol environments: supporting private protocol feature learning, the system's recognition coverage for non-preconfigured protocols is increased to over 99%. Dynamically adjusting timing weights to resist network fluctuations allows the system to maintain a first-time recognition success rate of over 95% even in weak network conditions with a packet loss rate of 6.2%.

[0158] 2. When protocol recognition fails, protocol fragment reassembly and analysis performs byte-level reverse engineering of the response data. This involves validating candidate fields within reasonable PV parameter value ranges and, combined with instruction-induced field boundary location, constructing a parsing template for the unknown protocol and autonomously updating the protocol fingerprint library. This process forms a self-learning closed loop of "discovery-verification-solidification," enabling the system to expand support for new protocols without manual intervention, completely eliminating the traditional solution's reliance on adapting to new vendors' equipment.

[0159] 3. To address the memory limitations of embedded devices (≤256KB), dynamic parsing template generation technology is adopted. This technology adapts to non-standard fields through an offset compensation mechanism, and implements data calibration in combination with a set of numerical conversion rules based on the device's physical characteristics, significantly reducing protocol library storage overhead. Incremental re-identification is used for channel reconstruction, restoring communication with only 15% of traditional resource consumption. Layered dual-domain checksum and field-level isolation repair further ensure data reliability, achieving 99.98% complete parsing of data frames on low-computing platforms such as the ARM Cortex-M7, meeting the stringent real-time requirements of IEC 61724-3.

[0160] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0161] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0162] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A protocol adaptive method for household photovoltaic data access, characterized in that: The following steps are involved: When a household photovoltaic terminal is detected to be connected for the first time, a predefined multi-protocol detection instruction set is sent to the newly connected household photovoltaic terminal, where the predefined multi-protocol detection instruction set includes standardized instructions of at least two heterogeneous communication protocols; monitoring response data of the household photovoltaic terminal, and identifying a communication protocol type supported by the household photovoltaic terminal based on a feature matching relationship of the response data; Based on the identified communication protocol type, dynamically generate a corresponding data parsing template and establish a protocol adaptation channel; Data collection and analysis are performed on the household photovoltaic terminal through the protocol adaptation channel to achieve protocol adaptive access.

2. The protocol adaptation method for household photovoltaic data access according to claim 1 is characterized in that: The predefined multi-protocol detection instruction set is generated in the following manner: Extract the common instruction structures of at least three target communication protocols and split them into basic protocol units; According to the protocol compatibility requirements, the basic protocol units are dynamically assembled according to the preset combination rules to obtain an executable detection instruction including a protocol identification header, an instruction function code and a variable parameter field; The value of the variable parameter field is dynamically configured based on the distribution probability of historical access device data.

3. The protocol adaptation method for household photovoltaic data access according to claim 2, characterized in that: The identifying the type of communication protocol supported by the household photovoltaic terminal based on the feature matching relationship of the response data includes: Construct a multi-level protocol fingerprint feature library, which includes protocol syntax layer features, semantic layer features and timing layer features; Performing hierarchical analysis on the response data to extract grammatical structure features, data semantic features and response timing features respectively; The similarity between the grammatical structure features, data semantic features and response timing features of the response data and the corresponding hierarchical features in the protocol fingerprint feature library is calculated through a three-level weighted matching algorithm, among which the semantic layer features have the highest weight and the timing layer features weight is dynamically adjusted; When any one of the syntax layer similarity, semantic layer similarity and timing layer similarity exceeds the corresponding adaptive threshold, the protocol is determined to be matched; otherwise, the protocol fragment reassembly analysis is started.

4. The protocol adaptation method for household photovoltaic data access according to claim 3 is characterized in that: The dynamic adjustment of the temporal layer feature weights includes: Real-time monitoring of network status parameters of communication links to obtain delay fluctuations and continuous packet loss rates; According to a preset network status classification rule, the delay fluctuation amplitude and continuous packet loss rate are mapped into discrete network quality levels; Based on the network quality level, a preset weight mapping table is searched to obtain a corresponding time series feature weight reference value; When a continuous packet loss event is detected, the weight decay mode is activated: the weight reference value is linearly reduced according to the duration of the packet loss; If the adjusted weight value is lower than the freezing threshold, the time series feature matching function is suspended and the historical time series feature backtracking mode is switched.

5. The protocol adaptation method for household photovoltaic data access according to claim 4 is characterized in that: The startup protocol fragment reassembly analysis includes: The response data that failed protocol recognition was split at the byte level, fixed feature bytes and continuous value bytes were identified based on the photovoltaic data feature library, and the continuous value bytes were grouped to obtain candidate data fields; Generate parsing solutions with multiple byte length and byte order combinations for each candidate data field, verify and select effective solutions through reasonable value ranges of photovoltaic parameters, and record corresponding byte position information; Sending a specific data read instruction to verify the candidate field position, and determining the field boundary and data type according to the change characteristics of the response data; When the success rate of verification exceeds 85% for three consecutive times, a protocol parsing template is constructed and stored in the protocol fingerprint feature library, and the feature comparison benchmark for protocol matching judgment is updated to complete the adaptive expansion of unsupported communication protocols.

6. The protocol adaptation method for household photovoltaic data access according to claim 5, characterized in that: The dynamically generating a corresponding data parsing template based on the identified communication protocol type and establishing a protocol adaptation channel includes: Based on the identified communication protocol type, parsing the corresponding field mapping rules and byte order definition, dynamically calculating an offset compensation value for a non-standard field, and writing the offset compensation value into an address mapping table of the data parsing template; The data parsing template is configured with a set of numerical conversion rules based on the physical characteristics of the equipment and the operating environment characteristics of the household photovoltaic terminal. The temperature data is linearly corrected using an ambient temperature compensation coefficient. A time window is set for the voltage data to suppress sudden noise. The power data is dynamically calibrated using a device attenuation rate function. Establishing a protocol adaptation channel and loading a data parsing template, and sending a verification instruction set to the household photovoltaic terminal; Analyzing and verifying the response data of the household photovoltaic terminal, and retrying the parsing based on the offset compensation value if the field parsing error rate exceeds a threshold; When the retry parsing still fails, the protocol backtracking re-identification process is triggered and the protocol adaptation channel is rebuilt.

7. The protocol adaptation method for household photovoltaic data access according to claim 6, characterized in that: The triggering protocol backtracking re-identification process and rebuilding the protocol adaptation channel includes: Extract error features of data corresponding to verification and parsing failures, determine the backtracking level based on the type of error features, and selectively reuse historical protocol fingerprint feature data; Dynamically adjust the detection strategy according to the backtracking level, use the redundant detection instruction set generated by the basic protocol unit for communication timeout errors, and perform incremental rematching of data parsing errors through protocol semantic layer features; When the protocol adaptation channel is rebuilt, the successfully verified field mapping relationship is retained through a session persistence mechanism, and only the failed fields are incrementally re-identified.

8. The protocol adaptation method for household photovoltaic data access according to claim 1, characterized in that: The data collection and analysis of the household photovoltaic terminal through the protocol adaptation channel to achieve protocol adaptive access includes: Collect household photovoltaic terminal data streams in real time and perform layered dual-domain verification, including protocol domain verification and application domain verification. The protocol domain verification verifies the frame header identifier, length field, and checksum of the data frame, while the application domain verification verifies whether the key field values ​​comply with the voltage range, power non-negativity, and energy conservation relationship. A field-level isolation mechanism is activated for data frames with verification anomalies. After marking the location of the abnormal fields, repairs are performed based on historical data statistical characteristics, while maintaining the parsed output of normal fields. Real-time detection of the rate of change of household photovoltaic terminal power values. When the rate of change within a set time window exceeds a preset threshold, data re-collection is triggered and associated with environmental sensor data for collaborative analysis. Perform error diagnosis and analysis at a set period, and dynamically adjust the offset compensation parameters and value conversion rules of the parsing template based on the error records of the protocol domain check and application domain check, field repair records, and power mutation analysis results.

9. The protocol adaptation method for household photovoltaic data access according to claim 8, characterized in that: The field-level isolation mechanism is initiated for data frames with verification anomalies, and after marking the abnormal field locations, repair is performed based on historical data statistical characteristics, including: Identify the data type attributes of abnormal fields. For power fields, use a repair algorithm associated with irradiance data. For voltage / current fields, enable historical data prediction and repair based on a time window. Temperature fields are corrected using an ambient temperature compensation coefficient. Based on the statistical characteristics of the historical data, a plurality of candidate repair values ​​are generated, and the optimal repair value is selected in combination with the reasonable value range of the photovoltaic parameter.

10. A protocol adaptive device for household photovoltaic data access, characterized in that: The method for performing early warning based on the protocol adaptation method for household photovoltaic data access according to any one of claims 1 to 9 includes: A data sending module, configured to send a predefined multi-protocol detection instruction set to the newly connected household photovoltaic terminal when the household photovoltaic terminal is detected to be connected for the first time, wherein the predefined multi-protocol detection instruction set includes standardized instructions of at least two heterogeneous communication protocols; a data identification module configured to monitor response data from the household photovoltaic terminal and identify a type of communication protocol supported by the household photovoltaic terminal based on a feature matching relationship of the response data; A template construction module, which is used to dynamically generate a corresponding data parsing template based on the identified communication protocol type and establish a protocol adaptation channel; The terminal access module is used to collect and analyze data from the household photovoltaic terminal through the protocol adaptation channel to achieve protocol adaptive access.

Citation Information

Cited By

  • Energy equipment digital intelligent management method and system based on multi-protocol compatibility

    CN121211203A

  • Dynamic decoding rule base-based telemetry data stream analysis method and system

    CN121547524A

  • Industrial IoT-oriented equipment adaptive access method and system

    CN121567791A

  • Plug-and-play adaptive access method and system for heterogeneous equipment of micro-grid

    CN121643257A

  • Industrial network protocol data packet capturing and analyzing method and system

    CN121644433A