Wireless low-power-consumption Bluetooth communication method and device of photovoltaic optimizer

Through the wireless low-power Bluetooth communication method, the data of the photovoltaic optimizer is sampled, graded and encrypted in real time, which solves the high power consumption and security problems of the photovoltaic optimizer wireless communication, and realizes low-power, safe and reliable data transmission.

CN120264253APending Publication Date: 2025-07-04华能(嘉峪关)新能源有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The wireless communication solutions of existing photovoltaic optimizers have problems such as high power consumption, inability to adaptively adjust the working mode, and lack of data security protection, which affects the reliability and security of the system.

Method used

The wireless low-power Bluetooth communication method is adopted to obtain the initial data packet through real-time sampling processing, perform Bluetooth service characteristic value allocation and illumination intensity threshold grading, combine advanced encryption standard algorithms and dynamic key processing to realize packet integrity check and fault detection, and integrate the main control chip and wireless communication module.

Benefits of technology

It reduces system power consumption, improves the orderliness and reliability of data transmission, prevents data theft, and ensures communication quality and system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120264253A_ABST
    Figure CN120264253A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data communication, and discloses a wireless low-power-consumption Bluetooth communication method and device for a photovoltaic optimizer. The method comprises the following steps: carrying out real-time sampling processing on input and output data of a photovoltaic module to obtain an initial data packet; performing Bluetooth service feature value distribution processing on the initial data packet to obtain a Bluetooth communication data packet with a main service identifier and a plurality of feature value identifiers; performing grading processing on the Bluetooth communication data packet through an illumination intensity threshold to obtain working mode data; processing the working mode data through an advanced encryption standard algorithm and a dynamic key to obtain an encrypted security data packet; performing connection state monitoring and data packet integrity checking processing on the encrypted security data packet to obtain fault detection data; fault detection data are integrated and processed through the main control chip and the wireless communication module interface, and system operation data are obtained. According to the invention, the efficiency and accuracy of wireless low-power-consumption Bluetooth communication of the photovoltaic optimizer are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data communication, and in particular to a wireless low-power Bluetooth communication method and device for a photovoltaic optimizer. Background Art

[0002] With the rapid development of photovoltaic power generation systems, photovoltaic optimizers, as key devices to improve the power generation efficiency of photovoltaic modules, have been widely used. Currently, the monitoring of photovoltaic optimizers mainly uses wired communication methods, such as RS485 communication or power line carrier communication. Wired communication methods require additional laying of communication cables, increasing the construction difficulty and cost. Moreover, in the complex environment of a photovoltaic power station, the communication lines are prone to interference and damage. Although power line carrier communication does not require additional wiring, in large-scale photovoltaic power stations, due to the intensive presence of on-site power electronic devices, there is serious electromagnetic interference, resulting in severe attenuation of communication signals and difficulty in ensuring communication quality.

[0003] However, existing wireless communication solutions for photovoltaic optimizers still have some technical defects: First, traditional wireless communication solutions have high power consumption. Since photovoltaic optimizers need to work continuously for a long time, high power consumption will affect the reliability of the system. Second, in the case of drastic changes in light intensity, it is difficult for the working mode of the communication module to be adaptively adjusted according to the actual situation, resulting in unnecessary power waste. Third, existing solutions lack a complete data security protection mechanism, making them vulnerable to malicious attacks and data theft, threatening the safe operation of photovoltaic power stations. Summary of the Invention

[0004] This application provides a wireless low-power Bluetooth communication method and device for a photovoltaic optimizer, which are used to improve the efficiency and accuracy of wireless low-power Bluetooth communication of the photovoltaic optimizer.

[0005] In a first aspect, this application provides a wireless low-power Bluetooth communication method for a photovoltaic optimizer. The wireless low-power Bluetooth communication method for the photovoltaic optimizer includes: performing real-time sampling processing on the input and output data of the photovoltaic module to obtain an initial data packet including a timestamp, a voltage value, a current value, a power value, and a status code; performing Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a primary service identifier and multiple characteristic value identifiers; performing light intensity threshold classification processing on the Bluetooth communication data packet to obtain working mode data including a normal mode, a low-power mode, and an ultra-low-power mode; performing advanced encryption standard algorithm and dynamic key processing on the working mode data to obtain an encrypted security data packet; performing connection status monitoring and data packet integrity check processing on the encrypted security data packet to obtain fault detection data; and performing main control chip and wireless communication module interface integration processing on the fault detection data to obtain system operation data.

[0006] Second aspect, the present application provides a wireless low-power Bluetooth communication device for a photovoltaic optimizer, and the wireless low-power Bluetooth communication device for the photovoltaic optimizer includes:

[0007] An acquisition module, configured to perform real-time sampling processing on the input and output data of a photovoltaic module to obtain an initial data packet including a timestamp, a voltage value, a current value, a power value, and a status code;

[0008] An allocation module, configured to perform Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a primary service identifier and a plurality of characteristic value identifiers;

[0009] A grading module, configured to perform grading processing on the Bluetooth communication data packet through a light intensity threshold to obtain operating mode data including a normal mode, a low-power mode, and an ultra-low-power mode;

