Automatic test method for drawing of photovoltaic power station

Through automated testing methods, photovoltaic power station drawings are parsed and multi-threaded processing and topology structure verification are performed, which solves the problems of low manual efficiency and insufficient result credibility in photovoltaic power station drawing testing, and realizes efficient and reliable test result analysis and fault location.

CN120653557APending Publication Date: 2025-09-16BEIJING SHANGFANG SMART CLEAN ENERGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510718550.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing technologies in photovoltaic power station drawing testing have problems such as low manual efficiency, incomplete multi-dimensional anomaly detection, scattered result analysis, and insufficient data credibility. In particular, it is difficult to fully cover the test boundaries in complex power station drawing scenarios, and there is a lack of spatial analysis of test results and error tracing mechanisms.

Method used

An automated testing method is adopted, including reading photovoltaic power station design drawing files in various formats, parsing the drawing content and extracting structured data. Through multi-threaded parallel processing, topology structure consistency verification, standardized error calculation and spatial thermal map generation, closed-loop verification is combined with cryptographic fingerprint technology to achieve automated and multi-dimensional test result analysis.

Benefits of technology

It realizes the automation and efficiency of photovoltaic power station drawing testing, improves test coverage and diagnostic efficiency, ensures the reliability and credibility of test results, can quickly locate fault areas and prevent data tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653557A_ABST
    Figure CN120653557A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of testing, and discloses an automatic testing method for a photovoltaic power station drawing, which comprises the following steps of: firstly, reading a multi-format file of a photovoltaic power station design drawing, loading and running in an isolation sandbox environment, and then analyzing the content of the drawing to extract structural data such as electrical parameters, a topological relation and a bill of materials; based on the extracted data, a test task is executed through a multi-thread parallel mechanism, after a preliminary result is generated, the preliminary result is automatically compared with a preset reference file to analyze the difference, and finally error levels are divided according to the comparison result, and a comprehensive test report is generated. The test efficiency is optimized through dynamic scheduling, and the problem of resource idleness is solved; dual verification of parameters and connection is realized through topology verification and error analysis, and a detection blind area is eliminated; visualizing fault distribution and quantifying quality by a thermodynamic diagram and a scoring model; hash chain tamper-proofing guarantees data credibility, and the automation level and the result reliability of photovoltaic drawing testing are comprehensively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to an automated testing method for photovoltaic power station drawings. Background Art

[0002] In the field of photovoltaic power station design software development and verification, existing technologies mainly revolve around general software testing frameworks. For example, a Chinese patent, publication number CN201110448108.3, provides a software automation testing method, in which the system automatically generates corresponding test scripts based on test requirements and test cases, and then executes the test scripts according to a preset execution strategy. The present invention can realize the automatic generation and execution of test scripts, thereby improving the efficiency of software automation testing. The patent proposes a script automatic generation and execution scheme based on test cases, which improves test efficiency through preset strategies. However, this type of method has significant limitations in photovoltaic design scenarios: Its testing logic focuses on code verification at the software functional level and is unable to adapt to the unique multimodal data characteristics of photovoltaic blueprints (such as electrical parameter correlations and spatial topological relationships), resulting in a single-dimensional test coverage. Specifically, photovoltaic blueprint testing requires simultaneous verification of complex indicators such as component physical connections, coordinate positioning accuracy, and bill of materials consistency. Traditional scripts can only verify numerical calculation modules and lack the ability to detect key issues such as topological errors and coordinate offsets.

[0003] In current industry practice, the testing process for photovoltaic design software is still highly dependent on manual intervention. Testers need to manually prepare a large number of drawing samples as test cases, and then compare the differences between the output data such as voltage calculation values ​​and cable selection results and the benchmark files item by item after running. This model faces two bottlenecks: first, manually designed test cases are difficult to cover the diverse scenarios of complex power station drawings (such as shadow obstruction of mountain power stations, mixed connection of multiple MPPT branches, etc.), and the test boundary range is limited; second, the bill of materials verification relies on manual visual inspection, which is prone to problems such as component model misjudgment and connector number statistics omission, and the reliability of the test results is affected by subjective factors. The more prominent contradiction is that the existing technology lacks a spatial analysis and error tracing mechanism for test results. When parameter anomalies occur, engineers need to spend a lot of time manually locating the coordinates of the faulty component and its associated nodes in the drawing, which seriously restricts the efficiency of test iteration. Summary of the Invention

