Solar street lamp intelligent control system and charging and discharging control method thereof

By performing time-series segment clustering and dynamic pattern matching on historical operating data of solar streetlights, compensatory adjustment instructions are generated, solving the problem that the control strategy in the existing technology cannot adapt to complex environmental changes, and achieving precise charging and discharging control.

CN122068601APending Publication Date: 2026-05-19ZHONGSHAN CITY SUNDE LIGHTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGSHAN CITY SUNDE LIGHTING CO LTD
Filing Date
2026-03-03
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing charging and discharging control methods for solar streetlights cannot accurately respond to complex and time-varying system operating states, resulting in poor control performance. In particular, when lighting conditions fluctuate frequently or abnormally, it is difficult to conduct effective state assessment and decision correction.

Method used

By clustering time-series segments of historical operation datasets, a set of typical operation mode segments and their feature vectors are extracted. Dynamic pattern matching is performed in real time to generate compensatory adjustment instructions, ensuring that the control strategy matches the actual dynamic process.

Benefits of technology

It achieves precise control of the solar street light system, enhances the adaptability to complex environmental changes, and improves the control system's ability to cope with real-time disturbances and state drift.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122068601A_ABST
    Figure CN122068601A_ABST
Patent Text Reader

Abstract

The invention discloses a solar street lamp intelligent control system and a charging and discharging control method thereof, and relates to the technical field of solar street lamp control, and the method comprises the steps: obtaining a historical operation data set and a real-time operation flow; performing time sequence fragment clustering on the historical data to form a plurality of typical operation mode fragment sets and extracting feature vectors; performing dynamic mode matching on the real-time stream and the feature vector, and determining a current typical operation mode; searching historical time period data in the matching mode, and taking the historical time period data as a reference moving track; calculating the deviation and accumulative error between the real-time stream and the reference trajectory, and generating a system operation state offset degree; and according to the offset degree, generating a compensatory adjustment instruction set on the basis of the charging and discharging sequence of the reference trajectory. According to the method, the real-time operation mode of the system can be automatically identified, and dynamic tracking and compensation control are performed based on historical similar trajectories, so that the adaptability and the operation stability of the system to different environmental conditions are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of solar street light control technology, specifically a solar street light intelligent control system and its charging and discharging control method. Background Technology

[0002] Existing solar street light charging and discharging control methods mostly employ logic based on fixed thresholds or rule-based strategies based on historical statistical values. These methods trigger charging and discharging actions by comparing real-time collected parameters such as light intensity and battery voltage with preset threshold values. Their drawback lies in the fact that the control logic is static and discrete, unable to accurately describe and respond to the complex, time-varying system operating state caused by continuous changes in actual weather conditions. There is a lack of correlation between control commands and the dynamic evolution of the environment and the internal state of the system, which can easily lead to poor control performance when light conditions fluctuate frequently or remain abnormal.

[0003] Some methods that optimize using historical data typically perform global statistical analysis on the entire historical dataset. This approach mixes operational data under different weather conditions, obscuring the inherent temporal stages and patterned regularities of the operational process. Its drawback is that the generated reference trajectory loses its representativeness for specific operational scenarios, failing to provide a time-specific benchmark for real-time control. When the system deviates from its normal operation, effective state assessment and decision correction become difficult.

[0004] A method is needed to automatically identify operational pattern segments with different characteristics from historical data and establish a precise mapping between real-time status and historical segments. Based on the matched specific historical operational trajectories, it is also needed to quantify real-time operational deviations and generate compensation commands, thereby achieving intelligent control that more closely matches the actual dynamic process. Summary of the Invention

[0005] This invention aims to solve at least one of the technical problems existing in the prior art;

[0006] Therefore, this invention proposes an intelligent control system for solar streetlights and its charging and discharging control method, comprising:

[0007] Obtain the historical operation dataset and its real-time operation stream of the target solar street light system. The historical operation dataset includes multi-day photovoltaic module power generation sequences, energy storage battery charge and discharge sequences, and ambient light sequences.

[0008] The historical running dataset is subjected to time-series segment clustering to form multiple sets of typical running pattern segments with similar running characteristics, and the feature vector of each typical running pattern segment set is extracted.

[0009] Based on the feature vectors of the real-time operation stream and the set of typical operation mode segments, dynamic pattern matching calculation is performed to determine the typical operation mode to which the real-time operation stream currently belongs.

[0010] The historical operation data set is used to retrieve the historical operation segments that match the current typical operation mode, and the photovoltaic module power generation sequence, energy storage battery charging and discharging sequence and ambient light sequence for the corresponding time period are obtained as reference operation trajectories.

[0011] The real-time operation flow and the reference operation trajectory are subjected to point-by-point deviation analysis and cumulative error calculation to generate the system operation state offset.

[0012] Based on the system operating state offset, and on the basis of the reference operating trajectory, a set of compensatory adjustment instructions for the charging and discharging sequence of the energy storage battery is generated.

[0013] Furthermore, the historical runtime dataset is subjected to time-series segment clustering to form multiple sets of typical runtime pattern segments with similar runtime characteristics, and the feature vector of each typical runtime pattern segment set is extracted, including:

[0014] On the timeline of the historical running dataset, continuous segments of running data are extracted using a sliding window of fixed length;

[0015] For each running data segment, calculate the trend of the photovoltaic module power generation sequence, the statistical characteristics of the energy storage battery charge and discharge sequence, and the periodicity of the ambient light sequence. Combine the calculation results of the trend, statistical characteristics, and periodicity as the description vector of the running data segment.

[0016] Unsupervised clustering is performed on the description vectors of all running data segments to group running data segments whose description vectors are close in position in the feature space into the same category. Each category forms a preliminary set of typical running pattern segments.

[0017] Align, overlay, and average all running data segments within each preliminary set of typical running mode segments to generate standard mode segments for the set of typical running mode segments;

[0018] Key features are extracted from the standard pattern fragments to form a feature vector representing the set of typical operating pattern fragments.

[0019] Furthermore, based on the feature vectors of the real-time runtime stream and the set of typical runtime mode segments, dynamic pattern matching calculation is performed to determine the typical runtime mode to which the real-time runtime stream currently belongs, including:

[0020] Within a preset matching time window, the latest portion of the real-time running stream is extracted to form a real-time segment to be matched;

[0021] Calculate the description vector of the real-time segment to be matched, and the calculation method of the description vector is consistent with the calculation method of the description vector of the historical running data segment;

[0022] Calculate the distance between the description vector of the real-time segment to be matched and the feature vector of each typical running mode segment set;

