A secure and fast shutdown system for photovoltaic adapters based on edge-cloud collaboration.

The edge-cloud collaborative photovoltaic adapter safe and fast shutdown system utilizes cloud-generated security contracts and edge-side local predictions, combined with shutdown execution time and communication latency, to solve the problem of insufficient shutdown decision-making when the photovoltaic adapter's state changes rapidly, thereby improving the timeliness and accuracy of shutdown.

CN123122033APending Publication Date: 2026-11-17ZHEJIANG LIGHT ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611434470.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing end-cloud collaboration solutions for photovoltaic adapters cannot effectively combine cloud-side group data analysis with end-side real-time execution capabilities when the photovoltaic adapter status rapidly evolves towards the risk boundary and the end-cloud communication latency changes, resulting in insufficient timeliness and accuracy of shutdown decisions.

Method used

The photovoltaic adapter safe and fast shutdown system based on edge-cloud collaboration generates a safety contract on the cloud side, which defines the applicable state domain, segmented risk boundaries, data timeliness conditions, and the latest shutdown time limit. The edge side predicts the arrival time of the risk based on the local state trajectory and the safety contract, and calculates the remaining safety time slot by combining the shutdown execution time and communication latency, and determines the shutdown trigger time directly or by correcting the local prediction time.

Benefits of technology

This enables the risk boundary formed by cloud-side group data to enter the edge-side decision-making process when time permits, avoiding outdated or mismatched cloud-side results from occupying local shutdown execution time. It ensures that the edge-cloud collaboration process corresponds to the risk evolution time and the actual execution time, thereby improving the timeliness and accuracy of shutdown decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122033A_ABST
    Figure CN123122033A_ABST
Patent Text Reader

Abstract

This invention relates to the fields of computer data processing and distributed security control technology, specifically a photovoltaic adapter safe and fast shutdown system based on edge-cloud collaboration. The system includes a cloud-side contract terminal and an edge-side decision terminal. The cloud side generates a security contract containing a state domain, risk boundaries, timeliness conditions, and shutdown time limits based on the adapter cluster status, anomaly records, and communication latency. The edge side forms a state trajectory based on local sampling, predicts the arrival time of local and contractual risks respectively, and calculates the remaining security time slots by combining the shutdown execution time, the upper bound of communication latency, and the validity period of the cloud-side results. If the remaining security time slots are insufficient, the state trajectory exceeds the applicable state domain, or the cloud-side results are invalid, the edge side determines the shutdown time based on the local risk model; otherwise, it performs a consistency judgment on the edge-cloud prediction results and corrects them according to the segmented risk boundaries or selects an earlier risk arrival time to execute the shutdown. This avoids outdated cloud-side results occupying shutdown time, maintaining the timeliness and consistency of the shutdown response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer data processing and distributed security control technology, specifically a photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration. Background Technology

[0002] Existing photovoltaic adapter safety shutdown technologies typically involve setting up operational status acquisition, threshold comparison, and shutdown execution logic at the adapter end. The device side acquires the adapter's operational status values ​​at a fixed sampling period, filters, aligns the samples using time, or performs sliding statistics, and then compares them with pre-written risk thresholds. When a single status value exceeds a set limit, the number of consecutive exceedances reaches a set condition, or multiple status values ​​meet a preset combination rule, the device side generates a shutdown trigger signal and records the status segments before and after the trigger. To facilitate centralized monitoring, the device side also periodically uploads operational summaries, anomaly markers, and shutdown results to the cloud. The cloud side saves operational records according to adapter identifiers, forming a group status distribution, and adjusts risk thresholds or rule versions based on historical anomaly records. Updated thresholds, rules, or model parameters are distributed from the cloud side to the device side, which replaces the original configuration after version verification. This type of solution ensures basic response speed with fixed rules at the device side and completes parameter maintenance through centralized statistics at the cloud side. Its control chain is clear and suitable for scenarios with stable communication and slow changes in adapter operational status.

[0003] Similar edge-cloud collaborative solutions build upon the above by adding parallel processing of cloud-side risk analysis and edge-side local judgment. The edge sends its current state sequence or compressed features to the cloud. The cloud uses the historical trajectories and real-time distribution of multiple adapters to calculate the risk level, predict the boundary crossing time, or generate shutdown instructions, and then returns the analysis results to the edge. The edge retains a lightweight model and executes according to the local model in the event of network interruption or cloud-side response timeout. For situations where edge-side and cloud-side results are inconsistent, existing solutions often use methods such as cloud-side priority, edge-side priority, risk score weighting, fixed waiting time, or higher risk level coverage to complete arbitration. Some solutions also set a uniform validity period for cloud-side results and maintain edge-cloud configuration consistency by periodically updating the model version. Although this type of processing places cloud-side group data analysis capabilities and edge-side real-time execution capabilities in the same control flow, whether cloud-side results participate in the current shutdown is usually determined by a preset mode or uniform timeout conditions, without incorporating the state deterioration rate, risk boundary arrival time, actual shutdown execution time, and current communication latency into the same time-series constraints.

[0004] Under conditions where the photovoltaic adapter state rapidly evolves towards the risk boundary and the end-to-cloud communication latency continuously changes, a fixed end-to-cloud division of labor and fixed arbitration rules cannot determine whether the cloud-side results still have a timely basis for decision-making based on the remaining safe time of the current shutdown event. Cloud-side analysis relies on group operational data and can reflect changes in state distribution not covered by local end-side models. However, cloud-side results may be outdated after being uploaded, calculated, and transmitted back. Continuing to wait or directly using them will compress the actual shutdown execution time required by the end-side. The end-side can immediately process local samples, but may not be able to adapt to the migration of operational state domains due to the long-term fixed risk boundary. When end-to-cloud results diverge, simply averaging risk scores or setting fixed priorities cannot reflect the order in which the two predicted trajectories reach the risk boundary. Therefore, it is necessary to organize the cloud-side risk boundary, local prediction results, communication latency, and shutdown execution time under unified time constraints, so that cloud-side information only participates in arbitration when the remaining safe time allows and the data is still within its applicable range. Summary of the Invention

[0005] The purpose of this invention is to provide a safe and fast shutdown system for photovoltaic adapters based on end-to-cloud collaboration, which can solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A secure and rapid shutdown system for photovoltaic adapters based on edge-cloud collaboration, including a cloud-side contract terminal and an edge-side decision terminal; The cloud-side contract terminal generates a target adapter security contract based on the state sequence, anomaly records and communication delays of the photovoltaic adapter group. The security contract includes the applicable state domain, segmented risk boundaries, data timeliness conditions, allowable model deviations and the latest shutdown time limit. The end-side decision-making terminal forms a state trajectory based on local sampling, uses the local risk model and the security contract to predict the risk arrival time, and calculates the remaining security time slots based on the shutdown execution time, the upper limit of communication delay, and the validity period of the cloud-side results. When the remaining safety time slot is less than the time required for cloud-side determination, the state trajectory exceeds the applicable state domain, or the cloud-side result does not meet the data timeliness conditions, the shutdown trigger time is determined by the local risk model; otherwise, the consistency of the two risk arrival times is judged according to the allowable model deviation. If they are consistent, the local risk arrival time is corrected by the segmented risk boundary; if they are inconsistent, the earlier one is used to determine the shutdown trigger time.

[0007] Preferably, the cloud-side contract terminal divides the state sequence of the photovoltaic adapter group into state subdomains according to the operation stage, extracts the change direction, duration interval and feature order of the abnormal trajectory before entering the risk state for each state subdomain, and constructs the corresponding segmented risk boundary accordingly. Establish boundary continuity constraints for overlapping trajectories of adjacent state subdomains, and generate applicability labels based on the coverage of the recent state trajectories of the target adapter in each state subdomain; The cloud-side contract encapsulates the segmented risk boundary, the boundary continuity constraint, the applicability marker, the data timeliness condition, and the latest shutdown deadline according to the same contract version, and establishes an association index between the contract version and the local risk model version of the target adapter.

[0008] Preferably, the end-side decision-making terminal maintains a latency ledger consisting of a communication round-trip latency sequence, a cloud-side processing latency sequence, and a local shutdown execution latency sequence, and extracts the latency upper envelope updated over time from the communication round-trip latency sequence and the cloud-side processing latency sequence, respectively. The difference between the estimated time when the state trajectory reaches the segmented risk boundary and the current sampling time is used to deduct the upper bound of the local shutdown execution delay, the upper envelope of the communication delay, and the upper envelope of the cloud-side processing delay to form a candidate safe time slot. The smaller of the candidate safe time slot and the remaining duration of the cloud-side result effective cutoff time relative to the current sampling time is determined as the remaining safe time slot. When any time delay sequence is continuously missing, an alternative time delay bound is generated using the upper envelope of the time delay before the missing time delay and the rate of change of the current state trajectory, and the time delay ledger is updated according to the sampling order after the valid time delay sample arrives.