[0004] The purpose of the present invention is to provide an automated testing method for photovoltaic power station drawings, which solves the problems of low manual efficiency, incomplete multi-dimensional anomaly detection, scattered result analysis and insufficient data credibility in photovoltaic power station drawing testing.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: An automated testing method for photovoltaic power station drawings comprises the following steps: S1. Read photovoltaic power station design drawing files in various formats; S2. Run the test program in the isolated environment and load the design drawing file; S3. Parse the drawing content in the design drawing file and extract structured data, including electrical parameters, component topology relationships, and bill of materials; S4, based on the structured data output by S3, uses multi-threaded parallel processing to execute the test task and generate test results; S5. Automatically compare and analyze the test results with the benchmark file to generate a comparison result; S6. Generate a test report including error level classification based on the comparison results.

[0006] Preferably, said S1 comprises the following steps: S1-1. Scan .dwg, .svg, and .pdf files in local storage and network shared directories; S1-2, calculating the file priority weight; S1-3. Verify file integrity through hash values ​​and generate an ordered processing queue.

[0007] Preferably, the calculation formula for the file priority weight in step S1-2 is as follows: Among them, W i is the priority weight value of the i-th file; α is the weight coefficient of the file size; β is the weight coefficient of the file version; size(f i ) is the storage size of the i-th file; size max The maximum size of all files in the current processing queue; version(f i )The quantized value of the version number of the i-th file.

[0008] Preferably, said S2 comprises the following steps: S2-1. Create an independent Docker container as a test sandbox. S2-2, dynamically allocate memory resources; S2-3. Set up a heartbeat detection mechanism to trigger exception processing when the resource usage rate is greater than 85%.

[0009] Preferably, said S3 comprises the following steps: S3-1, perform affine transformation to convert the drawing coordinates into the geographic coordinate system; S3-2, construct component adjacency matrix based on Delaunay triangulation algorithm; S3-3. Apply the environmental compensation model to correct electrical parameters.

[0010] Preferably, said S4 comprises the following steps: S4-1. Dynamically allocate the number of threads according to the dynamic thread allocation formula; S4-2. Create a priority queue based on the complexity of the drawing; S4-3. A three-level retry mechanism is used to handle abnormal tasks, with retry intervals increasing by 10s, 30s, and 60s.

[0011] Preferably, the dynamic thread allocation formula is as follows: Among them, N core is the number of CPU physical cores, C i is the complexity of a single drawing, C base is the baseline complexity value, 0.8 is the core utilization adjustment coefficient, N thread The number of threads to be eventually allocated.

[0012] Preferably, the S5 comprises the following steps: S5-1. Calculate the relative error of numerical parameters; S5-2. Verify the consistency of the topological structure. If the proportion of common subgraph edges is less than 95%, it is considered a structural error. S5-3. Generate repair suggestion probability based on historical error library.

[0013] Preferably, the formula for calculating the relative error of the numerical parameter in step S5-1 is as follows: Among them, δ is the standardized relative error, v test is the parameter value actually measured or calculated during the test, v base is the benchmark reference value, and ε is the minimum protection value.

[0014] Preferably, the S6 comprises the following steps: S6-1. Construct a quality scoring model; S6-2, generate a heat map to show the spatial distribution of errors; S6-3. Embed version fingerprint.

[0015] In summary, the present invention includes at least one of the following beneficial technical effects: 1. The present invention adopts dynamic thread allocation and priority queue scheduling technology to achieve the optimal allocation of test task processing resources. Compared with the fixed thread pool or static task sorting mechanism in the existing technology, it solves the problems of processing delay or resource idleness caused by differences in task complexity during large-scale drawing testing. Traditional methods are prone to thread blocking in scenarios with mixed high- and low-complexity tasks. The present invention dynamically allocates task weights through real-time calculation to ensure stable operation under high load.

[0016] 2. The present invention introduces a technical solution for topological structure consistency verification and standardized error fusion analysis, achieving the dual verification effect of electrical parameters and physical connection relationships. Existing technologies are mostly limited to single numerical comparison. The present invention uses edge ratio threshold judgment and relative error calculation to simultaneously discover numerical deviation and structural misalignment problems.