[0023] Select the feature vector of the typical running mode segment set that has the smallest distance to the description vector of the real-time segment to be matched, and the typical running mode corresponding to it is determined to be the typical running mode to which the real-time running stream currently belongs.

[0024] As time progresses, the matching time window is slid, and the interception, calculation, and judgment steps are repeated to achieve dynamic updates of the typical operating mode to which the real-time running stream belongs.

[0025] Furthermore, historical operating periods matching the current typical operating mode are retrieved from the historical operating dataset, and the corresponding photovoltaic module power generation sequence, energy storage battery charge / discharge sequence, and ambient light sequence are obtained as reference operating trajectories, including:

[0026] In the historical operation dataset, locate all historical operation data segments that belong to the current typical operation mode, and record the start and end times of the historical operation data segments on the historical timeline;

[0027] Based on the current moment of the real-time running stream, search for historical moments on the historical timeline that have the same date type and similar time points as the current moment;

[0028] From the located historical operation data segments, segments covering the historical moment are selected, and the complete photovoltaic module power generation sequence, energy storage battery charging and discharging sequence, and ambient light sequence corresponding to the segment are extracted.

[0029] The extracted photovoltaic module power generation sequence, energy storage battery charging and discharging sequence, and ambient light sequence are arranged according to the time starting point aligned with the current real-time operation flow to form the reference operation trajectory.

[0030] Furthermore, point-by-point deviation analysis and cumulative error calculation are performed between the real-time operation stream and the reference operation trajectory to generate system operation state offset, including:

[0031] A point-to-point difference calculation is performed between the real-time operation stream and the photovoltaic module power generation sequence in the reference operation trajectory to generate a photovoltaic power generation instantaneous deviation sequence.

[0032] Point-to-point difference calculation is performed between the real-time operation stream and the energy storage battery charging and discharging sequence in the reference operation trajectory to generate a battery charging and discharging instantaneous deviation sequence.

[0033] Calculate the average absolute deviation and cumulative squared deviation of the instantaneous deviation sequence of photovoltaic power generation within a preset evaluation window;

[0034] Calculate the average absolute deviation and cumulative squared deviation of the instantaneous charge and discharge deviation sequence of the battery within the preset evaluation window;

[0035] The average absolute deviation and cumulative squared deviation of photovoltaic power generation and battery charging and discharging are weighted and fused according to a preset weighting coefficient, and the resulting fused value is used as the system operating state offset.

[0036] Furthermore, based on the system operating state offset, and on the basis of the reference operating trajectory, a set of compensatory adjustment instructions for the energy storage battery charging and discharging sequence is generated, including:

[0037] Set an offset threshold range, which includes a normal offset range, a warning offset range, and an abnormal offset range;

[0038] Determine which offset threshold range the system's operating state offset falls into;

[0039] If the system operating state offset falls within the normal offset range, then the planned charging and discharging sequence in the reference operating trajectory is used as the target to generate a fine-tuning instruction to maintain the current operating state.

[0040] If the system operating status deviation falls into the warning deviation range, then based on the planned charging and discharging sequence in the reference operating trajectory, a set of pre-compensation adjustment instructions for charging and discharging power and time is generated according to the trend of the photovoltaic power generation instantaneous deviation sequence.

[0041] If the system operating status offset falls into the abnormal offset range, the emergency operation mode is activated. Based on the latest status of the real-time operation stream and the preset safe charging and discharging rules, a set of strong compensation adjustment instructions to ensure the safe operation of the system is generated.

[0042] Furthermore, if the system operating state deviation falls within the warning deviation range, then based on the planned charging and discharging sequence in the reference operating trajectory, and according to the trend of the instantaneous deviation sequence of photovoltaic power generation, a set of pre-compensation adjustment instructions for charging and discharging power and time is generated, including:

[0043] Analyze the slope of the instantaneous deviation sequence of photovoltaic power generation in the most recent period to predict the trend of photovoltaic power generation deviation in the near future.

[0044] Based on the photovoltaic power generation deviation trend, calculate the amount of charging and discharging power compensation required to maintain the state of charge of the energy storage battery within the target range.

[0045] Based on the current acceptable charge and discharge power range of the energy storage battery, the charge and discharge power compensation amount is limited.

[0046] Based on the originally planned charging and discharging operation time points in the reference operating trajectory and according to the photovoltaic power generation deviation trend, the charging and discharging operation time points are advanced or delayed to generate a time compensation amount.

[0047] The power compensation amount after the limiting process and the time compensation amount are encoded into a series of instructions that execute a charging and discharging operation with a specific power value at a specific time point, forming the pre-compensation adjustment instruction set.

[0048] Furthermore, if the system operating state offset falls into the abnormal offset range, an emergency operation mode is activated. Based on the latest state of the real-time operating stream and the preset safe charging and discharging rules, a set of strong compensation adjustment instructions to ensure the safe operation of the system is generated, including:

[0049] In the emergency operation mode, the reference operation trajectory is ignored, and the safety level is determined directly based on the current state of charge, temperature and voltage of the energy storage battery in the real-time operation stream;

[0050] Based on the aforementioned safety level, the maximum allowable charging current, maximum discharging current, and voltage protection threshold are matched from a preset safe charging and discharging rule library.

[0051] With the goal of maintaining the most basic safety state of the energy storage battery, calculate the minimum charge and discharge scheduling scheme under the premise of satisfying the load power supply.

[0052] The minimum charge and discharge scheduling scheme is transformed into a series of mandatory charge and discharge control commands with the highest execution priority. Each execution of the command is accompanied by real-time monitoring and feedback verification of the key safety parameters of the energy storage battery.

[0053] The system continuously monitors the deviation of its operating status, and exits the emergency operation mode when it falls back to the warning deviation range or the normal deviation range.

[0054] Furthermore, it also includes the step of dynamically maintaining and updating the set of typical operating mode fragments:

[0055] Validated and stable real-time runtime stream segments are periodically processed and added to the historical runtime dataset to form an augmented historical runtime dataset.

[0056] The augmented historical running dataset is re-executed with time-series segment clustering to update the typical running mode segment set and its feature vectors.

[0057] In dynamic pattern matching computation, an updated set of typical operating pattern fragments and their feature vectors are used to ensure the timeliness and adaptability of pattern matching.

[0058] The step of re-performing time-series segment clustering on the augmented historical runtime dataset and updating the typical runtime pattern segment set and its feature vectors includes:

[0059] When re-performing clustering, the newly added real-time running stream segments are assigned higher initial weights than the original historical running datasets, while the data in the original historical running datasets are assigned weights that decay over time.

[0060] Performing weighted clustering calculations enables the new set of typical operating pattern fragments to more significantly reflect the recent operating characteristics of the system;

[0061] Calculate the feature vectors of the new typical operating mode fragment set and establish the mapping relationship between the new and old feature vectors to ensure the continuity of control strategy generation;

[0062] The original set and vectors are replaced with the updated set of typical operating mode fragments and feature vectors to complete dynamic maintenance and updating.

[0063] Furthermore, the present invention also includes an intelligent control system for solar streetlights, the system comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the computer program, implements the steps of the intelligent charging and discharging control method for solar streetlights described above.

[0064] Compared with the prior art, the beneficial effects of the present invention are:

[0065] By performing time-series clustering analysis on photovoltaic power generation, battery charging and discharging, and ambient light sequences from historical operational data, the system can automatically segment and extract sets of typical operational mode segments with different dynamic characteristics and their feature vectors. In real-time operation, the real-time data stream is dynamically matched and calculated with these mode features, thereby achieving accurate identification of the specific operational mode currently in which the system operates. This allows control decisions to be based on the complete mode context of the current operational state, rather than relying on isolated judgments of single parameters, enhancing the system's ability to recognize and understand complex environmental evolution processes.

[0066] After identifying the current operating mode, the system retrieves specific historical running segments under the same mode from historical data and uses their complete sequences as the reference operating trajectory for current control. By comparing the real-time operating flow with this reference trajectory point by point and calculating the cumulative error, the offset between the system's operating state and the historical reference state can be quantified. Based on this offset, the charging and discharging sequence in the reference trajectory is adjusted compensatorily to generate the final control command. This process realizes the transformation of the control strategy from static rules or averaged references to dynamic tracking and feedback correction of specific historical trajectories, improving the control system's adaptability to real-time disturbances and state drift. Attached Figure Description

[0067] Figure 1 This is a flowchart illustrating the steps of an intelligent charging and discharging control method for solar streetlights according to the present invention.

[0068] Figure 2 A flowchart for time-series segment clustering and feature vector extraction;

[0069] Figure 3 A flowchart for reference trajectory retrieval;

[0070] Figure 4 A comparison of photovoltaic power generation output;

[0071] Figure 5 This study compares the stability of charge and discharge power before and after a typical mode update during the mode maintenance phase. Detailed Implementation

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

[0073] See Figure 1The system acquires historical operation datasets and real-time operation streams of the target solar street light system to perform intelligent control. The historical operation datasets include multi-day photovoltaic module power generation sequences, energy storage battery charging / discharging sequences, and ambient light sequences. Time-series segment clustering is performed on the historical operation datasets to form multiple sets of typical operation mode segments with similar operating characteristics, and feature vectors are extracted from each typical operation mode segment set. Based on the feature vectors of the real-time operation stream and each typical operation mode segment set, dynamic pattern matching calculations are performed to determine the current typical operation mode of the real-time operation stream. Historical operation segments matching the current typical operation mode are retrieved from the historical operation datasets, and the corresponding photovoltaic module power generation sequences, energy storage battery charging / discharging sequences, and ambient light sequences are obtained as reference operation trajectories. Point-by-point deviation analysis and cumulative error calculation are performed between the real-time operation stream and the reference operation trajectory to generate system operation state offset. Based on the system operation state offset, a set of compensatory adjustment instructions for the energy storage battery charging / discharging sequence is generated on the basis of the reference operation trajectory.

[0074] See Figure 2 In one embodiment of the present invention, the intelligent charging and discharging control method for solar streetlights involves performing time-series segment clustering on a historical operating dataset and performing dynamic pattern matching calculations based on the real-time operating flow. The historical operating dataset includes multi-day photovoltaic module power generation sequences, energy storage battery charging and discharging sequences, and ambient light sequences. For example, in an example scenario, the historical operating dataset covers 30 consecutive days of operating data with a time resolution of 1 minute. The photovoltaic module power generation sequence records the power generation value, the energy storage battery charging and discharging sequence records the charging and discharging power values, and the ambient light sequence records the light intensity value. In a specific implementation, continuous operating data segments are extracted on the timeline of the historical operating dataset using a sliding window of fixed length. The sliding window length is set to 60 minutes, and the sliding step size is set to 10 minutes, thereby generating multiple overlapping operating data segments. For each running data segment, the trend of the photovoltaic module power generation sequence within it is calculated. The trend is represented by the slope of linear regression. The statistical characteristics of the energy storage battery charge and discharge sequence are calculated. The statistical characteristics include the mean and standard deviation. The periodicity of the ambient light sequence is calculated. The periodicity is extracted by Fourier transform to extract the dominant frequency component. The calculation results of trend, statistical characteristics and periodicity are combined as the descriptive vector of the running data segment.

[0075] In some embodiments, the description vector is a multi-dimensional numerical vector, for example, containing four dimensions: the slope of the photovoltaic module power generation sequence, the mean of the energy storage battery charge-discharge sequence, the standard deviation of the energy storage battery charge-discharge sequence, and the amplitude of the dominant frequency of the ambient light sequence. Unsupervised clustering is performed on the description vectors of all operational data segments using the K-means algorithm. This algorithm groups operational data segments whose description vectors are close in position in the feature space into the same category, forming a preliminary set of typical operational mode segments for each category. In a specific implementation, the number of clusters K is determined using the elbow rule, for example, K=5, generating five preliminary sets of typical operational mode segments, each containing multiple operational data segments. Alignment, stacking, and averaging are performed on all operational data segments within each preliminary set of typical operational mode segments to generate standard mode segments for the typical operational mode segments. Alignment and stacking are based on the start time of the operational data segments, and averaging is performed by taking the arithmetic mean of the photovoltaic module power generation sequence value, the energy storage battery charge-discharge sequence value, and the ambient light sequence value at each time point. Key features are extracted from standard pattern segments. These key features include the peak power of the photovoltaic module power generation sequence, the cumulative energy of the energy storage battery charge-discharge sequence, and the fluctuation range of the ambient light sequence, forming a feature vector representing a set of typical operating pattern segments. In some embodiments, the feature vector dimension is consistent with the description vector dimension, but it is calculated based on standard pattern segments. For example, the feature vector includes the peak power of the photovoltaic module power generation sequence, the total energy of the energy storage battery charge-discharge sequence, and the maximum and minimum difference of the ambient light sequence. It can be understood that time-series segment clustering classifies historical operating data into representative patterns, providing a basis for dynamic pattern matching.