[0010] A processing module, configured to perform processing on the operating mode data through an Advanced Encryption Standard (AES) algorithm and a dynamic key to obtain an encrypted secure data packet;

[0011] An inspection module, configured to perform connection status monitoring and data packet integrity inspection processing on the encrypted secure data packet to obtain fault detection data;

[0012] An integration module, configured to perform integration processing on the fault detection data through an interface between a main control chip and a wireless communication module to obtain system operation data.

[0013] In the technical solution provided by the present application, by performing real-time sampling processing on the input and output data of a photovoltaic module, an initial data packet including a timestamp, a voltage value, a current value, a power value, and a status code is obtained, realizing comprehensive monitoring of the working state of the photovoltaic module and providing a complete data basis for subsequent data analysis and processing; adopting a Bluetooth service characteristic value allocation processing mechanism, through the design of a primary service identifier and a plurality of characteristic value identifiers, the data transmission has a clear hierarchical structure, improving the orderliness and manageability of data transmission; introducing a light intensity threshold grading processing mechanism, automatically switching between a normal mode, a low-power mode, and an ultra-low-power mode according to the change of light intensity, significantly reducing the overall power consumption of the system while ensuring the normal operation of the system; adopting an Advanced Encryption Standard (AES) algorithm and a dynamic key processing solution to encrypt the operating mode data and generate an encrypted secure data packet, effectively preventing data from being illegally stolen and tampered with; through connection status monitoring and data packet integrity inspection processing, real-time monitoring of communication quality is realized, ensuring the reliability and integrity of data transmission; finally, through an integration processing mechanism of an interface between a main control chip and a wireless communication module, efficient configuration of hardware resources and unified management of system operation data are realized, making the entire communication system have good scalability and maintainability. Description of the Drawings

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0015] Figure 1 It is a schematic diagram of an embodiment of the wireless low-power Bluetooth communication method of the photovoltaic optimizer in the embodiments of the present application;

[0016] Figure 2 It is a schematic diagram of an embodiment of the wireless low-power Bluetooth communication device of the photovoltaic optimizer in the embodiments of the present application. Specific embodiments

[0017] The embodiments of the present application provide a wireless low-power Bluetooth communication method and device for a photovoltaic optimizer. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and accompanying drawings of the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0018] For ease of understanding, the following describes the specific process of the embodiments of the present application. Please refer to Figure 1 An embodiment of the wireless low-power Bluetooth communication method of the photovoltaic optimizer in the embodiments of the present application includes:

[0019] Step S101: Perform real-time sampling processing on the input and output data of the photovoltaic module to obtain an initial data packet containing a timestamp, voltage value, current value, power value, and status code;

[0020] Step S102: Perform Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a primary service identifier and multiple characteristic value identifiers;

[0021] Step S103: Perform light intensity threshold grading processing on the Bluetooth communication data packet to obtain working mode data including normal mode, low-power mode, and ultra-low-power mode;

[0022] Step S104: Process the working mode data through the Advanced Encryption Standard algorithm and a dynamic key to obtain an encrypted security data packet;

[0023] Step S105: Process the encrypted security data packet through connection status monitoring and data packet integrity check to obtain fault detection data;

[0024] Step S106: Process the fault detection data through the integration of the main control chip and the wireless communication module interface to obtain system operation data.

[0025] It can be understood that the execution entity of this application can be the wireless low-power Bluetooth communication device of the photovoltaic optimizer, or it can also be a terminal or a server, and specific details are not limited here. In this embodiment of the application, the server is used as the execution entity for illustration.

[0026] Specifically, the input voltage, input current, output voltage, and output current of the photovoltaic module are sampled through a high-precision analog-to-digital converter. The sampling frequency is 100Hz, and the sampling data uses a 12-bit quantization accuracy. For example, when the input voltage of the photovoltaic module is 34.01V, it is converted into 12-bit binary data as 111111001001. The quantized data is processed by the digital power control chip STM32F334, a millisecond-level timestamp is added to each sampling point, the real-time power value is calculated, and a status code is generated. The status code includes information such as the MPPT working status and the fault status. Then, the processed data is allocated according to the Bluetooth service characteristic values. The main service identifier is used to identify the entire communication service, and the characteristic value identifiers are divided into five categories: real-time data, historical data, configuration parameters, control commands, and firmware upgrade. Each category of data has an independent transmission attribute configuration. When the data packet size exceeds 247 bytes, packet splitting is performed, and a check code is added to each data packet.

[0027] During the data transmission process, the working mode is automatically adjusted according to the light intensity: when the light intensity is greater than 800W / m2, the normal mode is adopted, the sampling period is 1 second, and the broadcast interval is 100ms; when the light intensity is between 200 - 800W / m2, the low-power mode is adopted, the sampling period is extended to 10 seconds, and the broadcast interval is increased to 1 second; when the light intensity is lower than 200W / m2, it switches to the ultra-low-power mode, the sampling period is increased to 60 seconds, and the broadcast interval is set to 10 seconds. To ensure data security, the Advanced Encryption Standard algorithm is used to encrypt the data. First, an identity authentication key is generated based on the device's unique serial number. After two-way authentication, a dynamic encryption key is generated to encrypt the data, and a serial number mark and timestamp information are added to the encrypted data.