[0009] Preferably, the end-side decision-making terminal maps the local predicted trajectory output by the local risk model and the contract predicted trajectory generated based on the security contract to a unified state coordinate, and determines the candidate moment when the two predicted trajectories first cross the corresponding segmented risk boundary; When the risk change directions of the two predicted trajectories are inconsistent or the difference between the candidate times exceeds the time tolerance in the allowed model deviation, the common trajectory segment before the divergence occurs is extracted, and the directed state distance from the end of the common trajectory segment to the risk boundary of each segment is calculated. The predicted trajectory with the earlier candidate time is selected first. When the candidate times are within the same time tolerance range, the predicted trajectory with the smaller directed state distance is selected. The candidate time of the selected predicted trajectory and the earlier time in the latest shutdown time limit are determined as the shutdown trigger time. At the same time, the end position of the common trajectory segment is recorded as the divergence position.

[0010] Preferably, the cloud-side contract terminal establishes a contract index tree for each state subdomain, consisting of a state subdomain identifier, a boundary segment identifier, and the applicability tag, and writes the common endpoints of adjacent segment risk boundaries into a shared boundary record; After receiving the pre-trigger state fragment fed back by the target adapter, the position where the local risk model output and the contract prediction result formed based on the security contract first show different risk directions in the pre-trigger state fragment is determined as the divergence position. The contract index tree path traversed by the pre-trigger state fragment is retrieved, the boundary fragment intersecting with the divergence position in the path is determined as the fragment to be updated, and the contract difference package is generated using the shared boundary record as the update constraint. The end-side decision-making terminal verifies the contract differential packet according to the contract version, state subdomain identifier, and boundary fragment identifier. It writes the verified boundary fragments into the candidate contract area and retains the original boundary fragments and associated indexes that are not involved in the candidate contract area.

[0011] Preferably, the end-side decision-making terminal divides the continuous records in the delay ledger into normal communication segments, jitter communication segments, and interruption recovery segments according to the incremental direction of whether there are continuous missing records and the round-trip delay of adjacent communications, and records the generation time, reception time, and applicable contract version of the cloud-side results in each communication segment; For the jittery communication segment, the non-negative increments of the round-trip delay samples of adjacent communications are accumulated into the segment-first delay sample to form a forward delay envelope; For the interrupt recovery segment, the interrupt duration, the queuing time of the first data packet after recovery, and the upper envelope of the delay before the interrupt are combined into a recovery delay envelope; When calculating the remaining safe time slots, the delay envelope corresponding to the current communication segment is selected, and the time consumed from the generation time to the receiving time is deducted from the effective duration of the cloud-side result. When the effective duration after deduction is not greater than the upper limit of the local shutdown execution delay, the cloud-side result is marked as not eligible to participate in the current determination.

[0012] Preferably, the end-side decision-making terminal divides each segmented risk boundary into a recoverable boundary layer and an irreversible risk boundary layer based on whether the historical abnormal trajectory returns to the applicable state domain within the latest shutdown time limit after crossing the segmented risk boundary, and respectively calculates the time interval between the local predicted trajectory and the contract predicted trajectory entering the two boundary layers. When both predicted trajectories have an irreversible risk boundary layer arrival interval, the lower bounds of each arrival interval are compared, and when the lower bounds fall into the tolerance interval at the same time, the directed state distance integrals of the two predicted trajectories from the recoverable boundary layer to the irreversible risk boundary layer are compared. When only one predicted trajectory has the irreversible risk boundary layer arrival interval, the directed state distance sequence of the other predicted trajectory is extended according to the original sampling period. If the zero point obtained by the extension does not fall into the arrival interval and the remaining safe time slot is less than the upper limit of the arrival interval, the shutdown trigger time is determined by the predicted trajectory with the arrival interval.

[0013] Preferably, before the cloud-side contract terminal generates the contract differential package, it constructs a counterfactual trajectory group with the first state of the state segment as the common starting point and the actual shutdown trigger state as the verification endpoint, based on the pre-trigger state segment, the divergence position, the local risk model output, the contract prediction result, and the actual shutdown record. Keep the pre-trigger state segment unchanged and replace the segment to be updated in turn to obtain the boundary factor trajectory. Keep the segmented risk boundary unchanged and replace the local risk model output after the divergence position in turn to obtain the model factor trajectory. The time intervals at which the boundary factor trajectory and the model factor trajectory first cross the corresponding segmented risk boundary are determined respectively. The segments to be updated that only change the time intervals of the boundary factor trajectory relative to the original contract prediction result are written into the update set. The common endpoint continuity check is performed on the update set according to the shared boundary record, and the update set that passes the check is encoded into the contract difference packet.

[0014] Preferably, within the common trajectory segment, the end-side decision-making terminal pairs each actual state with the predicted state of the local predicted trajectory and the contractual predicted trajectory at the next sampling time, forming two sets of directed deviation sequences according to the direction and successive order of the prediction deviation. The directed deviation sequence is translated along the corresponding predicted trajectory to construct the local temporal trajectory tube and the contractual temporal trajectory tube, and the time when each temporal trajectory tube first touches and completely crosses the irreversible risk boundary layer is taken as the lower and upper bounds of the arrival interval, respectively. When two arrival intervals overlap, the continuous sampling lengths of each temporal trajectory tube within the overlapping interval located on one side of the irreversible risk boundary layer are compared. The temporal trajectory tube with the larger continuous sampling length is selected, and the earlier time between the lower boundary of its arrival interval and the latest shutdown time limit is determined as the shutdown trigger time.

[0015] Preferably, the end-side decision-making terminal sets up independent version slots for the current security contract and the candidate contract respectively, writes the contract differential packet into the candidate contract fragment corresponding to the current candidate contract, and performs the boundary fragment replacement on the shadow state trajectory isolated from the real-time shutdown output; Calculate the risk arrival time of the current security contract and the candidate contract using the most recent valid state trajectory, and determine the version switching duration based on the number of state replacement boundary segments and the verification order of associated indexes. When the applicable state domain of the candidate contract covers the current state trajectory, the candidate contract version is higher than the current contract version, the corresponding cloud-side result meets the data timeliness condition, and the remaining security time slot is greater than the version switching duration, the version slot pointer is switched atomically with the state subdomain as the granularity, and the latest shutdown time limit in the current security contract is retained before the candidate contract completes all associated index verification.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The cloud side generates a safety contract based on the state sequence, anomaly records, and communication latency of the photovoltaic adapter group. This contract defines the applicable state domain, segmented risk boundaries, data timeliness conditions, allowable model deviations, and the latest shutdown deadline. The endpoint obtains the local risk arrival time and the contractual risk arrival time based on the local state trajectory. It then calculates the remaining safety time slots by combining the shutdown execution time, the upper limit of communication latency, and the validity period of the cloud side results. If the remaining safety time slots are insufficient, the current trajectory exceeds the applicable state domain, or the cloud side results do not meet the timeliness conditions, the endpoint no longer waits for the cloud side's decision and directly determines the shutdown trigger time according to the local risk model. When the remaining safety time slots allow cloud side participation, the endpoint uses the segmented risk boundaries to correct local predictions and arbitrates based on the earlier risk arrival time when predictions diverge. Thus, the risk boundaries formed by the cloud-side group data can enter the endpoint's decision-making process when time permits. Late, outdated, or incompatible cloud side results will not occupy local shutdown execution time, and the endpoint-cloud collaboration process corresponds to the risk evolution time and the actual execution time.

[0017] 2. The security contract divides state subdomains according to operational phases and constrains the continuity of risk boundaries between adjacent segments through shared boundary records. This ensures that when the endpoint state trajectory crosses a state subdomain, the risk arrival time calculation can be completed along the continuous boundary, reducing prediction jumps caused by boundary segment switching. The endpoint establishes a latency ledger consisting of communication round-trip latency, cloud-side processing latency, and local execution latency, and forms corresponding latency envelopes for normal communication segments, jittery communication segments, and interruption recovery segments, ensuring that the remaining security time slots use latency criteria that match the current link state. After a shutdown event, the cloud constructs a counterfactual trajectory group based on the pre-triggered state segment, the divergence position, and the actual shutdown record. Only boundary segments intersecting with the divergence position and passing the common endpoint continuity check are written into the contract differential packet. The endpoint completes the contract update through independent version slots, shadow state trajectories, and atomic switching executed by state subdomain, avoiding intermediate states where some boundary segments have been replaced but the associated index has not yet been verified. By combining the arrival interval comparison of the recoverable boundary layer, the irreversible risk boundary layer, and the temporal trajectory tube, the end-side performs sequential processing on the uncertainty range of the predicted trajectory, so that the disagreement arbitration is based on the formation of continuous state trajectory, rather than relying on single sample values ​​or isolated risk scores. Attached Figure Description