[0076] In practical implementation, dynamic pattern matching calculations are performed based on the feature vectors of the real-time operation stream and the set of typical operation mode segments to determine the typical operation mode to which the real-time operation stream currently belongs. For example, in a data comparison scenario, the real-time operation stream traces back from the current moment, including data points from the most recent 60 minutes, and the matching time window is set to 60 minutes. In practical implementation, within the preset matching time window, the latest part of the real-time operation stream is extracted to form the real-time segment to be matched, and the length of the real-time segment to be matched is fixed at 60 minutes. The description vector of the real-time segment to be matched is calculated. The calculation method of the description vector is consistent with that of the description vector calculation method of historical operation data segments, that is, calculating the trend of photovoltaic module power generation sequence, the statistical characteristics of energy storage battery charge and discharge sequence, and the periodicity of ambient light sequence, and combining them into a description vector. The distance between the description vector of the real-time segment to be matched and the feature vector of each set of typical operation mode segments is calculated. The distance calculation uses the Euclidean distance formula. The Euclidean distance formula is expressed as:

[0077]

[0078] in: Indicates distance, The first element of the description vector of the real-time segment to be matched is... One portion, The eigenvector representing the set of typical operating mode fragments is the first... One portion, This represents the dimension of the description vector and the feature vector. The feature vector of the typical operating mode segment set with the smallest distance to the description vector of the real-time segment to be matched is selected. The typical operating mode corresponding to this is determined as the current typical operating mode of the real-time operating stream. In a specific implementation, for example, if the distance calculation values ​​between the real-time operating stream description vector and the feature vectors of the five typical operating modes are [1.5, 0.8, 2.3, 1.9, 3.0], and the smallest distance of 0.8 corresponds to the second typical operating mode, then the current typical operating mode of the real-time operating stream is determined to be the second typical operating mode. As time progresses, a sliding matching time window is used, with a sliding step size set to 1 minute. The steps of interception, calculation, and determination are repeated to achieve dynamic updates of the typical operating mode of the real-time operating stream. Optionally, the length of the matching time window can be adjusted according to the actual application, for example, set to 30 minutes or 120 minutes. Optionally, the distance calculation can also use Manhattan distance or cosine similarity, but it must be consistent with the distance metric used in clustering calculation. It can be understood that dynamic pattern matching calculation achieves online identification of operating modes by comparing the similarity with historical patterns in real time.

[0079] See Figure 3In one embodiment of the present invention, the intelligent charging and discharging control method for solar streetlights involves retrieving historical operating segments from a historical operating dataset that match the current typical operating mode, obtaining the photovoltaic module power generation sequence, energy storage battery charging and discharging sequence, and ambient light sequence for the corresponding time period as a reference operating trajectory. The historical operating dataset contains photovoltaic module power generation sequences, energy storage battery charging and discharging sequences, and ambient light sequences from multiple days. The current typical operating mode is determined by dynamic pattern matching calculation. For example, in an example scenario, dynamic pattern matching calculation determines that the current typical operating mode of the real-time operating flow is "Mode 3," and the historical operating dataset covers operating records from the past 90 days with a time resolution of 5 minutes. In specific implementation, all historical operating data segments belonging to the current typical operating mode are located in the historical operating dataset, and the start and end times of the historical operating data segments on the historical timeline are recorded. The location is completed by querying the pattern label associated with each historical operating data segment. In a data comparison scenario, assuming that "Mode 3" appears 50 times in the historical operating dataset, these 50 historical operating data segments are located, and the start and end timestamps of each segment are recorded. Based on the current moment of the real-time runtime stream, historical moments with the same date type and similar time points are searched on the historical timeline. In some embodiments, the date type is defined as weekday, weekend, or public holiday. For example, if the current moment is 10:30 AM on Wednesday, February 25, 2026, it belongs to the weekday type. Therefore, all historical dates of weekday type are filtered from the historical runtime dataset. In specific implementations, similar time points refer to moments where the clock time difference from the current moment is within a preset allowable range, such as ±15 minutes. Optionally, the process of finding historical moments is quantified by calculating a time matching score S, which is determined by both the date type matching factor and the time point proximity. The formula for calculating the time matching score S is expressed as:

[0080]

[0081] in: Indicates the time matching score. and These are weighting coefficients. It is an indicator function, when the current date type is... With historical date type The value is 1 if the values ​​are the same, otherwise it is 0. It is the attenuation coefficient. The clock time (in minutes) indicates the current moment. The clock time (in minutes) represents the historical moment. From the located historical operational data segments, segments covering the historical moment are selected, and the complete photovoltaic module power generation sequence, energy storage battery charge / discharge sequence, and ambient light sequence for the corresponding time period are extracted. Coverage means that the historical moment is within the start and end time interval of a certain historical operational data segment. For example, if the time interval of a historical operational data segment is from 9:45 AM to 10:45 AM on a certain historical day, and the found historical moment is 10:20 AM on the same day, then the historical moment is covered by this segment. In specific implementation, all sequence data from the start time to the end time of the segment are extracted. The extracted photovoltaic module power generation sequence, energy storage battery charge / discharge sequence, and ambient light sequence are arranged according to the time starting point aligned with the current real-time operational flow to form a reference operational trajectory. Time starting point alignment means mapping the start time point of the extracted historical sequence data to the current time of the real-time operational flow, with subsequent data points corresponding sequentially in chronological order. It can be understood that by retrieving operational data in historical intermediate modes, the reference operational trajectory provides a baseline for expected system behavior under similar operating conditions. In some embodiments, if sequences covering historical moments are extracted from multiple different historical operational data segments, the average of all extracted sequences is calculated to generate a comprehensive reference operational trajectory. Optionally, the allowable range of similar time points can be dynamically adjusted according to the season or weather conditions, for example, set to ±30 minutes in winter. It is understood that the retrieval process ensures that the reference operational trajectory is comparable to the current state in terms of operational mode and temporal context.