[0028] During the data transmission process, the connection status and packet integrity are monitored in real time. When a connection interruption or packet corruption is detected, the breakpoint retransmission mechanism is activated. The retransmission strategy is based on the classification of data importance. Critical data such as voltage and current are preferentially retransmitted. Fault markers are set for the retransmitted and recovered data, recording the fault type and occurrence time. Finally, the main control chip classifies and processes the data according to the data type, configures the corresponding driver programs and communication protocols, and conducts data transmission efficiency tests. The test content includes performance indicators such as transmission delay and packet loss rate. Ultimately, complete system operation data is integrated. For example, during a certain operation, when the light intensity is 850 W / m2, the system operates in the normal working mode. Data such as input voltage 34.01 V, input current 5.27 A, output voltage 41.19 V, and output current 4.21 A are transmitted to the monitoring terminal via Bluetooth. The transmission delay is less than 100 ms, and the packet loss rate is lower than 0.1%, fully demonstrating the reliability and real-time performance of this communication method.

[0029] In the embodiment of the present application, by performing real-time sampling and processing on the input and output data of the photovoltaic module, an initial data packet containing a timestamp, voltage value, current value, power value, and status code is obtained, realizing a comprehensive monitoring of the working state of the photovoltaic module and providing a complete data basis for subsequent data analysis and processing; adopting a Bluetooth service characteristic value allocation and processing mechanism, through the design of the main service identifier and multiple characteristic value identifiers, the data transmission has a clear hierarchical structure, enhancing the orderliness and manageability of data transmission; introducing a light intensity threshold classification and processing mechanism, automatically switching between the normal mode, low-power mode, and ultra-low-power mode according to the change of light intensity, significantly reducing the overall power consumption of the system while ensuring the normal operation of the system; adopting the Advanced Encryption Standard algorithm and dynamic key processing scheme to encrypt the working mode data and generate an encrypted security data packet, effectively preventing the data from being illegally stolen and tampered with; through connection status monitoring and packet integrity check processing, realizing real-time monitoring of communication quality and ensuring the reliability and integrity of data transmission; finally, through the main control chip and wireless communication module interface integration processing mechanism, realizing the efficient configuration of hardware resources and the unified management of system operation data, making the entire communication system have good scalability and maintainability.

[0030] In a specific embodiment, the process of executing step S101 may specifically include the following steps:

[0031] (1) Perform high-precision analog-to-digital conversion processing on the input voltage, input current, output voltage, and output current of the photovoltaic module to obtain the sampling time and sampling data;

[0032] (2) Perform 12-bit quantization processing on the sampling time and sampling data through a digital power control chip to obtain the quantized data containing a timestamp;

[0033] (3) Calculate the voltage value and current value from the quantized data with timestamps to obtain voltage data and current data;

[0034] (4) Perform power calculation and status code generation processing based on the voltage data and current data to obtain a power value and a status code;

[0035] (5) Package the timestamp, voltage value, current value, power value, and status code to obtain an initial data packet.

[0036] Specifically, the INA210 shunt monitor of the high-precision analog-to-digital converter TI is used to collect the operating data of the photovoltaic module. The input voltage sampling range is 0 - 60V, the input current sampling range is 0 - 20A, the sampling frequency is set to 100Hz, and the input and output voltages and currents are synchronously collected. Each group of sampling data has time information accurate to the millisecond level. Then, the STM32F334 digital power control chip is used to perform 12-bit quantization processing on the sampling data, and the quantization accuracy is 4096 levels. The voltage sampling converts the 0 - 60V input signal into a 0 - 3V sampling signal through a voltage-dividing resistor network. After 12-bit ADC conversion, a digital quantity of 0 - 4095 is obtained, and the timestamp information is synchronously quantized into 12-bit data. Taking the input voltage of 34.01V as an example, first, a 1.7V sampling signal is obtained through a 20:1 voltage division, and then a digital quantity of 2275 is obtained through 12-bit ADC conversion.

[0037] The quantized data is converted back to the actual voltage value and current value through look-up table conversion. The voltage value is calculated using the voltage division ratio. The input voltage value is equal to the digital quantity multiplied by the range coefficient (60 / 4095). The current value is calculated through the shunt resistor. The current value is equal to the shunt voltage divided by the shunt resistance value (1.5mΩ). For the input voltage of 34.01V, the calculation of converting its digital quantity 2275 back to the actual voltage value is: 2275×(60 / 4095) = 33.334V, considering that the measurement error is within the design index of 0.5%. Calculate the real-time power based on the voltage and current data, and at the same time generate a status code reflecting the working state of the device. The power calculation uses the formula P = U×I. The status code contains 8 bits of data, respectively indicating the MPPT working state (2 bits), communication state (2 bits), fault state (2 bits), and reserved bits (2 bits). Taking the input voltage of 34.01V and input current of 5.27A as an example, the calculated input power is 179.23W. If the MPPT is working properly, the communication is normal, and there is no fault at this time, the status code is 00000000.