[0017] 3. This invention utilizes a spatial heat map and quality scoring model to achieve a synergistic presentation of fault distribution visualization and overall quality quantitative assessment. Compared to traditional plain text reports, this solution overcomes the pain point of manual analysis requiring repeated comparison of drawing coordinates. Engineers can intuitively identify fault clusters through color block density and quickly determine repair priorities based on scoring levels, improving diagnostic efficiency.

[0018] 4. This invention embeds cryptographic fingerprints and closed-loop verification technology to achieve full-link tamper-proofing of test results. Compared with conventional electronic signatures that only protect single files, this invention binds test data, analysis results, and visualization layers through a hash chain. Any data change in any link will trigger a verification anomaly. Traditional methods make it difficult to trace differences in multiple versions of reports. This invention can accurately locate data tampering nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Schematic diagram of the method of the present invention. DETAILED DESCRIPTION

[0020] The following is combined with Figure 1 , the present invention is described in further detail.

[0021] The present invention provides an automated testing method for photovoltaic power station drawings, comprising the following steps: S1. Read photovoltaic power station design drawing files in various formats; This step enables intelligent collection and preprocessing of multi-source heterogeneous drawing files, providing standardized input for subsequent automated testing. The file reading operation forms a data flow connection with the test environment initialization module and data parsing module, ensuring the integrity and traceability of file resources before loading into the isolated sandbox.

[0022] In this embodiment, the storage location of the photovoltaic power station design drawings is accessed through a multi-protocol file interface. In some embodiments, the storage location includes but is not limited to: The project file directory on the local disk; Shared folders of enterprise NAS network storage; A drawing repository in a version control system (such as Git / SVN).

[0023] Specifically, the file scanning engine identifies target files based on the extension filtering mechanism. Generally, the supported file types include at least: AutoCAD drawing files (.dwg format); Vector graphics files (.svg format); Portable Document File (.pdf format).

[0024] In one possible implementation, when multiple versions of the same drawing are detected, a version conflict warning is automatically triggered. For example, if PVArray_v1.2.dwg and PVArray_v1.3.dwg exist, a version difference report is generated for the user to make a decision.

[0025] In this embodiment, a quantitative evaluation model is used to determine the file processing order, and its calculation formula is defined as: Among them, W i is the priority weight of the i-th file, and the higher the weight value, the higher the processing priority; α is the file size impact factor, usually α∈[0.6,0.8], with an optimal value of 0.7; β is the version impact factor, satisfying α+β=1, and a typical value of 0.3; size(f i ) is the physical storage size of the i-th file (unit: MB); size max The dynamic value of the maximum file size in the current processing queue; version(f i ) is the numerical conversion result of the version number, for example: Semantic version v2.3.1 is converted to 2+0.3+0.01=2.31; The integer version v5 directly takes the value 5.

[0026] In some embodiments, when an urgent test task is detected, the new version file can be prioritized by setting α = 0.2 and β = 0.8. This parameter adjustment strategy is linked to the task scheduler to respond to changes in test requirements in real time.

[0027] In this embodiment, a double check mechanism is performed before the file is loaded into the test sandbox: Integrity verification: Generate a file hash value based on the SHA-256 algorithm. The verification formula is: SHA256(f i )≡H base mod2 64 ; Among them H base This is the pre-stored baseline hash value. If the verification fails, the file is moved to the quarantine area and an alarm is triggered.

[0028] Version consistency check: Compare the modification timestamp in the file metadata with the version management system record. When the deviation exceeds the threshold ΔT max = 300s, it is determined to be an abnormal version.

[0029] The files that pass the above verification are sorted in descending order of priority weight to generate an ordered processing queue Q = {f1, f2, ..., f n}, its data structure satisfies: Among them, Q is the set of files after priority calculation and integrity verification; f i 、f j are the i-th and j-th files in the queue; i and j are the position numbers of the files in the queue; W i 、W j For file f i and f j The priority quantization value.

[0030] In one possible implementation, the queue generation module also outputs a manifest file with metadata, which contains the following fields: file name Hash value (first 8 digits) Priority Estimated processing time PV01.dwg 8a3f6c... 0.83 120s Connection with S2: The processing queue QQ is transmitted to the isolated environment through a secure channel. AES-256 encryption is implemented during the transmission process, and the key is dynamically generated by the hardware security module (HSM).