[0082] In one embodiment of the present invention, the intelligent charging and discharging control method for solar streetlights involves performing point-by-point deviation analysis and cumulative error calculation between the real-time operating stream and the reference operating trajectory to generate a system operating state offset, and generating a set of compensatory adjustment instructions based on the system operating state offset. For example, in an example scenario, the real-time operating stream contains data from the 30 minutes prior to the current moment, and the reference operating trajectory is historical benchmark data corresponding to the same time period, both with a time resolution of 1 minute, and a preset evaluation window length set to 30 minutes. In a specific implementation, point-to-point difference calculation is performed on the photovoltaic module power generation sequence in the real-time operating stream and the reference operating trajectory to generate a photovoltaic power generation instantaneous deviation sequence. Each data point in the photovoltaic power generation instantaneous deviation sequence is obtained by subtracting the power value of the photovoltaic module power generation sequence at the corresponding time point in the reference operating trajectory from the instantaneous power value of the photovoltaic module power generation sequence in the real-time operating stream. In a data comparison example, if the power generation of the real-time operating stream at a certain minute is 205 watts, and the power generation of the corresponding minute in the reference operating trajectory is 200 watts, then the photovoltaic power generation instantaneous deviation for that minute is +5 watts. A point-to-point difference calculation is performed on the energy storage battery charging and discharging sequences in the real-time operation stream and the reference operation trajectory to generate a battery charging and discharging instantaneous deviation sequence. Each data point in the battery charging and discharging instantaneous deviation sequence is obtained by subtracting the power value of the corresponding time point of the energy storage battery charging and discharging sequence in the reference operation trajectory from the instantaneous power value of the energy storage battery charging and discharging sequence in the real-time operation stream. Charging power is recorded as a positive value, and discharging power is recorded as a negative value. For example, if the battery charging power in the real-time operation stream is 50 watts and the planned charging power in the reference operation trajectory is 60 watts, then the battery charging and discharging instantaneous deviation for that minute is -10 watts. The mean absolute deviation and cumulative squared deviation of the photovoltaic power generation instantaneous deviation sequence within a preset evaluation window are calculated. The mean absolute deviation is the sum of the absolute values ​​of all data points in the photovoltaic power generation instantaneous deviation sequence divided by the total number of data points, and the cumulative squared deviation is the sum of the squared values ​​of all data points in the photovoltaic power generation instantaneous deviation sequence. The calculation method for the mean absolute deviation and cumulative squared deviation of the battery charging and discharging instantaneous deviation sequence within the preset evaluation window is the same as that for the photovoltaic power generation instantaneous deviation sequence.

[0083] In practical implementation, the average absolute deviation and cumulative squared deviation of photovoltaic power generation and battery charging / discharging are weighted and fused according to preset weighting coefficients. The resulting fused value is used as the system operating state offset. The weighted fusion formula is expressed as follows:

[0084]

[0085] in: Indicates the offset of the system's operating state. This represents the average absolute deviation of the instantaneous deviation sequence of photovoltaic power generation. This represents the cumulative squared deviation of the instantaneous deviation sequence of photovoltaic power generation. This represents the average absolute deviation of the instantaneous deviation sequence of battery charging and discharging. This represents the cumulative squared deviation of the instantaneous deviation sequence of battery charging and discharging. These are preset weighting coefficients. In some embodiments, the weighting coefficients... The values ​​are 0.3, 0.2, 0.3, and 0.2 respectively, emphasizing the balanced contribution of the mean absolute deviation and the cumulative squared deviation. A threshold range for the offset is set, including a normal offset range, a warning offset range, and an abnormal offset range. For example, the numerical range of the system operating state offset O is divided into three segments: the normal offset range is [0, 10), the warning offset range is [10, 50), and the abnormal offset range is [50, +∞). The system operating state offset is determined to fall into which threshold range? If the system operating state offset falls into the normal offset range, the planned charging and discharging sequence in the reference operating trajectory is used as the target, and a fine-tuning instruction to maintain the current operating state is generated. The fine-tuning instruction maintains the current charging and discharging power without active adjustment. If the system operating state offset falls into the warning offset range, the planned charging and discharging sequence in the reference operating trajectory is used as the benchmark, and a set of pre-compensation adjustment instructions for charging and discharging power and time is generated based on the trend of the instantaneous deviation sequence of photovoltaic power generation. It is understood that the warning offset interval indicates that the system operation has deviated from the reference trajectory but has not yet endangered safety, requiring proactive compensation. If the system operation status offset falls into the abnormal offset interval, an emergency operation mode is activated, generating a set of strong compensation adjustment instructions to ensure the safe operation of the system based on the latest status of the real-time operation stream and preset safe charging and discharging rules. It is understood that the abnormal offset interval indicates that the deviation has reached a level that may impair system safety, necessitating mandatory safety measures. Optionally, the specific boundary values ​​of the offset threshold interval can be calibrated based on system capacity, battery type, and historical operation statistics. Optionally, the length of the preset evaluation window can be associated with the matching time window length in dynamic mode matching, for example, both set to 30 minutes. In some embodiments, before calculating the mean absolute deviation and cumulative squared deviation, the deviation sequence can be filtered to smooth out noise effects.

[0086] In one embodiment of the present invention, the intelligent charging and discharging control method for solar streetlights involves generating a pre-compensation adjustment instruction set when the system operating state deviation falls into the warning deviation range, and activating an emergency operation mode to generate a strong compensation adjustment instruction set when the system operating state deviation falls into the abnormal deviation range. The system operating state deviation is calculated by analyzing the deviation between the real-time operation flow and the reference operation trajectory. For example, in an example scenario, the calculated system operating state deviation value is 25, falling into the preset warning deviation range [10, 50). The instantaneous deviation sequence of photovoltaic power generation shows a continuous negative value over the past 15 minutes, indicating that the photovoltaic power generation is lower than the reference operation trajectory. By analyzing the slope of the instantaneous deviation sequence of photovoltaic power generation in the most recent period, the trend of photovoltaic power generation deviation in the near future is predicted. The most recent period is set to 10 minutes, and the slope is obtained by fitting a straight line using the least squares method. The trend of photovoltaic power generation deviation predicts that the photovoltaic power generation will continue to be lower than the reference value by 5% to 10% in the next 10 minutes. Based on the trend of photovoltaic power generation deviation, the required charge and discharge power compensation to maintain the state of charge (SOC) of the energy storage battery within the target range is calculated. The target SOC range for the energy storage battery is set as [30%, 80%]. Charge and discharge power compensation amount. The calculation formula is expressed as:

[0087]

[0088] in: This indicates the amount of charging and discharging power compensation. A positive value indicates that charging needs to be increased or discharging needs to be reduced, while a negative value indicates that charging needs to be reduced or discharging needs to be increased. This indicates adjustment of the gain coefficient;