[0038] Finally, the timestamp (8 bytes), voltage values (4 bytes × 2), current values (4 bytes × 2), power value (4 bytes), and status code (1 byte) are packed in a predetermined format to generate an initial data packet of 29 bytes. The data packet is stored in big-endian mode and a 2-byte CRC checksum is added to ensure the accuracy of data transmission. Through this standardized data processing flow, the acquisition accuracy and reliability of the operating data of the photovoltaic module are ensured.

[0039] In a specific embodiment, the process of executing step S102 may specifically include the following steps:

[0040] (1) Perform service identifier generation processing on the initial data packet to obtain a primary service identifier;

[0041] (2) Perform eigenvalue partitioning processing on the primary service identifier to obtain a real-time data eigenvalue identifier, a historical data eigenvalue identifier, a configuration parameter eigenvalue identifier, a control command eigenvalue identifier, and a firmware upgrade eigenvalue identifier;

[0042] (3) Perform setting processing on the data transmission attributes according to the eigenvalue identifier to obtain a data transmission attribute configuration;

[0043] (4) Perform data packet splitting processing on the data transmission attribute configuration to obtain standard transmission unit data;

[0044] (5) Perform checksum generation and encapsulation processing on the standard transmission unit data to obtain a Bluetooth communication data packet with a primary service identifier and multiple eigenvalue identifiers.

[0045] Specifically, first, the primary service identifier is defined based on the BLE 5.0 protocol, and unique identification codes are used to distinguish different photovoltaic optimizer devices. The format of the primary service identifier is a 16-bit digital identifier, and the range of the identification code is FFF0-FFFF. Each photovoltaic optimizer device is assigned a unique primary service identifier. Based on the primary service identifier, eigenvalue partitioning is performed, and corresponding eigenvalue identifiers are assigned for different types of data. The real-time data eigenvalue identifier is FFF1, which is used to transmit current voltage, current, power, etc. data; the historical data eigenvalue identifier is FFF2, which stores historical operation data within 24 hours; the configuration parameter eigenvalue identifier is FFF3, which contains configuration information such as MPPT parameters and communication parameters; the control command eigenvalue identifier is FFF4, which is used for remote control and debugging; the firmware upgrade eigenvalue identifier is FFF5, which is responsible for the online update of the device firmware.

[0046] Set the corresponding data transmission attributes according to the eigenvalue identifier. Real-time data adopts the notification and write attributes, and the maximum transmission unit is 247 bytes; historical data has read and write attributes, and the maximum transmission unit is also 247 bytes; configuration parameters and control commands adopt read and write attributes, and the maximum transmission unit is limited to 20 bytes; firmware upgrade data has write and notification attributes, and the maximum transmission unit is 247 bytes. Each data type is set with an independent transmission priority, and real-time data has the highest priority. During the packet segmentation process, the data is segmented according to the maximum transmission unit size. Taking real-time data as an example, when the data volume exceeds 247 bytes, the data is divided into multiple standard transmission units, each unit containing 1-byte packet header (fixed as 0xAA), 1-byte packet type, 2-byte data length, N-byte valid data, 2-byte CRC check code, and 1-byte packet tail (fixed as 0x55). The segmented data packets are transmitted in a preset order to ensure data integrity.

[0047] Finally, generate the check code and encapsulate the standard transmission unit data. The check code uses the CRC-16 algorithm to perform check calculations on all data in the data packet except the packet header and tail. The complete Bluetooth communication data packet structure includes: device main service identifier, eigenvalue identifier, transmission attribute configuration information, data content, and check code. Each data packet is accompanied by a unique sequence number for sequence management and retransmission control of the data packet. In practical applications, when a group of real-time data containing 29-byte initial data packets needs to be transmitted, 7-byte packet headers and tails and check information will be automatically added to form a 36-byte standard Bluetooth communication data packet, which is transmitted to the monitoring terminal through the low-power Bluetooth channel.

[0048] In a specific embodiment, the process of executing step S103 may specifically include the following steps:

[0049] (1) Perform threshold classification processing on the light intensity data to obtain light intensity classification data;

[0050] (2) Adjust the data sampling period according to the light intensity classification data to obtain sampling period data;

[0051] (3) Configure the broadcast interval for the sampling period data to obtain broadcast timing data;

[0052] (4) Determine the data caching strategy according to the broadcast timing data to obtain cache configuration data;

[0053] (5) Match the cache configuration data with the working mode to obtain working mode data including normal mode, low-power mode, and ultra-low-power mode.

[0054] Specifically, a high-precision illuminance sensor is used to collect the illuminance intensity, and the data collection range is 0 - 1200 W / m2. Two key threshold points are set for different illuminance intensities: 800 W / m2 and 200 W / m2. When the illuminance intensity is greater than 800 W / m2, it is marked as the high illuminance level; when the illuminance intensity is between 200 - 800 W / m2, it is marked as the medium illuminance level; when the illuminance intensity is less than 200 W / m2, it is marked as the low illuminance level. The data sampling period is dynamically adjusted according to the illuminance intensity classification data. In the high illuminance level, a 1-second sampling period is adopted to ensure real-time monitoring of the working state of the photovoltaic module; in the medium illuminance level, the sampling period is extended to 10 seconds to reduce the data collection frequency; in the low illuminance level, the sampling period is further extended to 60 seconds. The sampling period data records the current sampling frequency and includes the time interval information between two adjacent samplings.