[0031] Exception handling mechanism: When the file scan times out (T scan >300s) or the verification failure rate exceeds the threshold (P fail >5%), the system self-check process is automatically triggered and the status code 0xE1 is sent to the monitoring center.

[0032] Dynamic parameter adjustment: The weight factors α and β can be dynamically optimized based on the historical task execution efficiency. The optimization goal is: in, Predict processing time based on priority; is the actual processing time of the i-th file in the test environment; According to the priority weight W i Predicted processing time for the i-th file.

[0033] S2. Run the test program in the isolated environment and load the design drawing file; This step builds a controlled test execution environment to achieve secure loading of drawing files and resource isolation. The isolated environment dynamically connects to the file processing queue generated in step S1 and provides stable runtime support for data parsing in step S3.

[0034] In this embodiment, an independent test space is created through containerization technology. In some embodiments, a lightweight virtualization environment is instantiated using the Docker engine. Specifically, the container configuration includes the following key technical features: Resource limit: Set the upper limit of CPU cores to N core ×0.8, the memory limit is Among them, C i is the drawing complexity, N core is the total number of physical CPU cores on the host machine, 0.8 is the maximum CPU resource limit available to the container, and 20% of the computing power is reserved for system processes.

[0035] Network isolation: Disable external network access and only allow communication with local file storage services File mounting: Map the file queue Q that has passed the verification in step S1 to the specified input directory in the container. In one possible implementation, when the container is started, environment variables are injected to control the strictness level and version compatibility policy of the test program. For example, setting TEST_MODE=strict means enabling the strict verification mode.

[0036] In this embodiment, the memory allocation strategy is adaptively adjusted based on the complexity of the drawing. In general, the memory allocation formula is defined as: Where M is the memory capacity allocated to the current task (unit: GB); C i is the quantified value of the drawing complexity from step S3, C i = 0.6n components + 0.4n nodes; is the floor operator For example, when processing C i =380 complex drawings: This algorithm ensures that memory allocation is a power of 2 and adapts to the physical page management mechanism of computer hardware.

[0037] In this embodiment, resource over-limit warning is achieved through heartbeat detection. Specifically: Detection cycle: Collect container metrics every 5 seconds. Threshold condition: Trigger an alarm when CPU usage > 85%, memory usage > 85%, or disk IO latency > 200ms is detected three times in a row. Action: Freeze the current task and generate a core dump file. Retrieve the action plan based on the predefined error code, restart the container instance, and retry the task (up to three times). In one possible implementation, the anomaly detection module outputs a monitoring log with a timestamp, recording resource excess events and handling status.

[0038] S3. Parse the drawing content in the design drawing file and extract structured data, including electrical parameters, component topology relationships, and bill of materials; The purpose of performing affine transformation to convert the drawing coordinates into the geographic coordinate system is to eliminate the nonlinear deviation between the drawing coordinate system and the real geographic space, ensuring that the component position accuracy meets the engineering requirements (±0.1m).

[0039] Transformation matrix parameter definition: Affine transformation matrix T affine The six degrees of freedom parameters of are calculated by fitting the control points using the least squares method: Among them, the control point pair {(x k ,y k )→(x′ k ,y′ k )} Extract from the drawings, including at least four reference points with known GPS coordinates (such as power station boundary stakes); By solving the system of equations Determine a,b,c,d,e,f.

[0040] Example calculation: The coordinates of a photovoltaic array corner point on the drawing are (1000,500) pixels. The geographic coordinates are calculated using the transformation matrix: x′=a·1000+b·500+c; y′=d·1000+e·500+f; If a=0.05, b=0, c=116.4012°, d=0, e=0.05, f=39.9015°, then: x′=0.05×1000+0+116.4012=116.4512°E; y′=0+0.05×500+39.9015=39.9265°N; Residual check: Calculate the transformation residuals for all control points If the maximum residual e max >0.2m, Then the manual calibration process is triggered; Among them, e k is the coordinate transformation residual of the kth control point; x k ′ and y k ′ is the actual geographic coordinate of the kth control point; x k,calc with y k,calc The calculated coordinates of the kth control point are obtained by the affine transformation matrix T affine The converted coordinate value.