[0018] Figure 1 A flowchart illustrating the overall workflow of a photovoltaic adapter safe and rapid shutdown system based on edge-cloud collaboration; Figure 2 This is a diagram showing the phase variation of directed distance; Figure 3 A comparison chart of risk arrival and remaining time slots; Figure 4A ladder diagram for the applicability of state subdomains; Figure 5 The delay envelope diagram for the communication segment; Figure 6 A comparison chart of boundary attribution values; Figure 7 This is a schematic diagram of the arrival interval of the temporal trajectory tube. Detailed Implementation

[0019] In one embodiment, a photovoltaic adapter safe and fast shutdown system based on edge-cloud collaboration includes a cloud-side contract terminal and an edge-side decision terminal. The cloud-side contract terminal generates a target adapter safety contract based on the state sequence, anomaly records, and communication latency of the photovoltaic adapter group. The safety contract includes the applicable state domain, segmented risk boundaries, data timeliness conditions, allowable model deviation, and the latest shutdown time limit. The edge-side decision terminal forms a state trajectory based on local sampling, predicts the risk arrival time using the local risk model and the safety contract, and calculates the remaining safety time slot based on the shutdown execution time, the upper limit of communication latency, and the validity period of the cloud-side result. When the remaining safety time slot is less than the time required for cloud-side determination, the state trajectory exceeds the applicable state domain, or the cloud-side result does not meet the data timeliness conditions, the shutdown trigger time is determined by the local risk model. Otherwise, the two risk arrival times are judged for consistency based on the allowable model deviation. If they are consistent, the local risk arrival time is corrected by the segmented risk boundary. If they are inconsistent, the earlier one is determined as the shutdown trigger time.

[0020] In this embodiment, please refer to Figure 1 The cloud-side contract terminal is deployed in a data processing environment capable of receiving operation records from multiple photovoltaic adapters, while the end-side decision terminal is deployed in the local execution environment of the existing control programs of each photovoltaic adapter. The two use adapter identifier, state epoch, and contract version as data association keys. The state sequence of the photovoltaic adapter group is formed by each end-side according to a unified field order. The fields include the existing sample quantity, sampling time, data quality marker, and local operation stage marker that can characterize the current operating state of the adapter. Anomaly records include continuous state segments before the anomaly occurs, shutdown trigger time, shutdown execution completion time, and recovery state. Communication latency includes the time difference between the data transmission time, cloud-side reception time, cloud-side result generation time, and end-side result reception time. The cloud-side contract terminal performs deduplication, out-of-order rearrangement, and version merging according to the association key. The end-side decision terminal only receives contract data that matches the local state epoch, avoiding old state sequences and old contract boundaries from entering the current shutdown determination process.

[0021] Specifically, the edge decision-making unit combines the state variables corresponding to the same sampling time into a state vector. For late-arriving data, it inserts it into its original position according to the sampling time. For data exceeding the current decision window, it retains it in the historical zone without writing back the currently executing trajectory. For short-term missing data, it uses bounded linear interpolation of the same state variable before and after the missing data. For continuously missing data, it writes an unusable mark and shortens the predictable length. Then, according to the dimensional benchmark in the safety contract, it performs center translation and scale normalization on each state variable. The normalized state vector, state change vector, and data quality mark are connected in chronological order to form a local state trajectory. The state change vector is formed by the difference between adjacent normalized state vectors. The difference between two consecutive state change vectors is used to characterize whether the change trend is accelerating. The data quality mark does not directly participate in the risk direction calculation, but is used to limit the maximum extension length of the predicted trajectory and the usable range of the cloud-side results.

[0022] In this embodiment, the segmented risk boundary is represented as a continuous boundary function in each applicable state subdomain. The boundary function takes a negative value on the safe side and a non-negative value on the risk side. The end-side decision-making end uses the boundary function value and the gradient norm of the boundary function at the current position to calculate the normalized directed distance. The specific calculation formula is as follows: ; in, This represents the normalized directed distance at the k-th sampling time within the q-th state subdomain. This represents the boundary function corresponding to the q-th state subdomain. Represents the normalized state vector. This represents the gradient of the boundary function at the normalized state vector. This indicates a positive number that prevents the gradient norm from being zero; when The gradient norm is 0.6. hour, The value is approximately -0.197, indicating that the state is still on the safe side. When subsequent sampling makes the boundary function value 0.03, the directed distance turns positive. The end-side decision-making terminal confirms that the state trajectory has crossed the corresponding segment risk boundary, rather than simply determining that it has crossed the boundary because a certain state quantity increases instantaneously.

[0023] Please refer to Figure 2 , Figure 2 The horizontal axis represents the continuous progression of the sampling sequence and prediction step, divided into the initial segment, the middle segment, the later segment, and the final segment. The vertical axis represents the normalized directed distance. The black solid line corresponds to the end that emphasizes the change in directed distance after projection, the gray dashed line corresponds to the cloud-side boundary approaching the result, and the gray threshold line represents the risk-side boundary. Figure 2 The corresponding normalized directed distance formula in the text is used to explain that the boundary function value and the gradient norm together determine the position of the state point relative to the risk boundary.

[0024] from Figure 2 As can be seen, both curves continuously rise with the advancement of each stage. The initial segment remains in a relatively low distance range, indicating that the adapter state is still on the safe side during initial sampling. After entering the middle segment, the slopes of both curves increase significantly, indicating that the direction of change in the state variables has begun to push the trajectory closer to the risk side. The end-side reprojection curve and the cloud-side boundary approach curve have the same overall trend, indicating that there is no significant conflict in direction between the end-side local prediction results and the cloud-side contract boundary.

[0025] From the later stage to the final stage, the curve gradually approaches and stably crosses the risk-side boundary line, reflecting the combined effect of normalized state variables such as temperature, leakage current index, power change trend, and communication quality, causing the boundary function value to shift from the safe side to the risk side. If the end-side curve reaches the risk side before the cloud-side curve, the end-side decision-making end can prioritize the use of local triggering timing; if the two curves are close, the consistency judgment or boundary reprojection process can be initiated.

[0026] The local risk model uses recursive state transition relationships stored by state subdomain. The cloud-side contract terminal pre-determines the stable change relationships of each state variable between adjacent sampling times using local historical trajectories that have been time-aligned. The state transition coefficients that can be executed on the terminal side are registered along with the security contract. When the local risk model is running, it uses the current state vector, the current change vector, and the previous change vector as inputs to recursively generate local prediction trajectories within a finite prediction length. The contract prediction trajectory formed based on the security contract does not reuse local state transition coefficients. Instead, it reads the corresponding boundary proximity pattern based on the state subdomain, change direction, and feature order matched by the current state trajectory in the group abnormal trajectory library, and extrapolates the future directed distance sequence along the boundary proximity pattern. Both prediction trajectories are limited by data quality markers. During periods of continuous missing data, the trajectory cannot extend beyond the length supported by the most recent valid trajectory, and any prediction point carries its source version and generation time.

[0027] In this embodiment, the risk arrival time of the two predicted trajectories is determined according to the predicted point of first entering the risk side, and the specific calculation formula is as follows: , ; in, This represents the time required for the locally predicted trajectory to reach the risk boundary from the k-th sampling time. This represents the time required for the contract prediction trajectory to reach the risk boundary from the k-th sampling time. This represents the time interval between adjacent valid sampling times. and These represent the directed distances corresponding to the local predicted trajectory and the contractual predicted trajectory, respectively. and These represent the maximum number of samples allowed for the two predicted trajectories to extend; for example, the local directed distance sequence becomes non-negative at the 6th prediction point, and the contractual directed distance sequence becomes non-negative at the 5th prediction point, and In a unit of time, One time unit Each time unit retains the timing information of the contract prediction trajectory reaching the risk boundary earlier in subsequent arbitrations.

[0028] Furthermore, the endpoint decision-making unit extracts the upper bound of the shutdown execution time corresponding to the current running stage from the shutdown execution log, extracts the upper bound of the communication latency corresponding to the current communication segment from the latency ledger, calculates the validity period of the cloud-side result from the generation time and valid expiration time carried by the cloud-side result, and converts the latest shutdown time limit into the remaining time relative to the current sampling time; the remaining safe time slots are calculated according to the following formula: ; in, This represents the remaining safe time slots at the k-th sampling time. This indicates the remaining time since the latest shutdown time limit was last recorded, relative to the current sampling time. This indicates the remaining valid time of the cloud-based results from the current sampling time. This indicates the upper bound of the local shutdown execution time. Indicates the upper bound of the current communication delay. This represents the upper bound of the processing time required for the cloud side to complete the current decision; for example, , , , , , , hour, If it takes 7 time units for the cloud side to complete an additional decision, the edge decision-making end will no longer wait for the additional decision, but will continue to execute the local shutdown path.