[0055] The sampling period data determines the configuration of the Bluetooth broadcast timing. The high illuminance level corresponds to a 100-millisecond broadcast interval, and data broadcasting is triggered every 10 sampling points; the medium illuminance level uses a 1-second broadcast interval, and data broadcasting is triggered for each sampling; the low illuminance level sets a 10-second broadcast interval, and data is broadcast once after accumulating 6 sampling data. The broadcast timing data includes the broadcast interval time, the number of data packets, and the transmission time point information. The broadcast timing directly affects the configuration of the data caching strategy. In the high illuminance level, a 4MB circular buffer is set to store the sampling data in real time; in the medium illuminance level, the buffer capacity is reduced to 2MB, and the data is stored in packets; in the low illuminance level, the buffer is reduced to 1MB, and only key data points are retained. The cache configuration data records the buffer size, the data storage method, and the cleaning strategy.

[0056] Finally, the working mode is automatically matched according to the cache configuration. In the normal mode, all hardware is in the working state, and the power consumption is about 100 mW, which is suitable for the high illuminance level; in the low power consumption mode, some peripherals enter the sleep state, and the power consumption is reduced to 50 mW, which is suitable for the medium illuminance level; in the ultra-low power consumption mode, only the core module remains working, and the power consumption is reduced to 10 mW, which is suitable for the low illuminance level. The working mode data includes the power consumption level, the hardware state, and the mode switching conditions, realizing the dynamic matching of the power consumption of the photovoltaic optimizer and the working environment. When the illuminance intensity drops from 900 W / m2 to 150 W / m2, the system automatically switches from the normal mode to the ultra-low power consumption mode, the sampling period is extended from 1 second to 60 seconds, the broadcast interval is increased from 100 milliseconds to 10 seconds, and the system power consumption is reduced from 100 mW to 10 mW, effectively extending the working time of the device.

[0057] In a specific embodiment, the process of executing step S104 may specifically include the following steps:

[0058] (1) Extract the device serial number from the working mode data to obtain the identity authentication key;

[0059] (2) Perform two-way authentication processing based on the identity authentication key to obtain authentication result data;

[0060] (3) Perform dynamic key generation processing on the authentication result data to obtain an encryption key;

[0061] (4) Perform Advanced Encryption Standard (AES) algorithm processing on the data according to the encryption key to obtain encrypted data;

[0062] (5) Perform serial number marking and timestamp encapsulation processing on the encrypted data to obtain an encrypted secure data packet.

[0063] Specifically, extract a 32-bit device serial number from the working mode data. The serial number consists of a 16-bit manufacturer code and a 16-bit device number. Convert the device serial number through a hash algorithm to generate a 128-bit identity authentication key. The identity authentication key is divided into two parts: the first 64 bits are used for device authentication, and the last 64 bits are used for data encryption. The two-way authentication process adopts a challenge-response mechanism. The monitoring terminal first sends a 32-bit random challenge code. The photovoltaic optimizer encrypts the challenge code using the first 64 bits of the identity authentication key and generates a response code to return to the monitoring terminal. After the monitoring terminal verifies the correctness of the response code, it sends a new 32-bit random code, and the photovoltaic optimizer verifies the identity of the monitoring terminal. After the two-way authentication is completed, authentication result data is generated, including an authentication status code, a session identifier, and timestamp information.

[0064] Generate a dynamic encryption key based on the authentication result data. First, perform an exclusive OR operation on the session identifier in the authentication result data and the last 64 bits of the identity authentication key to obtain a base key. Then, periodically update the base key according to the timestamp, once every hour. The update algorithm adopts a key expansion mechanism to expand the 128-bit base key into a 192-bit encryption key. Use the Advanced Encryption Standard algorithm to encrypt the data. The encryption process is divided into the following steps: divide the data into 128-bit groups, and pad the insufficient part; perform 10 rounds of iterative encryption on the data block using the encryption key; each round of encryption includes byte substitution, row shift, column confusion, and round key addition operations. The length of the encrypted data remains the same as the original, but the content has been completely scrambled and cannot be restored even if intercepted.

[0065] Finally, a security tag is added to the encrypted data. An 8-byte device serial number is added to the packet header for the receiving end to identify the data source; an 8-byte timestamp is added to the packet tail to prevent replay attacks. The complete structure of the secure packet is: serial number (8 bytes) + encrypted data (N bytes) + timestamp (8 bytes). For example, a secure packet containing 100 bytes of working mode data has a final length of 116 bytes, including 8 bytes of serial number, 100 bytes of encrypted data, and 8 bytes of timestamp. The encrypted data is processed using the Advanced Encryption Standard algorithm with a dynamically updated 192-bit key, ensuring the security of data transmission.

[0066] In a specific embodiment, the process of executing step S105 may specifically include the following steps:

[0067] (1) Perform connection status monitoring processing on the encrypted secure packet to obtain connection status data;

[0068] (2) Perform packet integrity verification processing based on the connection status data to obtain an integrity verification result;

[0069] (3) Perform breakpoint retransmission judgment processing on the integrity verification result to obtain retransmission policy data;

[0070] (4) Perform data recovery processing based on the retransmission policy data to obtain recovery data;

[0071] (5) Perform fault marking processing on the recovery data to obtain fault detection data.

[0072] Specifically, the connection status monitoring adopts a timing check mechanism, which detects the Bluetooth connection status every 100 milliseconds and records the signal strength, connection delay, and data throughput. The connection status data includes three key indicators: a signal strength threshold of -80dBm, a connection delay threshold of 100 milliseconds, and a data throughput threshold of 1Mbps. When any of the indicators exceeds the threshold, it is marked as an abnormal connection state. The packet integrity verification adopts a hierarchical check strategy. First, check the continuity of the serial number in the packet header, and the serial number must increase strictly; then verify the validity of the timestamp at the packet tail, and the timestamp deviation shall not exceed 1 second; finally, check the checksum of the data content. The integrity verification result includes three parts: the serial number verification status, the timestamp verification status, and the content verification status. When it is found that the packet is missing or damaged, record the specific error type and location.

[0073] Breakpoint retransmission judgment is based on data priority classification. The priority of key data such as voltage and current is level 1, the priority of power calculation data is level 2, and the priority of status information is level 3. The retransmission policy data includes three parameters: the limit of retransmission times, the retransmission time window, and the retransmission interval. Level 1 data can be retransmitted at most 3 times, the retransmission time window is 1 second, and the retransmission interval is 100 milliseconds; level 2 data can be retransmitted at most 2 times, the retransmission time window is 2 seconds, and the retransmission interval is 200 milliseconds; level 3 data can be retransmitted at most 1 time, the retransmission time window is 5 seconds, and the retransmission interval is 500 milliseconds. The data recovery process adopts a segmented restoration method. For continuous data such as voltage curves, an interpolation algorithm is used to fill in the missing points; for discrete data such as status codes, the previous value retention method is used for processing. The data source is marked in the restored data, with the original data marked as 0, the interpolated data marked as 1, and the retained data marked as 2. For example, when 5 out of 100 sampling points are missing, the values of these 5 points are calculated by the interpolation algorithm, and the data source of these points is marked as interpolated data in the restored data.

[0074] Fault marking processing adopts multi-dimensional classification. The fault types are divided into three categories: communication faults, data faults, and processing faults, and specific fault codes are set for each type of fault. Communication faults include connection interruption, weak signal, delay overrun, etc.; data faults include data loss, checksum error, format error, etc.; processing faults include recovery failure, retransmission overrun, buffer overflow, etc. The fault detection data records the fault occurrence time, fault type, fault location, and processing result. When it is detected that the data transmission of the output voltage of the photovoltaic module is interrupted, the system records the fault time point, marks it as a communication fault, the fault code is 0x01 (connection interruption), and records the retransmission processing result to form a complete fault detection record.

[0075] In a specific embodiment, the process of executing step S106 may specifically include the following steps:

[0076] (1) Perform data stream classification processing on the fault detection data to obtain interface allocation data;

[0077] (2) Perform driver configuration processing according to the interface allocation data to obtain driver configuration data;

[0078] (3) Perform communication protocol adaptation processing on the driver configuration data to obtain protocol matching data;

[0079] (4) Perform data transmission efficiency test processing according to the protocol matching data to obtain transmission performance data;

[0080] (5) Perform system state integration processing on the transmission performance data to obtain system operation data.

[0081] Specifically, the data stream classification process shunts data based on the attributes of the fault detection data, dividing the data into control data streams, status data streams, and alarm data streams. The control data stream contains MPPT control instructions and parameter configuration instructions; the status data stream contains operating parameters such as voltage, current, and power; the alarm data stream contains fault information and early warning information. In the interface allocation data, independent communication interfaces are configured for each type of data stream. The control data stream uses a real-time interface, the status data stream uses a periodic interface, and the alarm data stream uses an interrupt interface. In the driver configuration process, corresponding driver parameters are set for different communication interfaces. The real-time interface is configured with an interrupt mode, the interrupt priority is set to the highest, and the response time is less than 1 millisecond; the periodic interface is configured with a polling mode, and the polling interval is 10 milliseconds; the interrupt interface is configured with a semi-interrupt mode, adopting a mechanism of interrupt triggering and polling processing. The driver configuration data contains parameters such as the interface working mode, data buffer size, and timeout time. The real-time interface is configured with a 4KB buffer, the periodic interface is configured with a 16KB buffer, and the interrupt interface is configured with an 8KB buffer.