[0041] The purpose of constructing the component adjacency matrix based on the Delaunay triangulation algorithm is to identify the physical connection relationship between photovoltaic components and provide a data structure for electrical topology verification.

[0042] Vertex set generation: Extract the center point coordinates of all photovoltaic modules {p l =(x′ l ,y′ l )}, where l=1,2,...,N PV . Filter duplicate points: If ||p l -p g ||<0.05m, merge into the same vertex.

[0043] Delaunay mesh algorithm: The improved Bowyer-Watson algorithm is used, and the key parameters are as follows: Super triangle: the initial bounding box is expanded by 10% to avoid border effects; Empty circle determination tolerance: δ = 0.001m, used for floating point calculation error compensation; Edge flipping condition: If the four points are cocircular and the radius error is >δ, the old edge is deleted and a new edge is inserted.

[0044] Adjacency Matrix Construction: Definition A lg ∈{0,1} indicates whether components l and g are directly connected.

[0045] Connection determination rules: Among them, d max The maximum allowable connection distance is 5m by default, which is set according to the standard spacing of photovoltaic brackets (4.8m to 5.2m); E Delaunay The edge set generated by the Delaunay algorithm.

[0046] In some embodiments, weights are added to adjacent edges: d base=2m is the reference distance, used for normalization; Purpose: The weight value is passed to step S4 for calculating the line impedance Z lg =w lg ·Z unit , where Z lg is the equivalent impedance between components l and g (unit: ohm, Ω); w lg is the normalized weight coefficient based on component spacing; Z unit It is the reference impedance per unit distance (unit: ohm / meter, Ω / m).

[0047] The purpose of applying the environmental compensation model to correct electrical parameters is to correct theoretical electrical parameters according to environmental factors and improve the actual consistency of test results.

[0048] Input parameter definition: V raw : Theoretical voltage value marked on the drawing (unit: V); ΔT=T ambicnt -25℃: the difference between the ambient temperature and the standard value; shadow_rate: shadow occlusion rate, calculated by image analysis to determine the area ratio of obscured components; wind_speed: wind speed (unit: m / s), obtained in real time from the meteorological database.

[0049] Correction formula: Among them, γ is the temperature compensation coefficient, which is obtained based on the temperature characteristic curve fitting of the photovoltaic cell; σ is the shadow attenuation coefficient, which is calibrated by the shadow occlusion experiment (R 2 =0.94); μ is the air cooling heat gain coefficient, which is determined based on fluid mechanics simulation and measured data.

[0050] Exception handling: If the corrected parameters exceed the safety range (such as ), a red alarm is generated and the test task is suspended. When the wind speed is greater than 15m / s or the temperature is greater than 50℃, the extreme working condition compensation model is enabled: in, is the final corrected voltage under extreme working conditions (unit: V); The voltage median value after basic environment compensation (unit: V); wind speed is the real-time monitored ambient wind speed (unit: m / s); 0.005 is the voltage attenuation rate caused by each 1 m / s increase in wind speed after exceeding the limit (unit: m / s); 15 is the critical wind speed that triggers the extreme correction model (unit: m / s).

[0051] S4, based on the structured data output by S3, uses multi-threaded parallel processing to execute the test task and generate test results; This step enables efficient scheduling and fault-tolerant execution of test tasks, converting the electrical parameters, topology, and bill of materials analyzed in step S3 into an executable test instruction set. This multi-threading mechanism, along with the resource isolation strategy in step S2 and the data parsing module in step S3, forms a synergistic optimization, ensuring system stability and throughput under high load.

[0052] In this embodiment, the thread pool capacity is dynamically adjusted according to hardware resources and task load, and the calculation formula is defined as: Among them, N core is the total number of physical CPU cores of the host machine, which is the same as the container resource limit parameter in step S2 (such as N core =8); C i is the quantified value of the complexity of a single drawing, from formula C in step S3 i = 0.6n components + 0.4n nodes; C base The baseline complexity is set to C based on historical task statistics. base =200 (corresponding to the number of components ncomponents ≈ 120 and the number of nodes nnodes ≈ 200 in a typical drawing); 0.8 is the core utilization adjustment coefficient, which reserves 20% of the computing power for the host system process to prevent resource exhaustion.

[0053] Parameter acquisition: Extract ΣC from the output data of step S3 i (Total complexity of the current task queue).