[0029] Please refer to Figure 3 , Figure 3 The horizontal axis represents the continuous decision-making process on the endpoint using a phased representation of continuous decision sequence numbers, while the vertical axis represents the time unit. The curves represent the local arrival remainder, contract arrival remainder, latest deadline remainder, cloud-side effective remainder, and the remaining time slots after deducting execution and communication overhead. The legend indicates the source of the timing constraints corresponding to each curve. Figure 3 The corresponding risk arrival time formula and the remaining safety time slot formula.

[0030] from Figure 3As can be seen, both local arrival remainder and contract arrival remainder remain positive in the initial segment, indicating that the two predicted trajectories have not yet immediately entered the risk side. As the judgment sequence advances, the arrival remainder times of the two trajectories gradually decrease, indicating that the predicted trajectories continue to approach the risk boundary. The latest time limit remainder curve remains at a high level, indicating that the hard time limit reserved by the system still exists, but it cannot determine whether to wait for the cloud side result alone.

[0031] The effective remaining curve on the cloud side continuously decreases at each stage, reflecting that the validity period of the cloud side results gradually diminishes over time. The time slot curve after deduction is further superimposed with the local shutdown execution time, the current communication segment delay envelope, and the upper bound of the cloud side processing time, thus being closer to the actual available scheduling time. If this curve is lower than the time required for cloud side addition, the end-side decision-making end no longer waits for the cloud side to add the decision, but instead determines the trigger time along the local path.

[0032] After each state trajectory is generated, the edge decision-making terminal performs an applicable state domain verification. The applicable state domain is jointly defined by the range of state variable values, the combination of state change directions, and the operation stage marker. When the state vector is within the numerical range but the combination of change directions does not belong to the current state subdomain, the state trajectory is still determined to exceed the applicable state domain. The data timeliness condition is also verified by checking the cloud side result generation time, contract version, state epoch, and maximum data staleness. If any one of them does not match, the cloud side result is set to be ineligible for the current decision. When the remaining safe time slot is less than the time required for cloud side decision, the state trajectory exceeds the applicable state domain, or the cloud side result does not meet the data timeliness condition, the edge decision-making terminal reads the time corresponding to the earliest non-negative directed distance along the local prediction trajectory and writes the earlier of the time and the latest shutdown time limit into the local shutdown scheduling queue.

[0033] When the cloud-side results meet the participation conditions, the edge decision-making end compares the risk change direction and risk arrival time difference of the two predicted trajectories within the common prediction interval. The model bias is allowed to include directional tolerance and temporal tolerance. The directional tolerance is used to accommodate short-term flat periods and does not allow the safe direction and risk direction to cancel each other out. The temporal tolerance is represented by the model bias interval recorded in the safety contract. When both predicted trajectories move towards the risk boundary and the risk arrival time difference falls within the temporal tolerance interval, the edge decision-making end reprojects the directed distance of the local predicted trajectory using the segmented risk boundary. The boundary intersection is determined by linear interpolation between two adjacent predicted points, and the local risk arrival time is corrected using the time corresponding to the intersection point. When the risk change direction is inconsistent or the time difference exceeds the tolerance interval, the risk score is not averaged. The two risk arrival times are directly compared and the earlier one is selected. At the same time, the end of the common trajectory segment is retained as the starting position for subsequent divergence replay.

[0034] In this embodiment, the shutdown trigger time is written to the edge-side monotonic event queue. The events in the queue include the state epoch, contract version, prediction source, risk arrival time, remaining safe time slots, and a summary of the state fragment before triggering. The edge-side execution environment processes the events in the order of their times and does not allow lower state epochs to overwrite higher state epochs. After the shutdown is completed, the edge-side decision-making end continues to collect existing state variables until an observation fragment that can determine the state is stable is formed. The actual time of entering the safe state, the continuous observation interval, the divergence position, and the prediction source used are uploaded to the cloud-side contract end. The cloud-side contract end associates this record with other adapter records under the same contract version for subsequent state subdomain reconstruction and boundary fragment updates. The edge continues to use the current safe contract until the new contract completes version verification, and the local shutdown execution is not interrupted by the upload process.

[0035] In a preferred embodiment, the cloud-side contract terminal divides the state sequence of the photovoltaic adapter group into state subdomains according to the operation stage. For each state subdomain, it extracts the change direction, duration interval, and feature order of the abnormal trajectory before entering the risk state, and constructs the corresponding segmented risk boundary accordingly. It establishes boundary continuity constraints for the overlapping trajectories of adjacent state subdomains and generates an applicability label based on the coverage of the recent state trajectory of the target adapter in each state subdomain. The cloud-side contract terminal encapsulates the segmented risk boundary, boundary continuity constraints, applicability label, data timeliness conditions, and latest shutdown time limit according to the same contract version, and establishes an association index between the contract version and the local risk model version of the target adapter.

[0036] Specifically, the operational phase is not divided using a single state quantity threshold, but is determined by the stable interval of the state vector, the combination of change directions, and the existing operational phase markers. The cloud-side contract terminal first maps the group state sequence to a unified normalized coordinate system, and then uses trajectory segments that continuously maintain the same combination of change directions as candidate segments. The candidate segments are then assigned to state subdomains according to the proximity of the initial state and the order of subsequent risk evolution. The change direction of the abnormal trajectory before entering the risk state is represented by the sign combination of the difference between adjacent state vectors, the duration interval is represented by the sampling range of the same sign combination appearing continuously, and the feature order is represented by the order in which different state quantities enter the abnormal change interval. The cloud-side contract terminal only writes the change relationship that repeatedly appears in multiple abnormal records and whose time order does not contradict each other into the boundary proximity mode. Occasional isolated changes are retained as unconfirmed samples and do not directly change the segmented risk boundary.

[0037] The segmented risk boundaries of each state subdomain are jointly determined by the outer envelope of the safe trajectory within the state subdomain and the inner envelope of the abnormal trajectory before entering the risk state. The cloud-side contract terminal selects a continuous surface between the two types of envelopes that can ensure the abnormal trajectory is crossed before the safe trajectory as a candidate boundary. Then, a shared boundary record is generated by the intersection of the overlapping trajectories of adjacent state subdomains in the common coordinate system. Boundary continuity constraints limit the adjacent boundary segments to have the same state coordinates at the common endpoint and restrict abrupt changes in the tangential direction of the two sides of the boundary. When the candidate boundary does not meet the constraints, the cloud-side contract terminal only adjusts the boundary segments within the overlapping interval and does not move the non-overlapping boundary segments that have been verified by the actual shutdown record. The segmented risk boundaries formed in this way can change shape with the operation phase while maintaining the continuous reference relationship when the state trajectory is projected across subdomains.

[0038] In this embodiment, the applicability label is represented by the degree of time decay coverage of the recent state trajectory over the state subdomain, and the specific calculation formula is as follows: ; in, This represents the applicability of the q-th state subdomain. Let K represent the set of recent sampled indices used to evaluate the q-th state subdomain, and let K represent the current sampled index. This represents a time decay factor that is greater than 0 and less than 1. Indicates the first If a normalized state vector satisfies the combination of the numerical range and direction of change of the q-th state subdomain, it is set to 1; otherwise, it is set to 0. For example, the judgment results of four consecutive samples are 1, 1, 0, and 1 in chronological order. When the corresponding weights are 0.512, 0.64, 0.8, and 1, respectively, the results are... The value is approximately 0.73. Based on this, the cloud-side contract terminal retains the eligibility of the q-th state subdomain and records the 3rd sampling position that does not meet the conditions as a possible subdomain transition point.

[0039] Please refer to Figure 4 , Figure 4 The horizontal axis represents the state trajectory coverage process from earlier to latest sampling, expressed in stages based on recent sampling positions. The vertical axis represents applicability. The solid black line represents cumulative applicability, the gray dashed line represents the single-point attenuation contribution, and the horizontal dashed line represents the eligibility line. Figure 4 The corresponding time decay coverage formula for the applicable state domain is used to explain whether the recent state trajectory still falls within the current state subdomain.

[0040] from Figure 4As can be seen, the cumulative applicability remains at a high level throughout the entire phase, indicating that the recent state trajectory of the target adapter mostly still meets the numerical range, combination of change directions, and operational phase marking requirements of the current state subdomain. The single-point decay contribution curve is low in the early stage and rises rapidly in the later stage, reflecting that the time decay weight has a greater influence on the latest sampling point.