[0089] This represents the power value of the planned charge / discharge sequence in the reference operating trajectory; This represents the actual expected photovoltaic power generation value after correction based on the photovoltaic power generation deviation trend. Combining the current acceptable charge / discharge power range of the energy storage battery, the charge / discharge power compensation amount is limited. The current acceptable charging power range of the energy storage battery is [0 watts, 120 watts], and the discharge power range is [-150 watts, 0 watts]. The limiting process constrains the charge / discharge power compensation amount within this range. Referring to the originally planned charging / discharging operation time points in the operating trajectory, and based on the photovoltaic power generation deviation trend, the charging / discharging operation time points are advanced or delayed, generating a time compensation amount. For example, if the originally planned charging start time is 14:00, and the photovoltaic power generation deviation trend indicates insufficient power generation, the time compensation amount advances the charging start time by 30 minutes to 13:30. The limited charge / discharge power compensation amount and the time compensation amount are encoded into a series of instructions to execute charge / discharge operations with specific power values ​​at specific time points, forming a pre-compensation adjustment instruction set. In some embodiments, the pre-compensation adjustment instruction set is stored in a structured table format for directly driving the controller. See Table 1 for the pre-compensation adjustment instruction set.

[0090] Table 1: Set of Pre-compensation Adjustment Instructions

[0091]

[0092] In practical implementation, if the system's operating status deviation falls into the abnormal deviation range, an emergency operation mode is activated. Based on the latest status of the real-time operation stream and preset safe charging and discharging rules, a set of strong compensation adjustment instructions to ensure the safe operation of the system is generated. For example, in a data comparison scenario, the calculated system operating status deviation is 75, falling into the preset abnormal deviation range [50, +∞). The real-time operation stream shows that the energy storage battery's state of charge is 15% and the voltage is 11.0 volts. In emergency operation mode, the reference operating trajectory is ignored, and the safety level is determined directly based on the current state of charge, temperature, and voltage of the energy storage battery in the real-time operation stream. The safety level is determined based on whether the state of charge is below 20%, the temperature exceeds 50 degrees Celsius, and the voltage is below 11.5 volts. Based on the safety level, the maximum allowable charging current, maximum discharging current, and voltage protection threshold are matched from the preset safe charging and discharging rule library. The safe charging and discharging rule library stores the parameter limits for different safety levels in the form of a lookup table. With the goal of maintaining the most basic safety state of the energy storage battery, a minimum charge-discharge scheduling scheme is calculated to meet the load power supply requirements. This scheme prioritizes ensuring the minimum power demand of the load while limiting the charge-discharge power of the energy storage battery within a safe threshold. The minimum charge-discharge scheduling scheme is transformed into a series of mandatory charge-discharge control commands with the highest execution priority. Each execution of a command is accompanied by real-time monitoring and feedback verification of key safety parameters of the energy storage battery, including state of charge, temperature, and voltage. Feedback verification compares these parameters with the safety threshold after each command execution. The system's operating status deviation is continuously monitored, and the emergency operation mode is exited when it falls back to the warning deviation range or the normal deviation range. Optionally, a multi-parameter weighted scoring mechanism can be used for safety level judgment. Optionally, the time compensation amount in the pre-compensation adjustment command set can be optimized based on successful adjustment records in similar historical scenarios. It can be understood that the pre-compensation adjustment in the warning deviation range aims to stabilize system operation through proactive intervention. It can be understood that the emergency operation mode in the abnormal deviation range prevents hardware damage through mandatory safety rules. In some embodiments, the limiting processing of the charge / discharge power compensation amount can introduce dynamic boundaries, with the boundary values ​​adjusted according to changes in battery temperature. Optionally, the execution priority of the strong compensation adjustment instruction set can be configured to interrupt-driven mode.

[0093] See Figure 4In the deviation analysis phase of intelligent charging and discharging control for solar streetlights, the difference between the real-time operating flow of photovoltaic power generation and the reference operating trajectory is intuitively quantified. The solid line in the figure represents the reference operating trajectory, which is a historical power generation sequence retrieved by performing time-series segment clustering and pattern matching on historical operating datasets, matching the typical operating mode of the current real-time operating flow. This represents the expected power generation performance of the system under ideal or typical conditions. The dashed line represents the real-time operating flow, i.e., the current actual power generation sequence of the photovoltaic modules. The yellow filled area between the two clearly marks the insufficient power generation deviation area, representing the cumulative instantaneous difference between the real-time power generation and the reference trajectory. From a time perspective, the power generation is mainly concentrated during the daytime period from 06:00 to 18:00, consistent with the power generation characteristics of photovoltaic modules. Around 12:00, the reference operating trajectory reaches a peak of approximately 160 watts, while the real-time operating flow remains below the reference value, forming a significant yellow deviation area. This indicates a persistent insufficient power generation during this period. This deviation is calculated point-by-point to form a sequence of instantaneous deviations in photovoltaic power generation. This sequence is then calculated using the average absolute deviation and cumulative squared deviation within a preset evaluation window, ultimately merging into a system operating status offset. This offset is the core basis for judging the system operating status and triggering pre-compensation adjustments or emergency operation modes. For example, when the offset falls within the warning range, the controller will predict future power generation trends based on the slope of the deviation sequence and adjust the charging and discharging plans of the energy storage batteries in advance; when the offset falls within the abnormal range, an emergency mode is activated to forcibly ensure battery safety.

[0094] In one embodiment of the present invention, the intelligent charging and discharging control method for solar streetlights further includes a step of dynamically maintaining and updating a set of typical operating mode segments to ensure the adaptability of the control strategy to long-term changes in system operation. For example, in an example scenario, dynamic maintenance is set to be performed weekly. The historical operating dataset initially contains operating data from the past 90 days. Each maintenance cycle adds verified and stable real-time operating stream segments from the past 7 days. Validated and stable real-time operating stream segments are periodically processed and added to the historical operating dataset to form an augmented historical operating dataset. Stable real-time operating stream segments refer to data segments that have not triggered abnormal offset interval alarms within a continuous maintenance cycle and whose average system operating status offset is below a preset threshold. The augmented historical operating dataset is re-executed with time-series segment clustering, updating the set of typical operating mode segments and their feature vectors. The re-execution of clustering uses the same algorithm and parameters as the initial clustering, but uses the augmented dataset. In dynamic pattern matching calculation, the updated set of typical operating mode segments and their feature vectors are used to ensure the timeliness and adaptability of pattern matching. The pattern matching calculation process remains unchanged, but the feature vector library used for matching is the latest version.