[0082] The communication protocol adaptation adopts a hierarchical processing strategy. At the physical layer, low-power Bluetooth communication parameters are configured, including transmit power, receive sensitivity, antenna gain, etc.; at the link layer, the data frame format is configured, including frame header, frame tail, check method, etc.; at the application layer, data parsing rules are configured, including data identification, parsing method, processing flow, etc. The protocol matching data records the configuration parameters of each layer and their corresponding relationships. The transmit power is set to 0dBm, the receive sensitivity is -90dBm, the data frame adopts a variable-length format, and the maximum frame length is 256 bytes. The data transmission efficiency test includes the measurement of multiple performance indicators. The transmission delay test adopts a loopback method, sending test data packets and recording the reception time, and calculating the end-to-end transmission delay; the data throughput test measures the amount of data successfully transmitted per unit time by continuously sending a large amount of data; the link quality test evaluates the communication quality by detecting parameters such as bit error rate and retransmission rate. The transmission performance data records the test results, including indicators such as the maximum transmission delay, average throughput, and packet loss rate. Under standard test conditions, the end-to-end transmission delay is less than 50 milliseconds, the data throughput reaches 1Mbps, and the packet loss rate is lower than 0.1%.

[0083] The system status integration manages various performance indicators uniformly. For the normal working state, information such as the current working mode, transmission performance, and resource occupancy is recorded; for the abnormal state, information such as the fault type, fault level, and handling measures is recorded. The system operation data adopts a hierarchical storage strategy, with key status data updated in real time, general status data updated periodically, and historical status data archived regularly. For example, when the system detects a decline in communication quality, it records that the current transmission delay increases to 80 milliseconds, the throughput drops to 500Kbps, automatically switches to the backup channel and starts the link quality optimization program, and the state changes during the entire processing process are recorded in the system operation data.

[0084] The wireless low-power Bluetooth communication method of the PV optimizer in the embodiments of the present application has been described above. Next, the wireless low-power Bluetooth communication device of the PV optimizer in the embodiments of the present application will be described. Please refer to Figure 2 , an embodiment of the wireless low-power Bluetooth communication device of the PV optimizer in the embodiments of the present application includes:

[0085] An acquisition module 201, configured to perform real-time sampling processing on the input and output data of the PV module to obtain an initial data packet including a timestamp, a voltage value, a current value, a power value, and a status code;

[0086] An allocation module 202, configured to perform Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a primary service identifier and multiple characteristic value identifiers;

[0087] A grading module 203, configured to perform grading processing on the Bluetooth communication data packet through a light intensity threshold to obtain working mode data including a normal mode, a low-power mode, and an ultra-low-power mode;

[0088] A processing module 204, configured to perform processing on the working mode data through the Advanced Encryption Standard algorithm and a dynamic key to obtain an encrypted security data packet;

[0089] An inspection module 205, configured to perform connection status monitoring and data packet integrity inspection processing on the encrypted security data packet to obtain fault detection data;

[0090] An integration module 206, configured to perform integration processing on the fault detection data through an interface between a main control chip and a wireless communication module to obtain system operation data.

[0091] Through the collaborative cooperation of the above-mentioned various components, by performing real-time sampling and processing on the input and output data of the photovoltaic module, an initial data packet containing a timestamp, voltage value, current value, power value, and status code is obtained, realizing the comprehensive monitoring of the working state of the photovoltaic module and providing a complete data basis for subsequent data analysis and processing; adopting a Bluetooth service characteristic value allocation and processing mechanism, through the design of a primary service identifier and multiple characteristic value identifiers, the data transmission has a clear hierarchical structure, improving the orderliness and manageability of data transmission; introducing a light intensity threshold grading and processing mechanism, automatically switching between the normal mode, low-power mode, and ultra-low-power mode according to the change of light intensity, significantly reducing the overall power consumption of the system while ensuring the normal operation of the system; adopting the Advanced Encryption Standard algorithm and a dynamic key processing scheme to encrypt the working mode data and generate an encrypted secure data packet, effectively preventing the data from being illegally stolen and tampered with; through connection status monitoring and data packet integrity check processing, the real-time monitoring of communication quality is realized, ensuring the reliability and integrity of data transmission; finally, through the main control chip and wireless communication module interface integration processing mechanism, the efficient configuration of hardware resources and the unified management of system operation data are realized, making the entire communication system have good scalability and maintainability.

[0092] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A wireless low-power Bluetooth communication method for a photovoltaic optimizer, characterized in that, The wireless low-power Bluetooth communication method of the photovoltaic optimizer includes: Performing real-time sampling processing on the input and output data of the photovoltaic module to obtain an initial data packet containing a timestamp, voltage value, current value, power value, and status code; Performing Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a primary service identifier and multiple characteristic value identifiers; Performing hierarchical processing on the Bluetooth communication data packet through a light intensity threshold to obtain operating mode data including a normal mode, a low-power mode, and an ultra-low-power mode; Performing processing on the operating mode data through the Advanced Encryption Standard algorithm and a dynamic key to obtain an encrypted secure data packet; Performing connection status monitoring and data packet integrity check processing on the encrypted secure data packet to obtain fault detection data; Performing integration processing on the fault detection data through the interface of the main control chip and the wireless communication module to obtain system operation data.