[0041] From the later to the final stage, the contribution of single-point attenuation increases significantly, indicating that the latest state point has a stronger impact on the current applicability determination. When a recent sampling point does not meet the state subdomain conditions, the corresponding contribution will be suppressed, further reducing the cumulative applicability; if the cumulative applicability is lower than the retention qualification line, the cloud-side result, even if still within the validity period, cannot directly participate in the current shutdown determination.

[0042] In a preferred embodiment, the end-side decision-making terminal maintains a delay ledger consisting of a communication round-trip delay sequence, a cloud-side processing delay sequence, and a local shutdown execution delay sequence. It extracts time-updated delay upper envelopes from the communication round-trip delay sequence and the cloud-side processing delay sequence, respectively. The difference between the expected time when the state trajectory reaches the segmented risk boundary and the current sampling time is used to subtract the local shutdown execution delay upper bound, the communication delay upper envelope, and the cloud-side processing delay upper envelope to form a candidate safe time slot. The smaller of the candidate safe time slot and the remaining duration of the cloud-side result's effective cutoff time relative to the current sampling time is determined as the remaining safe time slot. When any delay sequence is consecutively missing, an alternative delay boundary is generated using the delay upper envelope before the missing sequence and the current state trajectory change rate. The delay ledger is updated according to the sampling order after the arrival of valid delay samples.

[0043] The latency ledger is stored using an append-only method. The round-trip latency is obtained by the difference between the sending timestamp on the end side and the receiving timestamp on the cloud side. The cloud-side processing latency is obtained by the difference between the timestamp of the cloud side receiving the status data and the timestamp of generating the judgment result. The local shutdown execution latency is obtained by the difference between the timestamp of the triggering event entering the local scheduling queue and the timestamp of the shutdown completion record. To avoid fixed deviations between device clocks from being included in the calculation, cross-end cloud latency is obtained through the round-trip relationship within the same message. The cloud-side processing latency is calculated by the difference within the cloud side's own clock, and the local shutdown execution latency is calculated by the difference within the end side's own clock. Each record in the latency ledger is associated with the state epoch, contract version, and operating phase. The end-side decision-making end only uses historical records that are the same as or can be mapped to the current operating phase to construct the latency envelope.

[0044] During periods of continuous loss, the edge decision-making terminal reads the most recent delay envelope before the loss and converts the directed distance change rate of the current state trajectory into a risk approximation acceleration. When the risk approximation acceleration is non-positive, the original delay envelope is maintained. When the risk approximation acceleration is positive, the safety retention amount is increased according to the length of the loss, forming an alternative delay boundary. The alternative delay boundary is only used to determine whether the cloud-side result can participate in the current event and is not written back to the historical valid sample area. After the valid delay sample is recovered, the edge decision-making terminal inserts the recovered sample into the delay ledger according to the sampling time. It does not reverse-write the shutdown events that have been completed before the recovery, but only recalculates the communication delay envelope and the cloud-side processing delay envelope from the current event corresponding to the recovered sample to maintain the temporal monotonicity of the shutdown decision.

[0045] In a preferred embodiment, the edge decision-making terminal maps the local predicted trajectory output by the local risk model and the contract predicted trajectory generated based on the security contract to a unified state coordinate system, and determines the candidate time when the two predicted trajectories first cross the corresponding segment risk boundary. When the risk change directions of the two predicted trajectories are inconsistent or the difference between the candidate times exceeds the time tolerance in the allowable model deviation, the common trajectory segment before the divergence occurs is extracted, and the directed state distance from the end of the common trajectory segment to the respective segment risk boundary is calculated. The predicted trajectory with the earlier candidate time is selected first. When the candidate times are within the same time tolerance range, the predicted trajectory with the smaller directed state distance is selected. The earlier time between the candidate time of the selected predicted trajectory and the latest shutdown time limit is determined as the shutdown trigger time. At the same time, the end position of the common trajectory segment is recorded as the divergence position.

[0046] The unified state coordinates are defined by the order of state variables, center translation, scale variables, and state subdomain mapping relationships in the safety contract. The local predicted trajectory is already within the coordinates when it is generated. If the contract predicted trajectory comes from the group abnormal trajectory library, it is first restored to dimensionless relative change according to the normalization benchmark of the source adapter, and then reprojected to the unified state coordinates according to the normalization benchmark of the target adapter. The end-side decision end uses the same prediction sampling interval for the two trajectories. When the original prediction intervals are different, the shorter interval is used as the common interval. Boundary-constrained interpolation is performed on the longer interval trajectory. The interpolation point must not cross the segmented risk boundary that neither the adjacent original prediction point has crossed. The common trajectory segment starts from the current measured state and extends until the position where the risk change direction of the two predicted trajectories first differs or the directional distance difference continuously expands beyond the allowable model deviation.

[0047] In a preferred embodiment, the cloud-side contract terminal establishes a contract index tree for each state subdomain, consisting of a state subdomain identifier, a boundary segment identifier, and an applicability tag, and writes the common endpoints of adjacent segment risk boundaries into a shared boundary record. After receiving the pre-trigger state segment from the target adapter, the location where the local risk model output and the contract prediction result based on the security contract first show different risk directions in the pre-trigger state segment is determined as the divergence location. The contract index tree path traversed by the pre-trigger state segment is retrieved, and the boundary segments intersecting with the divergence location within the path are determined as segments to be updated. A contract differential package is generated using the shared boundary record as an update constraint. The end-side decision terminal verifies the contract differential package according to the contract version, state subdomain identifier, and boundary segment identifier. The verified boundary segments are written into the candidate contract area, and the original boundary segments and associated indexes not involved are retained in the candidate contract area.

[0048] The root node of the contract index tree records the contract version and target adapter identifier. Intermediate nodes are organized according to the running stage and state subdomain. Leaf nodes record boundary fragment identifiers, boundary function coefficients, common endpoint references, applicability tags, and fragment summaries. After a pre-trigger state fragment enters the cloud side, the cloud-side contract end generates an access path according to the state subdomain to which each state vector belongs, and projects the divergence position onto the parameter range of the corresponding boundary fragment. Only fragments whose parameter range intersects with the projected neighborhood of the divergence position and whose actual shutdown records indicate that the original boundary failed to maintain the correct timing are included in the set to be updated. Boundary fragments that have not been passed, boundary fragments that have been passed but have not intersected with the divergence position, and fragments that have been confirmed by multiple shutdown records within the same state epoch remain unchanged.

[0049] The contract differential package includes the source contract version, the target contract version, the content of the fragment to be updated, the shared boundary record reference, the set of unupdated fragment summaries, and the associated index summary. The end-side decision-making end first confirms that the source contract version is consistent with the current security contract, and then checks whether the state subdomain identifier and the boundary fragment identifier have a reference basis. Subsequently, it checks whether the common endpoint of the new fragment is consistent with the common endpoint of the retained fragment based on the shared boundary record. After the verification is passed, the new fragment is written to the position corresponding to its identifier in the candidate contract area. Fragments not involved are retained through the original version read-only reference. The associated index is only generated as a candidate version copy after all new fragments are written. Therefore, the differential update will not form an executable state where the old and new boundary fragments are mixed but the index relationship has not yet been established.

[0050] In a preferred embodiment, the end-side decision-making terminal divides the continuous records in the delay ledger into normal communication segments, jitter communication segments, and interruption recovery segments according to the presence of continuous missing data and the incremental direction of round-trip delay between adjacent communications. It also records the generation time, reception time, and applicable contract version of the cloud-side result within each communication segment. For jitter communication segments, the non-negative increments of adjacent round-trip delay samples are accumulated to the segment-first delay sample to form a forward delay envelope. For interruption recovery segments, the interruption duration, the queuing time of the first data packet after recovery, and the upper delay envelope before the interruption are combined to form a recovery delay envelope. When calculating the remaining safe time slots, the delay envelope corresponding to the current communication segment is selected, and the time consumed from the generation time to the reception time is deducted from the effective duration of the cloud-side result. When the effective duration after deduction is not greater than the upper bound of the local shutdown execution delay, the cloud-side result is marked as not eligible for the current decision.

[0051] Communication segment division is based on the continuity of valid records in the delay ledger. A normal communication segment is defined as a segment with no missing records and where the positive and negative increments of the round-trip delay between adjacent communications alternate within a finite range. A jittery communication segment is defined as a segment with no missing records but where non-negative increments accumulate continuously. An interrupted recovery segment is defined as a segment with consecutive missing records and the first valid round-trip record appearing after recovery. The forward delay envelope and the recovery delay envelope are formed according to the following formula: ; in, This represents the delay envelope of the c-th communication segment at the nth record. This represents the set of valid indexes for the nth record or later within the current communication segment. Indicates the first One communication round-trip delay sample, This indicates the additional duration of the communication segment. The normal communication segment and the jittery communication segment are set to 0. The interrupt recovery segment is the sum of the interrupt duration and the queuing time of the first data packet after recovery. For example, when the continuous delay samples in the jittery communication segment are 3, 5, and 4 time units, the non-negative increment accumulates to obtain an envelope of 5 time units. If there is an interrupt of 6 time units and the first data packet after recovery queues for 2 time units, the recovery delay envelope is increased by 8 time units based on the original envelope.