[0095] In practice, the augmented historical operational dataset undergoes a re-processing of time-series segment clustering to update the set of typical operational pattern segments and their feature vectors. This process includes weighted calculations. During the re-clustering process, newly added real-time operational stream segments are assigned higher initial weights than the original historical operational dataset, while data in the original historical operational dataset are assigned weights that decay over time. In a data comparison example, newly added real-time operational stream segments from the past 7 days are assigned an initial weight of 2.0, while the original 90-day historical operational dataset is assigned decaying weights based on its data age (number of days since the data collection date), with older data receiving lower weights. Weighted clustering calculations ensure that the new set of typical operational pattern segments more significantly reflects the recent operational characteristics of the system. When calculating cluster centers, the description vector of each data point is multiplied by its weight before participating in the calculation. The formula for calculating the weight W of a data point in weighted clustering is expressed as:

[0096]

[0097] in: This represents the weight ultimately assigned to a specific segment of historical data.

[0098] This represents the basic weight of the data segment. This represents the weight decay coefficient. This represents the difference in days since the data segment was collected. A feature vector is calculated for the new set of typical operating mode segments, and a mapping relationship is established between the new and old feature vectors to ensure the continuity of control strategy generation. In some embodiments, the mapping relationship is established by calculating the minimum distance pairing between the new and old feature vector sets, thereby identifying which new mode corresponds to which old mode before the update. The updated set of typical operating mode segments and feature vectors replaces the original set and vectors, completing dynamic maintenance and updating. It can be understood that dynamic maintenance and updating enable the system to automatically absorb the latest operating experience and adapt to mode drift caused by seasonal changes or equipment aging.

[0099] See Figure 5In the mode maintenance phase of the intelligent charging and discharging control method for solar streetlights, the stability of charging and discharging power before and after the typical operating mode update can be quantitatively evaluated using the standard deviation index. The figure uses four typical operating modes (Mode 0, Mode 1, Mode 2, and Mode 3) as the horizontal axis and the standard deviation of charging and discharging power (W) as the vertical axis, visually presenting the impact of mode updates on system operational stability. Data shows that before the update, the standard deviations of charging and discharging power for each mode were: Mode 0 approximately 66W, Mode 1 approximately 43W, Mode 2 approximately 51.5W, and Mode 3 approximately 40W; after the update, the standard deviations decreased to: Mode 0 approximately 59W, Mode 1 approximately 45W, Mode 2 approximately 49W, and Mode 3 approximately 44W. Overall, after the mode update, except for Mode 1 and Mode 3 which showed slight fluctuations due to absorbing recent operating experience, the standard deviations of charging and discharging power for Mode 0 and Mode 2 significantly decreased. This indicates that the weighted clustering update strategy effectively improved the stability and consistency of the system's charging and discharging process. The comparison results verified the effectiveness of the dynamic mode maintenance mechanism: by assigning higher initial weights to newly added real-time operation stream segments and assigning weights that decay over time to historical data, the updated set of typical operation mode segments can more significantly reflect the recent operating characteristics of the system. Thus, in dynamic mode matching and charge / discharge control, it effectively reduces power fluctuations and improves the system's adaptability to environmental changes and equipment state drift.

[0100] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for intelligent charging and discharging control of solar streetlights, characterized in that, The method includes: Obtain the historical operation dataset and its real-time operation stream of the target solar street light system. The historical operation dataset includes multi-day photovoltaic module power generation sequences, energy storage battery charge and discharge sequences, and ambient light sequences. The historical running dataset is subjected to time-series segment clustering to form multiple sets of typical running pattern segments with similar running characteristics, and the feature vector of each typical running pattern segment set is extracted. Based on the feature vectors of the real-time operation stream and the set of typical operation mode segments, dynamic pattern matching calculation is performed to determine the typical operation mode to which the real-time operation stream currently belongs. The historical operation data set is used to retrieve the historical operation segments that match the current typical operation mode, and the photovoltaic module power generation sequence, energy storage battery charging and discharging sequence and ambient light sequence for the corresponding time period are obtained as reference operation trajectories. The real-time operation flow and the reference operation trajectory are subjected to point-by-point deviation analysis and cumulative error calculation to generate the system operation state offset. Based on the system operating state offset, and on the basis of the reference operating trajectory, a set of compensatory adjustment instructions for the charging and discharging sequence of the energy storage battery is generated.

2. The intelligent charging and discharging control method for solar streetlights according to claim 1, characterized in that, The historical runtime dataset is subjected to time-series segment clustering to form multiple sets of typical runtime pattern segments with similar runtime characteristics. The feature vector of each typical runtime pattern segment set is then extracted, including: On the timeline of the historical running dataset, continuous segments of running data are extracted using a sliding window of fixed length; For each running data segment, calculate the trend of the photovoltaic module power generation sequence, the statistical characteristics of the energy storage battery charge and discharge sequence, and the periodicity of the ambient light sequence. Combine the calculation results of the trend, statistical characteristics, and periodicity as the description vector of the running data segment. Unsupervised clustering is performed on the description vectors of all running data segments to group running data segments whose description vectors are close in position in the feature space into the same category. Each category forms a preliminary set of typical running pattern segments. Align, overlay, and average all running data segments within each preliminary set of typical running mode segments to generate standard mode segments for the set of typical running mode segments; Key features are extracted from the standard pattern fragments to form a feature vector representing the set of typical operating pattern fragments.

3. The intelligent charging and discharging control method for solar streetlights according to claim 2, characterized in that, Based on the feature vectors of the real-time runtime stream and the set of typical runtime mode segments, dynamic pattern matching calculation is performed to determine the typical runtime mode to which the real-time runtime stream currently belongs, including: Within a preset matching time window, the latest portion of the real-time running stream is extracted to form a real-time segment to be matched; Calculate the description vector of the real-time segment to be matched, and the calculation method of the description vector is consistent with the calculation method of the description vector of the historical running data segment; Calculate the distance between the description vector of the real-time segment to be matched and the feature vector of each typical running mode segment set; Select the feature vector of the typical running mode segment set that has the smallest distance to the description vector of the real-time segment to be matched, and the typical running mode corresponding to it is determined to be the typical running mode to which the real-time running stream currently belongs. As time progresses, the matching time window is slid, and the interception, calculation, and judgment steps are repeated to achieve dynamic updates of the typical operating mode to which the real-time running stream belongs.