[0054] Get N through the system call sysconf(_SC_NPROCESSORS_CONF) core .

[0055] Calculation example: If N core =8,∑C i =1500, then: Dynamic Adjustment: Recalculate N every 60 seconds thread , if the change ΔN thrcad ≥5, triggering thread pool expansion / contraction.

[0056] The upper limit of the number of threads is 2N corc (to prevent hyperthreading overload), the lower limit is N corc (Ensure basic concurrency capabilities).

[0057] In this embodiment, the task scheduler dynamically sorts tasks according to the complexity of the drawings and prioritizes high-complexity tasks to optimize resource utilization.

[0058] Priority determination: For task T k , its priority P k With complexity C k Positive correlation, the calculation formula is: Among them, C k is the single task complexity from step S3; wait time is the task waiting time (unit: seconds); θ = 0.01 is the time decay factor to prevent long-term starvation of low-complexity tasks. Queue management: a minimum heap data structure is used to maintain the priority in real time, and the top element of the heap is P k The biggest task.

[0059] When a new task arrives, the heap insertion operation is triggered, with a time complexity of O(logn).

[0060] Preemption rules: If a high priority task arrives and the number of currently active threads <N thread , immediately assign a thread to execute.

[0061] The currently executing low-priority task is not interrupted, and only the idle thread switches to the new task.

[0062] In this embodiment, the task fault tolerance rate is improved through a progressive retry strategy, and the retry interval is increased by 10s, 30s, and 60s, forming a double guarantee with the abnormality monitoring mechanism of step S2.

[0063] Retry conditions: The task is retried due to resource overload (CPU > 85%, memory > 85%), I / O timeout (> 200ms), or data verification failure.

[0064] Before each retry, do the following: Clear temporary files of the failed container (such as / tmp / task_*.cache) Reset the parsing context of step S3 (clear the shared memory segment shm_id) Retry interval calculation: Waiting time t for the mth retry m =10×3m-1s (m=1,2,3) For example: First retry: t1 = 10 seconds Second retry: t2 = 30 seconds Retry 3: t3 = 90 seconds (Note: The user described it as 60 seconds, which needs to be corrected to t3 = 10 × 32 = 90 seconds to maintain the geometric ratio, or declared as a fixed increasing sequence) Termination rules: If all three retries fail, the task status is marked as FATAL, the error log is recorded, and manual intervention is notified.

[0065] Log fields include: task ID, failure reason, retry timestamp, and resource usage snapshot.

[0066] S5. Automatically compare and analyze the test results with the benchmark file to generate a comparison result; This step implements automated verification of test results and problem location, performs multi-dimensional difference analysis based on the test data set output in step S4 and the pre-stored benchmark data, and generates a structured comparison report. This comparison process, together with the analysis module in step S3 and the task execution engine in step S4, forms a closed-loop verification system.

[0067] In this embodiment, the deviation between the test value and the reference value is quantified by the standardized error formula to ensure that the evaluation result is not affected by the dimension. The calculation formula is defined as: Where δ is the standardized relative error (dimensionless), which is used for cross-parameter comparison (such as voltage, current, power); v test is the parameter value actually measured or calculated during the test, which is derived from the test result of step S4; base is the benchmark reference value, which is extracted from the historical correct data that has passed manual review; ε is the minimum protection value (default 1×10 -6 ) to prevent the denominator from overflowing when the base value is close to zero. Specific implementation method: The test value is associated with the reference value based on the material code, such as the unique identifier of the photovoltaic module PV-CELL-001.

[0069] Set the error classification strategy: Deviation ≤ 5% is marked as passed; Deviations of 5% to 10% are marked as warnings; Deviations >10% were marked as failures.

[0070] Example: If the reference voltage is 600V and the test voltage is 630V, the calculated δ=5%, triggering a warning level prompt.

[0071] In this embodiment, the similarity between the test topology and the reference topology is verified by a graph theory algorithm, and a structural error is determined when the proportion of common subgraph edges is less than 95%. Specific implementation method: Input data: Test topology graph: The adjacency matrix from step S3, which represents the actual connection relationship between components.

[0073] Baseline topology: The standard connection relationship defined in the design specifications.

[0074] Public subgraph calculation: The maximum common subgraph matching algorithm is used to calculate the number of completely identical edges in the two graphs.