[0052] Please refer to Figure 5 , Figure 5 The horizontal axis represents the progression of consecutive records in the delay ledger using a staged representation of communication record sequence numbers, while the vertical axis represents the delay envelope. Solid black lines represent communication samples, dashed gray lines represent the forward envelope, and dotted gray lines represent the recovery envelope. The legend indicates the communication segment type corresponding to each curve. Figure 5 The corresponding communication delay envelope formula is used to explain the constraints of the current communication segment on the cloud-side participation conditions.

[0053] from Figure 5As can be seen, the communication sample curve is generally in the lower range with local fluctuations, indicating that the round-trip delay of ordinary communication remains controllable in most stages. The forward envelope curve is higher than the communication sample curve and gradually rises with each stage, reflecting that the non-negative increments of adjacent delays in jittery communication segments are accumulated into the upper bound, avoiding the end-side underestimation of the worst arrival time of the cloud-side results.

[0054] The recovery envelope curve is in the highest range and rises further in the latter part, indicating that the interruption recovery segment not only considers the delay changes before and after the interruption, but also adds the interruption duration and the queuing time of the first data packet after recovery. When this curve is significantly higher than that of the normal communication sample, it means that the worst-case time for the cloud-side result to reach the end side is significantly lengthened, and the remaining safe time slots are compressed accordingly.

[0055] In a preferred embodiment, the end-side decision-making terminal divides each segmented risk boundary into a recoverable boundary layer and an irreversible risk boundary layer based on whether the historical abnormal trajectory returns to the applicable state domain within the latest shutdown time limit after crossing the segmented risk boundary. The terminal then calculates the time intervals at which the local predicted trajectory and the contractual predicted trajectory enter the two boundary layers. When both predicted trajectories have an irreversible risk boundary layer arrival interval, the lower bounds of each arrival interval are compared. If the lower bounds fall into the same time tolerance interval, the directed state distance integrals from the recoverable boundary layer to the irreversible risk boundary layer of the two predicted trajectories are further compared. When only one predicted trajectory has an irreversible risk boundary layer arrival interval, the directed state distance sequence of the other predicted trajectory is extended according to the original sampling period. If the zero point obtained from the extension does not fall into the arrival interval and the remaining safe time slot is less than the upper bound of the arrival interval, the shutdown trigger time is determined by the predicted trajectory with the arrival interval.

[0056] The recoverable boundary layer consists of the intersection points of historical trajectories that, after crossing the boundary, return to the applicable state domain within the latest shutdown time limit and do not form a continuous anomaly. The irreversible risk boundary layer consists of the intersection points of trajectories that, after crossing the boundary, continue to evolve towards the risk side and trigger actual shutdown. The cloud-side contract terminal keeps the irreversible risk boundary layer located on the risk side of the recoverable boundary layer within the same state subdomain. The end-side decision terminal records the prediction times for each predicted trajectory: the first contact with the recoverable boundary layer, the complete crossing of the recoverable boundary layer, the first contact with the irreversible risk boundary layer, and the complete crossing of the irreversible risk boundary layer. The arrival interval is composed of the first contact and the complete crossing times, so that the prediction uncertainty is retained in time intervals rather than compressed into a single boundary crossing point.

[0057] When the lower bound of the irreversible risk boundary layer arrival interval of two predicted trajectories is within the tolerance interval at the same time, the end-side decision-making terminal accumulates the absolute value of the directed state distance at the sampling interval within the prediction interval from the first entry into the recoverable boundary layer to the first entry into the irreversible risk boundary layer. The smaller the integral obtained, the closer the trajectory is to the irreversible risk boundary between the two layers. When only one trajectory has an irreversible risk boundary layer arrival interval, the other trajectory extends with the rate of change formed by the most recent continuous directed distance difference. The extension process maintains the original sampling period and must not exceed the maximum prediction length allowed by the data quality mark. If the extension zero point does not enter the existing arrival interval and the remaining safe time slot is shorter than the upper bound of the arrival interval, the lower bound of the existing arrival interval is directly used as the candidate shutdown time without waiting for the extended trajectory to form a new intersection point.

[0058] In a preferred embodiment, before generating the contract differential packet, the cloud-side contract terminal constructs a counterfactual trajectory group with the first state of the state segment as the common starting point and the actual shutdown trigger state as the verification endpoint, based on the pre-trigger state segment, the divergence position, the local risk model output, the contract prediction result, and the actual shutdown record. The pre-trigger state segment is kept unchanged, and the segment to be updated is replaced sequentially to obtain the boundary factor trajectory. The segmented risk boundary is kept unchanged, and the local risk model output after the divergence position is replaced sequentially to obtain the model factor trajectory. The time intervals at which the boundary factor trajectory and the model factor trajectory first cross the corresponding segmented risk boundary are determined. The segment to be updated that only changes the time interval of the boundary factor trajectory relative to the original contract prediction result is written into the update set. A common endpoint continuity check is performed on the update set based on the shared boundary record, and the updated set that passes the check is encoded into the contract differential packet.

[0059] The counterfactual trajectory group is generated under the same normalized state coordinates and the same sampling interval. The common starting point is the first valid state of the pre-trigger state segment, and the verification endpoint is the measured state corresponding to the actual shutdown trigger time. The boundary factor trajectory keeps the local risk model output and the pre-trigger state segment unchanged, and only replaces one boundary segment to be updated with a candidate segment obtained by fitting other verified abnormal trajectories in the same state subdomain. The model factor trajectory keeps all segment risk boundaries unchanged, and only replaces the local prediction increment after the divergence position with the candidate prediction increment in the same state subdomain that is consistent with the actual trajectory direction. Only one factor is replaced each time. After the replacement, the time interval of the first contact and the complete crossing of the risk boundary is recalculated to prevent the boundary change and model change from occurring simultaneously and making it impossible to determine the source of the divergence.

[0060] In this embodiment, the boundary attribution value of the segment to be updated is calculated according to the following formula: ; in, This represents the boundary attribution value of the p-th boundary segment to be updated. This represents the midpoint of the interval at which the trajectory of the boundary factor first crosses the risk boundary after replacing the p-th boundary segment. This represents the midpoint of the interval at which the trajectory of model factors, output by the local risk model after replacing the divergence position, first crosses the risk boundary. This indicates the actual shutdown trigger time; for example, if the midpoint obtained after boundary segment replacement differs from the actual shutdown trigger time by 1 time unit, and the model output shows the midpoint obtained after replacement differing from the actual shutdown trigger time by 4 time units, then... The cloud-side contract end identifies the fragment as a candidate fragment whose boundary factors are closer to the actual trajectory, and continues to check the continuity of adjacent common endpoints, without simultaneously rewriting the local model association index.

[0061] Please refer to Figure 6 , Figure 6 The horizontal axis represents the single-factor replacement objects, including fragment A, fragment B, model increment A, and model increment B. The vertical axis represents the time difference. A bar below the zero line indicates that the boundary factor trajectory is closer to the actual shutdown trigger time, while a bar above the zero line indicates that the model increment trajectory is closer to the actual trigger time. Figure 6 The formula for the corresponding boundary attribution quantity.

[0062] from Figure 6 As can be seen, the bars for fragments A and B are located below the zero line, with fragment A exhibiting a larger negative amplitude. This indicates that, while keeping the pre-trigger state fragments unchanged, simply replacing the corresponding boundary fragments can make the boundary factor trajectory closer to the actual shutdown trigger time. This result suggests that the relevant boundary fragments are more likely to be the main factor causing the deviation between the contract prediction and the actual trigger timing.

[0063] The bars for model increments A and B are located above the zero line, indicating that when the local prediction increments are updated by simply replacing the divergence positions while keeping the segmented risk boundaries unchanged, the model factor trajectories are less close to the actual triggering times than the boundary factor trajectories. This avoids the problem of unclear divergence sources caused by simultaneously modifying both the boundary segments and the local model output.

[0064] The updated set must also meet the condition of single-factor change in time interval, that is, after replacing a certain boundary segment, the arrival interval of the boundary factor trajectory changes relative to the original contract prediction result. However, while keeping the candidate boundary segment unchanged, replacing the local risk model output will not cause the arrival interval to cross the actual shutdown trigger time. The cloud-side contract end sorts the candidate segments that meet the conditions according to the contract index tree path, and verifies the coordinates of the common endpoint and tangential direction of each candidate segment and the previous and next retained segments in turn. If multiple adjacent candidate segments change the same common endpoint at the same time, they are merged into a continuous update interval. When generating the contract difference package, the common endpoints of the first and last segments of the interval and the order of the internal segments are written. Based on this, the end side can complete the consistency verification according to the continuous interval.