4. The intelligent charging and discharging control method for solar streetlights according to claim 3, characterized in that, Retrieve historical operating segments that match the current typical operating mode from the historical operating dataset, and obtain the photovoltaic module power generation sequence, energy storage battery charge / discharge sequence, and ambient light sequence for the corresponding time period as a reference operating trajectory, including: In the historical operation dataset, locate all historical operation data segments that belong to the current typical operation mode, and record the start and end times of the historical operation data segments on the historical timeline; Based on the current moment of the real-time running stream, search for historical moments on the historical timeline that have the same date type and similar time points as the current moment; From the located historical operation data segments, segments covering the historical moment are selected, and the complete photovoltaic module power generation sequence, energy storage battery charging and discharging sequence, and ambient light sequence corresponding to the segment are extracted. The extracted photovoltaic module power generation sequence, energy storage battery charging and discharging sequence, and ambient light sequence are arranged according to the time starting point aligned with the current real-time operation flow to form the reference operation trajectory.

5. The intelligent charging and discharging control method for solar streetlights according to claim 4, characterized in that, The system operating state offset is generated by performing point-by-point deviation analysis and cumulative error calculation between the real-time operation stream and the reference operation trajectory, including: A point-to-point difference calculation is performed between the real-time operation stream and the photovoltaic module power generation sequence in the reference operation trajectory to generate a photovoltaic power generation instantaneous deviation sequence. Point-to-point difference calculation is performed between the real-time operation stream and the energy storage battery charging and discharging sequence in the reference operation trajectory to generate a battery charging and discharging instantaneous deviation sequence. Calculate the average absolute deviation and cumulative squared deviation of the instantaneous deviation sequence of photovoltaic power generation within a preset evaluation window; Calculate the average absolute deviation and cumulative squared deviation of the instantaneous charge and discharge deviation sequence of the battery within the preset evaluation window; The average absolute deviation and cumulative squared deviation of photovoltaic power generation and battery charging and discharging are weighted and fused according to a preset weighting coefficient, and the resulting fused value is used as the system operating state offset.

6. The intelligent charging and discharging control method for solar streetlights according to claim 5, characterized in that, Based on the system operating state offset, and on the basis of the reference operating trajectory, a set of compensatory adjustment instructions for the energy storage battery charging and discharging sequence is generated, including: Set an offset threshold range, which includes a normal offset range, a warning offset range, and an abnormal offset range; Determine which offset threshold range the system's operating state offset falls into; If the system operating state offset falls within the normal offset range, then the planned charging and discharging sequence in the reference operating trajectory is used as the target to generate a fine-tuning instruction to maintain the current operating state. If the system operating status deviation falls into the warning deviation range, then based on the planned charging and discharging sequence in the reference operating trajectory, a set of pre-compensation adjustment instructions for charging and discharging power and time is generated according to the trend of the photovoltaic power generation instantaneous deviation sequence. If the system operating status offset falls into the abnormal offset range, the emergency operation mode is activated. Based on the latest status of the real-time operation stream and the preset safe charging and discharging rules, a set of strong compensation adjustment instructions to ensure the safe operation of the system is generated.

7. The intelligent charging and discharging control method for solar streetlights according to claim 6, characterized in that, If the system operating state deviation falls within the warning deviation range, then based on the planned charging and discharging sequence in the reference operating trajectory, and according to the trend of the instantaneous deviation sequence of photovoltaic power generation, a set of pre-compensation adjustment instructions for charging and discharging power and time is generated, including: Analyze the slope of the instantaneous deviation sequence of photovoltaic power generation in the most recent period to predict the trend of photovoltaic power generation deviation in the near future. Based on the photovoltaic power generation deviation trend, calculate the amount of charging and discharging power compensation required to maintain the state of charge of the energy storage battery within the target range. Based on the current acceptable charge and discharge power range of the energy storage battery, the charge and discharge power compensation amount is limited. Based on the originally planned charging and discharging operation time points in the reference operating trajectory and according to the photovoltaic power generation deviation trend, the charging and discharging operation time points are advanced or delayed to generate a time compensation amount. The power compensation amount after the limiting process and the time compensation amount are encoded into a series of instructions that execute a charging and discharging operation with a specific power value at a specific time point, forming the pre-compensation adjustment instruction set.

8. The intelligent charging and discharging control method for solar streetlights according to claim 7, characterized in that, If the system operating status deviation falls into the abnormal deviation range, an emergency operation mode is activated. Based on the latest status of the real-time operation stream and the preset safe charging and discharging rules, a set of strong compensation adjustment instructions to ensure the safe operation of the system is generated, including: In the emergency operation mode, the reference operation trajectory is ignored, and the safety level is determined directly based on the current state of charge, temperature and voltage of the energy storage battery in the real-time operation stream; Based on the aforementioned safety level, the maximum allowable charging current, maximum discharging current, and voltage protection threshold are matched from a preset safe charging and discharging rule library. With the goal of maintaining the most basic safety state of the energy storage battery, calculate the minimum charge and discharge scheduling scheme under the premise of satisfying the load power supply. The minimum charge and discharge scheduling scheme is transformed into a series of mandatory charge and discharge control commands with the highest execution priority. Each execution of the command is accompanied by real-time monitoring and feedback verification of the key safety parameters of the energy storage battery. The system continuously monitors the deviation of its operating status, and exits the emergency operation mode when it falls back to the warning deviation range or the normal deviation range.

9. The intelligent charging and discharging control method for solar streetlights according to claim 8, characterized in that, It also includes the step of dynamically maintaining and updating the set of typical operating mode fragments: Validated and stable real-time runtime stream segments are periodically processed and added to the historical runtime dataset to form an augmented historical runtime dataset. The augmented historical running dataset is re-executed with time-series segment clustering to update the typical running mode segment set and its feature vectors. In dynamic pattern matching computation, an updated set of typical operating pattern fragments and their feature vectors are used to ensure the timeliness and adaptability of pattern matching. The step of re-performing time-series segment clustering on the augmented historical runtime dataset and updating the typical runtime pattern segment set and its feature vectors includes: When re-performing clustering, the newly added real-time running stream segments are assigned higher initial weights than the original historical running datasets, while the data in the original historical running datasets are assigned weights that decay over time. Performing weighted clustering calculations enables the new set of typical operating pattern fragments to more significantly reflect the recent operating characteristics of the system; Calculate the feature vectors of the new typical operating mode fragment set and establish the mapping relationship between the new and old feature vectors to ensure the continuity of control strategy generation; The original set and vectors are replaced with the updated set of typical operating mode fragments and feature vectors to complete dynamic maintenance and updating.

10. A smart control system for solar streetlights, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent charging and discharging control method for solar streetlights as described in any one of claims 1 to 9.