[0075] Edge ratio formula: Judgment rules: The edge proportion ≥95% was judged as consistent; When the edge ratio reaches 80% to 95%, manual review is triggered; An edge ratio of <80% is considered structural failure.

[0076] Exception handling: Generates location information for missing edges, such as "the connection between components PV-001 and PV-002 is not detected."

[0077] In this embodiment, a repair suggestion list sorted by probability is generated by matching historical error patterns with current abnormal features. Specific implementation method: Historical error database: contains error types, feature descriptions, repair solutions, and weights, for example: Lost connection (weight 0.32): The characteristic is insufficient edge ratio. The recommended repair is to check the terminal blocks. Voltage deviation (weight 0.28): The characteristic is that the numerical deviation is too high. The recommended repair is to calibrate the sensor.

[0079] Probability calculation: Based on the weighted sum of the similarity between the current abnormal characteristics and historical data, the calculation formula is: Among them, Q f is the repair suggestion probability value corresponding to the fth historical error (dimensionless); ω f,s is the weight coefficient of the sth feature in the fth historical error, which comes from the historical error library (e.g. ω1 = 0.32); c s is the actual eigenvalue of the current anomaly (such as R edge =0.92 or δ=0.12); h f,s is the historical feature threshold of the sth feature in the fth historical error (e.g., the historical threshold h for connection loss error). 1,1 =0.95).

[0080] Output the top five repair suggestions with the highest probability.

[0081] Example: If insufficient edge ratio and voltage deviation are detected, the system will prioritize "Check terminal blocks (62% probability)" and "Calibrate sensors (58% probability)".

[0082] S6. Generate a test report including error level classification based on the comparison results.

[0083] This step provides a comprehensive evaluation and visualization of the test results. Based on the comparative analysis data from step S5, a quality scoring model and spatialized error distribution map are constructed. Tamper-evident identification is also embedded to enhance the report's credibility. This report generation module, along with the anomaly detection logic from step S5 and the coordinate conversion data from step S3, forms an end-to-end closed loop.

[0084] In this embodiment, the quality scoring model outputs the comprehensive quality grade of the power station design by weighted fusion of multi-dimensional abnormal indicators. The calculation formula is defined as: Where S is the quality score (range 0 to 100), the higher the value, the better the design quality; λ r is the normalized occurrence frequency of the rth type of anomaly, and the calculation formula is in: N error,i is the actual number of anomalies of type r (e.g., the number of components with δ>0.1 in step S5); N total,i is the total number of detected anomalies of type r (such as the total number of components in step S5); w r is the weight coefficient of the rth type of anomaly, which is determined by expert evaluation and historical data fitting, and satisfies ∑w r =1. Specific implementation method: Abnormal classification: r=1: electrical parameter out of tolerance (weight w1=0.4); r = 2: topological structure deviation (weight w2 = 0.3); r = 3: isolated component (weight w3 = 0.2); r=4: other anomalies (weight w4=0.1).

[0086] Example calculation: A power station detected 15 out-of-tolerance components (100 in total), 10 topological deviation edges (500 in total), and 2 isolated components (100 in total). Then: S=(1-(15100×0.4+10500×0.3+2100×0.2))×100=(1-0.074)×100=92.6; The corresponding quality grade is A (90≤S≤100).