[0065] In a preferred embodiment, the end-side decision-making terminal pairs each actual state with the predicted state of the local predicted trajectory and the contract predicted trajectory at the next sampling time within the common trajectory segment, forming two sets of directed deviation sequences according to the direction and continuous order of the prediction deviations. The directed deviation sequences are translated along the corresponding predicted trajectory to construct the local temporal trajectory tube and the contract temporal trajectory tube, and the time when each temporal trajectory tube first contacts and completely crosses the irreversible risk boundary layer is taken as the lower and upper bounds of the arrival interval, respectively. When the two arrival intervals overlap, the continuous sampling length of each temporal trajectory tube on the side of the irreversible risk boundary layer in the overlapping interval is compared, and the temporal trajectory tube with the larger continuous sampling length is selected. The earlier time between the lower bound of its arrival interval and the latest shutdown time limit is determined as the shutdown trigger time.

[0066] After each actual state is paired with the predicted state at the next sampling time, the end-side decision-making terminal projects the actual state onto the segmented risk boundary to obtain the actual directed distance, and projects the predicted state onto the same boundary to obtain the predicted directed distance. The difference between the two is taken as the single directed prediction bias. A continuously positive directed prediction bias indicates that the actual trajectory is closer to the risk side than the predicted trajectory, and a continuously negative bias indicates that the actual trajectory is closer to the safety side than the predicted trajectory. The end-side decision-making terminal retains the sign and order of occurrence of the bias, and replaces isolated reverse biases with the smaller absolute value of adjacent same-direction biases to prevent single sampling disturbances from expanding the width of the trajectory tube. The local risk model and the contract prediction results form independent bias sequences, and the average between the two sets of sequences is not calculated.

[0067] The temporal trajectory tube centers on the predicted directed distance sequence, using the minimum and maximum values ​​of the directed deviation sequence within the common trajectory segment as the lower and upper translation amounts, and calculates the irreversible risk boundary layer arrival interval according to the following formula: , , , ; Where r represents the local predicted trajectory or the contractual predicted trajectory. This represents the directed distance of the corresponding predicted trajectory at the h-th prediction point relative to the center of the irreversible risk boundary layer. This represents the set of directed deviations within a common trajectory segment. and These represent the directed distances on the lower and upper sides of the temporal trajectory tube, respectively. and These represent the time of first contact and the time of complete crossing of the irreversible risk boundary layer, respectively. For example, when the directional distance of the center is -0.02 at the 4th prediction point, and the minimum value of the deviation set is -0.03 and the maximum value is 0.04, the upper distance is 0.02 and forms the lower bound of the arrival interval, while the lower distance is still -0.05. The upper bound of the arrival interval needs to be determined by subsequent prediction points.

[0068] Please refer to Figure 7 , Figure 7 The horizontal axis represents the future prediction interval in a phased representation of the prediction step, and the vertical axis represents the normalized distance. The solid black line represents the center distance, the gray dashed line and the gray dotted line represent the lower and upper distances, respectively, and the horizontal dashed line represents the irreversible boundary. Figure 7 The corresponding temporal trajectory tube formula is used to explain how the prediction bias expands into the arrival interval.

[0069] from Figure 7 As can be seen, the center distance, lower distance, and upper distance are all in the lower range at the beginning, and then continue to rise as the prediction step progresses, indicating that the overall predicted trajectory is moving towards the irreversible risk boundary. The upper and lower side curves form a narrow trajectory tube around the center curve, reflecting the range of directional deviation between the actual state and the predicted state within the common trajectory segment.

[0070] From the initial to the middle section, the trajectory tube width remains relatively stable, indicating that the prediction bias has not yet significantly increased. From the later to the final section, all three curves approach and cross the irreversible boundary, indicating that regardless of whether center prediction is used or upper and lower biases are considered, the trajectory enters the risk side. The upper distance reaches the boundary first, corresponding to the moment of first contact, while the lower distance subsequently crosses the boundary, corresponding to the moment of complete crossing.

[0071] When the arrival intervals of two temporal trajectory tubes overlap, the end-side decision-making terminal counts the continuous sampling lengths of the upper and lower sides located on the risk side of the irreversible risk boundary layer point by point within the overlapping interval. If only the upper side is located on the risk side, the corresponding sampling point is only used to maintain the interval and is not included in the complete crossing length. The temporal trajectory tube with the larger continuous sampling length is selected as the source of the shutdown timing. When the continuous sampling lengths are the same, the lower bound of the corresponding arrival interval is compared. If they are still the same, the directed state distance at the end of the common trajectory segment is compared. The earlier of the determined lower bound of the arrival interval and the latest shutdown time limit is written into the shutdown scheduling queue. The original center prediction trajectory, deviation sequence and trajectory tube boundary are simultaneously saved to the pre-trigger state segment.

[0072] In a preferred embodiment, the edge decision-making end sets independent version slots for the current security contract and the candidate contract, writes the contract differential packet into the version slot corresponding to the candidate contract, and performs boundary segment replacement on the shadow state trajectory isolated from the real-time shutdown output; calculates the risk arrival time of the current security contract and the candidate contract respectively using the most recent valid state trajectory, and determines the version switching duration based on the number of boundary segments to be replaced and the order of related index verification; when the applicable state domain of the candidate contract covers the current state trajectory, the candidate contract version is higher than the current contract version, the corresponding cloud side result meets the data timeliness condition, and the remaining security time slot is greater than the version switching duration, the version slot pointer is switched atomically at the granularity of the state subdomain, and the latest shutdown time limit in the current security contract is retained before the candidate contract completes all related index verification.

[0073] The current security contract version slot is only allowed to be read by the real-time shutdown process on the edge side, and differential packets are not allowed to directly overwrite it. The candidate contract version slot allows the writing of boundary fragments, shared boundary records and associated indexes, but does not output results to the real-time shutdown process. The shadow state trajectory is formed by copying the most recent valid measured state. When copying, the sampling time, state epoch and data quality mark are retained. Then, the current security contract and the candidate contract are loaded respectively to calculate the risk arrival time. The two calculations use the same local risk model output and the same prediction length, only changing the segmented risk boundary and its index reference. If the candidate contract cannot locate the state subdomain, the common endpoint is discontinuous, or the risk arrival time is earlier than the trajectory start time on the shadow state trajectory, the edge decision end cancels the switchable mark of the candidate version slot and retains the differential packet for cloud-side review.

[0074] The version switching duration is formed by sequentially accumulating the reading and verification duration of the boundary fragment to be replaced in the candidate contract, the verification duration of the shared boundary record, the reconstruction duration of the associated index, and the submission duration of the version slot pointer. The duration is taken as the upper bound of the most recent version switching records of the same type on the end side, rather than the shortest single record. The switching conditions are judged item by item using data at the same current sampling time. The applicable state domain coverage is jointly verified by the combination of state vector and change direction. The version level is verified by the monotonic version number. The data timeliness is verified by the cloud side result generation time and the maximum data staleness. The remaining security time slots are recalculated by the latency envelope of the current communication segment. If any condition is not met, the candidate contract remains in an isolated state, and the process is shut down in real time to continue reading the current security contract, so as to avoid the distortion of the condition combination caused by the version judgment spanning multiple sampling times.

[0075] Atomic switching is performed at the state subdomain level. The edge decision-making end first locks the version slot pointer of the state subdomain to which the current state trajectory belongs. It takes the boundary fragment, shared boundary record, and associated index corresponding to the state subdomain in the candidate contract as a commit object. After verifying the commit object digest, it replaces the pointer all at once and then releases the read lock. Other uninvolved state subdomains still point to the original boundary fragment in the current security contract. Independent switching is completed before the subsequent state trajectory enters the corresponding state subdomain. Before all associated indexes of the candidate contract are verified, the latest shutdown timeout always reads the record of the current security contract. Even if the candidate contract gives a later timeout, it will not enter the real-time shutdown calculation. If the candidate contract gives an earlier timeout, it is only used as a verification condition for the shadow trajectory. It will take effect uniformly after the candidate version becomes the current security contract.

Claims