2. The wireless low-power Bluetooth communication method of the photovoltaic optimizer according to claim 1, characterized in that, The performing real-time sampling processing on the input and output data of the photovoltaic module to obtain an initial data packet containing a timestamp, voltage value, current value, power value, and status code includes: Performing high-precision analog-to-digital conversion processing on the input voltage, input current, output voltage, and output current of the photovoltaic module to obtain a sampling time and sampling data; Performing 12-bit quantization processing on the sampling time and sampling data through a digital power control chip to obtain quantized data containing a timestamp; Performing voltage value and current value calculation processing on the quantized data containing a timestamp to obtain voltage data and current data; Performing power calculation and status code generation processing according to the voltage data and current data to obtain a power value and a status code; Performing data packet processing on the timestamp, voltage value, current value, power value, and status code to obtain an initial data packet.

3. The wireless low-power Bluetooth communication method of the photovoltaic optimizer according to claim 1, wherein The performing Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a primary service identifier and multiple characteristic value identifiers includes: Performing service identifier generation processing on the initial data packet to obtain a primary service identifier; Performing characteristic value division processing on the primary service identifier to obtain a real-time data characteristic value identifier, a historical data characteristic value identifier, a configuration parameter characteristic value identifier, a control command characteristic value identifier, and a firmware upgrade characteristic value identifier; Performing setting processing on the data transmission attribute according to the characteristic value identifier to obtain a data transmission attribute configuration; Performing data packet segmentation processing on the data transmission attribute configuration to obtain standard transmission unit data; Performing checksum generation and encapsulation processing on the standard transmission unit data to obtain a Bluetooth communication data packet with a primary service identifier and multiple characteristic value identifiers.

4. The wireless low-power Bluetooth communication method of the photovoltaic optimizer according to claim 1, characterized in that, The performing hierarchical processing on the Bluetooth communication data packet through a light intensity threshold to obtain operating mode data including a normal mode, a low-power mode, and an ultra-low-power mode includes: Performing threshold hierarchical processing on the light intensity data to obtain light intensity hierarchical data; Performing adjustment processing on the data sampling period according to the light intensity hierarchical data to obtain sampling period data; Performing broadcast interval configuration processing on the sampling period data to obtain broadcast timing data; Determine and process the data caching policy according to the broadcast timing data to obtain cache configuration data; Perform a working mode matching process on the cache configuration data to obtain working mode data including normal mode, low power mode, and ultra-low power mode.

5. The wireless low-power Bluetooth communication method of the photovoltaic optimizer according to claim 1, characterized in that, The processing of the working mode data through the Advanced Encryption Standard algorithm and dynamic key to obtain an encrypted security data packet includes: Extract the device serial number from the working mode data to obtain an identity authentication key; Perform two-way authentication processing according to the identity authentication key to obtain authentication result data; Perform dynamic key generation processing on the authentication result data to obtain an encryption key; Perform Advanced Encryption Standard algorithm processing on the data according to the encryption key to obtain encrypted data; Perform serial number marking and timestamp encapsulation processing on the encrypted data to obtain an encrypted security data packet.

6. The wireless low-power Bluetooth communication method of the photovoltaic optimizer according to claim 1, characterized in that, The processing of the encrypted security data packet through connection status monitoring and data packet integrity check to obtain fault detection data includes: Monitor the connection status of the encrypted security data packet to obtain connection status data; Perform data packet integrity verification processing according to the connection status data to obtain an integrity verification result; Perform breakpoint retransmission judgment processing on the integrity verification result to obtain retransmission policy data; Perform data recovery processing according to the retransmission policy data to obtain recovery data; Perform fault marking processing on the recovery data to obtain fault detection data.

7. The wireless low-power Bluetooth communication method of the photovoltaic optimizer according to claim 1, characterized in that The processing of the fault detection data through the integration of the main control chip and the wireless communication module interface to obtain system operation data includes: Classify the data flow of the fault detection data to obtain interface allocation data; Perform driver configuration processing according to the interface allocation data to obtain driver configuration data; Perform communication protocol adaptation processing on the driver configuration data to obtain protocol matching data; Perform data transmission efficiency test processing according to the protocol matching data to obtain transmission performance data; Perform system state integration processing on the transmission performance data to obtain system operation data.

8. A wireless low-power Bluetooth communication device for a photovoltaic optimizer, which is used to implement the wireless low-power Bluetooth communication method of the photovoltaic optimizer according to any one of claims 1-7, characterized in that, The wireless low-power Bluetooth communication device of the photovoltaic optimizer includes: An acquisition module for performing real-time sampling processing on the input and output data of the photovoltaic module to obtain an initial data packet including a timestamp, voltage value, current value, power value, and status code; An allocation module for performing Bluetooth service characteristic value allocation processing on the initial data packet to obtain a Bluetooth communication data packet with a main service identifier and multiple characteristic value identifiers; A grading module for grading the Bluetooth communication data packet through a light intensity threshold to obtain working mode data including normal mode, low power mode, and ultra-low power mode; A processing module for processing the working mode data through the Advanced Encryption Standard algorithm and dynamic key to obtain an encrypted security data packet; An inspection module for performing connection status monitoring and data packet integrity check processing on the encrypted security data packet to obtain fault detection data; An integration module for integrating the fault detection data through the interface of the main control chip and the wireless communication module to obtain system operation data.