[0087] In this embodiment, the error locations are mapped to a geographic coordinate system through a spatial interpolation algorithm, and a heat map is generated to intuitively display the error clustering area. Specific implementation method: Coordinate transformation: The geographic coordinates of the error component (x i ′,y i ') Affine transformation result T from step S3 affine ·(x i ,y i ).

[0089] Coordinate set {(x1′,y1′),...,(x′ n ,y n ′)} Input kernel density estimation algorithm.

[0090] Thermal value calculation: The Gaussian kernel function is used to calculate the thermal value D(x,y) of any point (x,y) in geographic space: Among them, h is the bandwidth parameter, and the default value is 5% of the diagonal length of the power station area, that is, K(·) is the kernel function, defined as n is the total number of current abnormal points.

[0091] Visualization rendering: The thermal values ​​are normalized to the range of 0 to 1 and mapped to the color scale from red (high density) to green (low density).

[0092] The topological structure wireframe of step S3 is superimposed to form a composite visualization layer.

[0093] In this embodiment, a unique report identifier is generated through a cryptographic hash function to ensure data integrity and traceability.

[0094] Fingerprint generation algorithm: Input parameters include: Test result hash value H test =SHA3-256 (output data from step S5); Quality score S; Report generation timestamp t; User ID id .

[0095] Calculation formula: H report =SHA3-256(H test ⊕S⊕t⊕U id ); Embedding method: H report Write metadata area and footer watermark to PDF report; Blockchain evidence storage: Call the blockchain interface in step S5 to write to the distributed ledger.

[0096] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An automated testing method for photovoltaic power station drawings, characterized in that: The following steps are involved: S1. Read photovoltaic power station design drawing files in various formats; S2. Run the test program in the isolated environment and load the design drawing file; S3. Parse the drawing content in the design drawing file and extract structured data, including electrical parameters, component topology relationships, and bill of materials; S4, based on the structured data output by S3, uses multi-threaded parallel processing to execute the test task and generate test results; S5. Automatically compare and analyze the test results with the benchmark file to generate a comparison result; S6. Generate a test report including error level classification based on the comparison results.

2. The automated testing method for photovoltaic power station drawings according to claim 1, characterized in that: Said S1 comprises the following steps: S1-1. Scan .dwg, .svg, and .pdf files in local storage and network shared directories; S1-2, calculating the file priority weight; S1-3. Verify file integrity through hash values ​​and generate an ordered processing queue.

3. The automated testing method for photovoltaic power station drawings according to claim 2, characterized in that: The calculation formula of the file priority weight in step S1-2 is as follows: Among them, W i is the priority weight value of the i-th file; α is the weight coefficient of the file size; β is the weight coefficient of the file version; size(f i ) is the storage size of the i-th file; size max The maximum size of all files in the current processing queue; version(f i )The quantized value of the version number of the i-th file.

4. The automated testing method for photovoltaic power station drawings according to claim 1, characterized in that: The S2 comprises the following steps: S2-1. Create an independent Docker container as a test sandbox. S2-2, dynamically allocate memory resources; S2-3. Set up a heartbeat detection mechanism to trigger exception processing when the resource usage rate is greater than 85%.

5. The automated testing method for photovoltaic power station drawings according to claim 1, characterized in that: The S3 includes the following steps: S3-1, perform affine transformation to convert the drawing coordinates into the geographic coordinate system; S3-2, construct component adjacency matrix based on Delaunay triangulation algorithm; S3-3. Apply the environmental compensation model to correct electrical parameters.

6. The automated testing method for photovoltaic power station drawings according to claim 1, characterized in that: The S4 comprises the following steps: S4-1. Dynamically allocate the number of threads according to the dynamic thread allocation formula; S4-2. Create a priority queue based on the complexity of the drawing; S4-3. A three-level retry mechanism is used to handle abnormal tasks, with retry intervals increasing by 10s, 30s, and 60s.

7. The automated testing method for photovoltaic power station drawings according to claim 6, characterized in that: The dynamic thread allocation formula in step S4-1 is as follows: Among them, N core is the number of CPU physical cores, C i is the complexity of a single drawing, C base is the baseline complexity value, 0.8 is the core utilization adjustment coefficient, N thread The number of threads to be eventually allocated.

8. The automated testing method for photovoltaic power station drawings according to claim 1, characterized in that: The S5 comprises the following steps: S5-1. Calculate the relative error of numerical parameters; S5-2. Verify the consistency of the topological structure. If the proportion of common subgraph edges is less than 95%, it is considered a structural error. S5-3. Generate repair suggestion probability based on historical error library.

9. The automated testing method for photovoltaic power station drawings according to claim 8, characterized in that: The formula for calculating the relative error of numerical parameters in step S5-1 is as follows: Among them, δ is the standardized relative error, v test is the parameter value actually measured or calculated during the test, v base is the benchmark reference value, and ε is the minimum protection value.

10. The automated testing method for photovoltaic power station drawings according to claim 1, characterized in that: The S6 comprises the following steps: S6-1. Construct a quality scoring model; S6-2, generate a heat map to show the spatial distribution of errors; S6-3. Embed version fingerprint.

Citation Information

Patent Citations

  • Automatic software test method

    CN102541735A