1. A photovoltaic adapter safe and fast shutdown system based on edge-cloud collaboration, characterized in that, This includes the cloud-side contract side and the terminal-side decision side; The cloud-side contract terminal generates a target adapter security contract based on the state sequence, anomaly records and communication delays of the photovoltaic adapter group. The security contract includes the applicable state domain, segmented risk boundaries, data timeliness conditions, allowable model deviations and the latest shutdown time limit. The end-side decision-making terminal forms a state trajectory based on local sampling, uses the local risk model and the security contract to predict the risk arrival time, and calculates the remaining security time slots based on the shutdown execution time, the upper limit of communication delay, and the validity period of the cloud-side results. When the remaining safety time slot is less than the time required for cloud-side determination, the state trajectory exceeds the applicable state domain, or the cloud-side result does not meet the data timeliness conditions, the shutdown trigger time is determined by the local risk model; otherwise, the consistency of the two risk arrival times is judged according to the allowable model deviation. If they are consistent, the local risk arrival time is corrected by the segmented risk boundary; if they are inconsistent, the earlier one is used to determine the shutdown trigger time.

2. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 1, characterized in that, The cloud-side contract terminal divides the state sequence of the photovoltaic adapter group into state subdomains according to the operation stage. For each state subdomain, it extracts the change direction, duration interval and feature order of the abnormal trajectory before entering the risk state, and constructs the corresponding segmented risk boundary accordingly. Establish boundary continuity constraints for overlapping trajectories of adjacent state subdomains, and generate applicability labels based on the coverage of the recent state trajectories of the target adapter in each state subdomain; The cloud-side contract encapsulates the segmented risk boundary, the boundary continuity constraint, the applicability marker, the data timeliness condition, and the latest shutdown deadline according to the same contract version, and establishes an association index between the contract version and the local risk model version of the target adapter.

3. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 2, characterized in that, The endpoint decision-making terminal maintains a latency ledger consisting of a communication round-trip latency sequence, a cloud-side processing latency sequence, and a local shutdown execution latency sequence, and extracts the latency upper envelope updated over time from the communication round-trip latency sequence and the cloud-side processing latency sequence, respectively. The difference between the estimated time when the state trajectory reaches the segmented risk boundary and the current sampling time is used to deduct the upper bound of the local shutdown execution delay, the upper envelope of the communication delay, and the upper envelope of the cloud-side processing delay to form a candidate safe time slot. The smaller of the candidate safe time slot and the remaining duration of the cloud-side result effective cutoff time relative to the current sampling time is determined as the remaining safe time slot. When any time delay sequence is continuously missing, an alternative time delay bound is generated using the upper envelope of the time delay before the missing time delay and the rate of change of the current state trajectory, and the time delay ledger is updated according to the sampling order after the valid time delay sample arrives.

4. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 2, characterized in that, The edge decision-making terminal maps the local prediction trajectory output by the local risk model and the contract prediction trajectory generated based on the security contract to a unified state coordinate, and determines the candidate moment when the two prediction trajectories first cross the corresponding segment risk boundary. When the risk change directions of the two predicted trajectories are inconsistent or the difference between the candidate times exceeds the time tolerance in the allowed model deviation, the common trajectory segment before the divergence occurs is extracted, and the directed state distance from the end of the common trajectory segment to the risk boundary of each segment is calculated. The predicted trajectory with the earlier candidate time is selected first. When the candidate times are within the same time tolerance range, the predicted trajectory with the smaller directed state distance is selected. The candidate time of the selected predicted trajectory and the earlier time in the latest shutdown time limit are determined as the shutdown trigger time. At the same time, the end position of the common trajectory segment is recorded as the divergence position.

5. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 4, characterized in that, The cloud-side contract terminal establishes a contract index tree for each state subdomain, consisting of a state subdomain identifier, a boundary segment identifier, and the applicability tag, and writes the common endpoints of adjacent segment risk boundaries into a shared boundary record. After receiving the pre-trigger state fragment fed back by the target adapter, the position where the local risk model output and the contract prediction result formed based on the security contract first show different risk directions in the pre-trigger state fragment is determined as the divergence position. The contract index tree path traversed by the pre-trigger state fragment is retrieved, the boundary fragment intersecting with the divergence position in the path is determined as the fragment to be updated, and the contract difference package is generated using the shared boundary record as the update constraint. The end-side decision-making terminal verifies the contract differential packet according to the contract version, state subdomain identifier, and boundary fragment identifier. It writes the verified boundary fragments into the candidate contract area and retains the original boundary fragments and associated indexes that are not involved in the candidate contract area.

6. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 3, characterized in that, The end-side decision-making terminal divides the continuous records in the delay ledger into normal communication segments, jitter communication segments, and interruption recovery segments according to the incremental direction of whether there are continuous missing records and the round-trip delay of adjacent communications, and records the generation time, reception time, and applicable contract version of the cloud-side results in each communication segment. For the jittery communication segment, the non-negative increments of the round-trip delay samples of adjacent communications are accumulated into the segment-first delay sample to form a forward delay envelope; For the interrupt recovery segment, the interrupt duration, the queuing time of the first data packet after recovery, and the upper envelope of the delay before the interrupt are combined into a recovery delay envelope; When calculating the remaining safe time slots, the delay envelope corresponding to the current communication segment is selected, and the time consumed from the generation time to the receiving time is deducted from the effective duration of the cloud-side result. When the effective duration after deduction is not greater than the upper limit of the local shutdown execution delay, the cloud-side result is marked as not eligible to participate in the current determination.

7. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 6, characterized in that, The end-side decision-making terminal divides each segment risk boundary into a recoverable boundary layer and an irreversible risk boundary layer based on whether the historical abnormal trajectory returns to the applicable state domain within the latest shutdown time limit after crossing the segment risk boundary. It also calculates the time intervals between the local predicted trajectory and the contract predicted trajectory entering the two boundary layers respectively. When both predicted trajectories have an irreversible risk boundary layer arrival interval, the lower bounds of each arrival interval are compared, and when the lower bounds fall into the tolerance interval at the same time, the directed state distance integrals of the two predicted trajectories from the recoverable boundary layer to the irreversible risk boundary layer are compared. When only one predicted trajectory has the irreversible risk boundary layer arrival interval, the directed state distance sequence of the other predicted trajectory is extended according to the original sampling period. If the zero point obtained by the extension does not fall into the arrival interval and the remaining safe time slot is less than the upper limit of the arrival interval, the shutdown trigger time is determined by the predicted trajectory with the arrival interval.

8. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 5, characterized in that, Before the cloud-side contract terminal generates the contract differential package, it constructs a counterfactual trajectory group with the first state of the state segment as the common starting point and the actual shutdown trigger state as the verification endpoint, based on the pre-trigger state segment, the divergence position, the local risk model output, the contract prediction result, and the actual shutdown record. Keep the pre-trigger state segment unchanged and replace the segment to be updated in turn to obtain the boundary factor trajectory. Keep the segmented risk boundary unchanged and replace the local risk model output after the divergence position in turn to obtain the model factor trajectory. The time intervals at which the boundary factor trajectory and the model factor trajectory first cross the corresponding segmented risk boundary are determined respectively. The segments to be updated that only change the time intervals of the boundary factor trajectory relative to the original contract prediction result are written into the update set. The common endpoint continuity check is performed on the update set according to the shared boundary record, and the update set that passes the check is encoded into the contract difference packet.

9. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 7, characterized in that, Within the common trajectory segment, the end-side decision-making terminal pairs each actual state with the predicted state of the local predicted trajectory and the contractual predicted trajectory at the next sampling time, forming two sets of directed deviation sequences according to the direction and successive order of the prediction deviation. The directed deviation sequence is translated along the corresponding predicted trajectory to construct the local temporal trajectory tube and the contractual temporal trajectory tube, and the time when each temporal trajectory tube first touches and completely crosses the irreversible risk boundary layer is taken as the lower and upper bounds of the arrival interval, respectively. When two arrival intervals overlap, the continuous sampling lengths of each temporal trajectory tube within the overlapping interval located on one side of the irreversible risk boundary layer are compared. The temporal trajectory tube with the larger continuous sampling length is selected, and the earlier time between the lower boundary of its arrival interval and the latest shutdown time limit is determined as the shutdown trigger time.

10. The photovoltaic adapter safe and fast shutdown system based on end-to-cloud collaboration according to claim 8, characterized in that, The end-side decision-making terminal sets up independent version slots for the current security contract and candidate contracts respectively, writes the contract differential packet into the candidate contract fragment corresponding to the current candidate contract, and performs the boundary fragment replacement on the shadow state trajectory isolated from the real-time shutdown output. Calculate the risk arrival time of the current security contract and the candidate contract using the most recent valid state trajectory, and determine the version switching duration based on the number of state replacement boundary segments and the verification order of associated indexes. When the applicable state domain of the candidate contract covers the current state trajectory, the candidate contract version is higher than the current contract version, the corresponding cloud-side result meets the data timeliness condition, and the remaining security time slot is greater than the version switching duration, the version slot pointer is switched atomically with the state subdomain as the granularity, and the latest shutdown time limit in the current security contract is retained before the candidate contract completes all associated index verification.