Envelope generation method and apparatus
By automatically determining the scanning distance of the concave envelope algorithm and combining the final sub-envelope lines of the scattered block, the problems of poor envelope boundary accuracy and waste of manpower in photovoltaic power station design are solved, and high-precision envelope generation is achieved.
Patent Information
- Application Number
- CN202111202618.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-15
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-10-15
AI Technical Summary
In the prior art, the boundary accuracy of envelope generation in photovoltaic power station design is poor and requires manual adjustment of scanning distance, resulting in waste of manpower.
By dividing the scatters of the input data into multiple scatter blocks, and automatically determine the scanning distance of the concave packet algorithm based on the distance between the two nearest scatters in the scatter block, the final sub-envelope of the scatter block is generated, and the final sub-envelope lines are merged into the overall envelope.
It improves the boundary accuracy of the envelope, reduces manpower waste, ensures the accuracy of the overall envelope, and is suitable for photovoltaic power station design.
Smart Images

Figure CN113868724B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of photovoltaic power station design, and in particular, to a method and device for generating an envelope line. Background Art
[0002] In the design stage of a photovoltaic power station, it is necessary to determine the envelope line of the photovoltaic array to determine the occupied area of the photovoltaic array.
[0003] In the prior art, the concave hull algorithm is commonly used to generate the envelope line, and the boundary accuracy of the envelope line generated by the concave hull algorithm is related to the scanning distance.
[0004] However, currently the scanning distance usually needs to be manually adjusted, which causes a waste of manpower on the one hand; on the other hand, when the scattered points in the array are far apart, the boundary accuracy of the envelope line is poor. Summary of the Invention
[0005] The present invention provides a method and device for generating an envelope line to automatically determine the scanning distance, reduce the waste of manpower, and improve the boundary accuracy of the envelope line when the scattered points are far apart.
[0006] In a first aspect, an embodiment of the present invention provides a method for generating an envelope line, including:
[0007] Dividing the scattered points of the input data into multiple scattered point blocks, where each scattered point block includes multiple scattered points that can form a surface;
[0008] For each scattered point block, determining the scanning distance of the concave hull algorithm according to the distance between the two closest scattered points in the scattered point block, and generating the final sub-envelope line of the scattered point block according to the scanning distance;
[0009] Merging the final sub-envelope lines into an overall envelope line, where the overall envelope line is a complete closed polyline, and the overall envelope line encloses all the scattered points of the input data.
[0010] Optionally, dividing the scattered points of the input data into multiple scattered point blocks includes:
[0011] Determining the clustering distance according to each scattered point in the input data;
[0012] Dividing the scattered points of the input data into multiple scattered point blocks according to the clustering distance.
[0013] Optionally, determining the clustering distance according to each scattered point in the input data includes:
[0014] Obtaining the scattered point closest to each scattered point in the input data, and determining the average value of the distances between each scattered point and the closest scattered point as the clustering distance.
[0015] Optionally, the scatter points of the input data are divided into multiple scatter point blocks according to the clustering distance, including:
[0016] Based on the density clustering algorithm, the scatter points of the input data are divided into multiple scatter point blocks according to the clustering distance.
[0017] Optionally, for each scatter point block, the scanning distance of the concave hull algorithm is determined according to the distance between the two closest scatter points in the scatter point block, and the final sub-envelope of the scatter point block is generated according to the scanning distance, including:
[0018] For each scatter point block, the distance between the two closest scatter points in the scatter point block is used as the initial scanning distance of the concave hull algorithm, and the initial scanning distance is used as the scanning distance;
[0019] Based on the concave hull algorithm, the intermediate sub-envelope corresponding to the scatter point block is generated according to the scanning distance;
[0020] It is determined whether the intermediate sub-envelope is used as the final sub-envelope according to whether the intermediate sub-envelope forms a complete closed polyline and encloses all the scatter points in the corresponding scatter point block. When the intermediate sub-envelope is used as the final sub-envelope, the final sub-envelope is output. When the intermediate sub-envelope is not used as the final sub-envelope, the scanning distance is adjusted, and the step of generating the intermediate sub-envelope corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance is returned.
[0021] Optionally, it is determined whether the intermediate sub-envelope is used as the final sub-envelope according to whether the sub-envelope forms a complete closed polyline and encloses all the scatter points in the corresponding scatter point block. When the intermediate sub-envelope is used as the final sub-envelope, the final sub-envelope is output. When the intermediate sub-envelope is not used as the final sub-envelope, the scanning distance is adjusted, and the step of generating the intermediate sub-envelope corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance is returned, including:
[0022] Verify whether the intermediate sub-envelope forms a complete closed polyline and encloses all the scatter points in the scatter point block. If so, the intermediate sub-envelope is used as the final sub-envelope and output;
[0023] If not, the intermediate sub-envelope is not used as the final sub-envelope, the scanning distance is updated by increasing the scanning step length according to the scanning distance corresponding to the intermediate sub-envelope, and the step of generating the intermediate sub-envelope corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance is returned.
[0024] Optionally, the final sub-envelopes are merged into an overall envelope. The overall envelope is a complete closed polyline, and the overall envelope encloses all the scatter points of the input data, including:
[0025] Judge whether the total number of scatter point blocks is greater than 1;
[0026] If so, determine a first set of envelope points of a first sub-envelope line corresponding to a first scatter point block and a second set of envelope points of a second sub-envelope line corresponding to a second scatter point block according to the distances between each pair of scatter point blocks. The first scatter point block and the second scatter point block are the two scatter point blocks with the closest distance among all scatter point blocks. The envelope points in the first set of envelope points and the second set of envelope points are arranged in a set order, where the set order is clockwise or counterclockwise;
[0027] Redetermine the starting element of the set of preset envelope points according to the first envelope point of the first set of envelope points and the second envelope point of the second set of envelope points, and rearrange the envelope points in the set of preset envelope points in the set order with the starting element as the starting point of the set of preset envelope points; wherein, the first envelope point and the second envelope point are the envelope points with the closest distance in the first set of envelope points and the second set of envelope points;
[0028] Recombine the non-set envelope point set and the rearranged set of second preset envelope points into a single set of envelope points, and merge the first sub-envelope line and the second sub-envelope line into a recombined envelope line according to the single set of envelope points, and regard the first scatter point block and the second scatter point block as one scatter point block; wherein, either the first set of envelope points or the second set of envelope points is the set of preset envelope points, and the other is the non-set envelope point set;
[0029] Decrease the number of scatter point blocks by 1, and return to execute the step of judging whether the total number of scatter point blocks is greater than 1;
[0030] If not, output the recombined envelope line.
[0031] Optionally, recombining the non-set envelope point set and the rearranged set of second preset envelope points into a single set of envelope points, and merging the first sub-envelope line and the second sub-envelope line into a recombined envelope line according to the single set of envelope points, and regarding the first scatter point block and the second scatter point block as one scatter point block includes:
[0032] Insert the envelope points in the rearranged set of preset envelope points into the position of the preset envelope point in the non-set envelope point set to obtain a single set of envelope points. When the set of preset envelope points is the first set of envelope points, the position of the preset envelope point in the non-set envelope point set is the position of the second envelope point. When the set of preset envelope points is the second set of envelope points, the position of the preset envelope point in the non-set envelope point set is the position of the first envelope point;
[0033] Merge the first sub-envelope line and the second sub-envelope line into a recombined envelope line according to the single set of envelope points, and regard the first scatter point block and the second scatter point block as one scatter point block.
[0034] Optionally, the scatter points are the central coordinate points of the photovoltaic strings.
[0035] Second aspect, an embodiment of the present invention further provides an envelope generation device, which is characterized by including:
[0036] A division module, configured to divide the scatter points of the input data into multiple scatter point blocks, where each scatter point block includes multiple scatter points that can form a surface;
[0037] A sub-envelope generation module, configured to, for each scatter point block, determine the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generate the final sub-envelope of the scatter point block according to the scanning distance;
[0038] A merging module, configured to merge the final sub-envelopes into an overall envelope, where the overall envelope is a complete closed polyline that wraps all the scatter points of the input data.
[0039] The envelope generation method and device provided in this embodiment divide the scatter points of the input data into multiple scatter point blocks; for each scatter point block, determine the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generate the final sub-envelope of the scatter point block according to the scanning distance; that is, by automatically determining the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, on the one hand, it can avoid waste of manpower, and on the other hand, it can ensure that the determined scanning distance is not too large, thereby ensuring that the boundary accuracy of the final sub-envelope corresponding to the scatter point block obtained according to the scanning distance is relatively high. After determining the final sub-envelopes of each scatter point block, merge the final sub-envelopes into an overall envelope. Since the boundary accuracy of the final sub-envelope corresponding to each scatter point block is relatively high, the accuracy of the overall envelope formed by merging the final sub-envelopes can also be relatively high, thereby improving the accuracy of the overall envelope that wraps all the scatter points of the input data. Description of the Drawings
[0040] Figure 1 Is a flowchart of an envelope generation method provided by an embodiment of the present invention;
[0041] Figure 2 Is a flowchart of another envelope generation method provided by an embodiment of the present invention;
[0042] Figure 3 Is a flowchart of another envelope generation method provided by an embodiment of the present invention;
[0043] Figure 4 Is a flowchart of another envelope generation method provided by an embodiment of the present invention;
[0044] Figure 5 Is a structural schematic diagram of an envelope generation device provided by an embodiment of the present invention. Detailed Embodiments
[0045] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the convenience of description, only the parts related to the present invention rather than all the structures are shown in the drawings.
[0046] Figure 1 The flowchart of an envelope generation method provided by an embodiment of the present invention is applicable to the situation of determining the envelope of a photovoltaic array during the design stage of a photovoltaic power station. This method can be executed by an envelope generation device. Refer to Figure 1 This envelope generation method includes:
[0047] Step 110: Divide the scatter points of the input data into multiple scatter point blocks.
[0048] Among them, each scatter point block includes multiple scatter points that can form a surface.
[0049] Optionally, the scatter points of the input data are the central coordinate points of photovoltaic strings, where a photovoltaic string can include at least one photovoltaic module. Among them, a photovoltaic power station can include multiple photovoltaic strings, and the central coordinate point of each photovoltaic string corresponds to a scatter point of the input data. During the design stage of a photovoltaic power station, it is necessary to determine the envelope of the square formed by multiple photovoltaic strings of the photovoltaic power station. In this embodiment, the scatter points of the input data are divided into multiple scatter point blocks. Each scatter point block includes multiple scatter points, and the scatter points in each scatter point block need to satisfy the condition that they can form a surface. Specifically, when the scatter points are completely on a straight line, or a single scatter point cannot meet the requirement of forming a surface. Therefore, the scatter points in each scatter point block need to be more than one, and the scatter points in each scatter point block cannot be completely on a straight line. Specifically, the envelope points of the subsequent formed envelope line are all the scatter points in the scatter point block, or the scatter points in the outer diffusion point block formed by expanding each scatter point of the scatter point block. Therefore, when the scatter points in the scatter point block do not meet the requirement of forming a surface, a closed sub-envelope line that envelopes the scatter point block cannot be obtained. And when the scatter points in each scatter point block meet the requirement of forming a surface, it can enable the subsequent determination of the sub-envelope line, and the sub-envelope line can form a closed envelope structure, so that the sub-envelope line can envelope the corresponding scatter point block. Each scatter point block includes multiple scatter points that can form a surface, so the scatter points of the input data composed of the scatter points in each scatter point block can form a surface. Optionally, when dividing the scatter points of the input data into multiple scatter point blocks, existing clustering algorithms can be used to cluster and block the scatter points of the input data. Among them, the clustering algorithms used can be but are not limited to density clustering algorithms, neural network algorithms, and support vector machine algorithms.
[0050] Step 120: For each scatter point block, determine the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generate the final sub-envelope of the scatter point block based on the scanning distance;
[0051] Among them, the scanning distance of the concave hull algorithm can be used as the basis for finding the next envelope point based on a determined envelope point on the envelope line. Optionally, after determining the initial envelope point of the envelope line (the initial envelope point can be defined manually), scanning is performed with the initial envelope point as the origin and the scanning distance as the radius, and the scatter points within the scanning distance from the initial envelope point in the scatter point block can be determined. According to different existing concave hull algorithms, a scatter point can be selected from the scatter points within the scanning distance from the initial envelope point as the next envelope point. Exemplarily, the vector direction of the scanning can be defined, and the first scanned scatter point within the scanning distance from the initial envelope point can be used as the next envelope point.
[0052] Specifically, in this step, the final sub-envelope corresponding to each scatter point block is obtained based on the concave hull algorithm. Among them, the shape of the final sub-envelope is related to the scanning distance input to the concave hull algorithm. Different from manually adjusting the scanning distance in the prior art, in this embodiment, the scanning distance of the concave hull algorithm is automatically determined according to the distance between the two closest scatter points in the scatter point block. On the one hand, it can avoid waste of manpower, and on the other hand, it can ensure that the determined scanning distance is not too large, thereby ensuring a relatively high boundary accuracy of the final sub-envelope corresponding to the scatter point block obtained according to the scanning distance.
[0053] Step 130: Merge the final sub-envelopes into an overall envelope line. The overall envelope line is a complete closed polyline, and the overall envelope line encloses all the scatter points of the input data.
[0054] Specifically, after obtaining the final sub-envelope corresponding to each scatter point block in step 120, in this step, the final sub-envelopes corresponding to each scatter point block are merged into an overall envelope, and the overall envelope encloses all the scatter points of the input data. In step 120, when determining the final sub-envelope corresponding to the scatter point block, the scanning distance of the concave hull algorithm is determined according to the distance between the two closest scatter points in the scatter point block, so that the boundary accuracy of the final sub-envelope corresponding to each scatter point block is relatively high. Therefore, the accuracy of the overall envelope formed by merging each final sub-envelope in this step can also be relatively high, that is, it ensures that the accuracy of the overall envelope enclosing all the scatter points of the input data is relatively high. Moreover, compared with the prior art of directly manually adjusting the scanning distance to form the overall envelope corresponding to all the scatter points of the input data, the envelope generation method of this embodiment first divides the scatter points of the input data into multiple scatter point blocks. The scatter points of the scatter point block are not likely to include scatter points with a relatively large distance compared to the complete scatter point array formed by all the scatter points in the input data. Correspondingly, the boundary accuracy of the final sub-envelope corresponding to the scatter point block is also higher, further ensuring that the accuracy of the overall envelope formed by merging each final sub-envelope can also be relatively high.
[0055] The envelope generation method provided in this embodiment divides the scatter points of the input data into multiple scatter point blocks; for each scatter point block, the scanning distance of the concave hull algorithm is determined according to the distance between the two closest scatter points in the scatter point block, and the final sub-envelope of the scatter point block is generated according to the scanning distance; that is, by automatically determining the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, on the one hand, it can avoid waste of manpower, and on the other hand, it can ensure that the determined scanning distance is not too large, thereby ensuring that the boundary accuracy of the final sub-envelope corresponding to the scatter point block obtained according to the scanning distance is relatively high. After determining the final sub-envelopes of each scatter point block, the final sub-envelopes are merged into an overall envelope. Since the boundary accuracy of the final sub-envelope corresponding to each scatter point block is relatively high, the accuracy of the overall envelope formed by merging each final sub-envelope can also be relatively high, thereby improving the accuracy of the overall envelope enclosing all the scatter points of the input data.
[0056] Figure 2 is a flowchart of another envelope generation method provided by an embodiment of the present invention. Refer to Figure 2 , optionally, the envelope generation method includes:
[0057] Step 210, determining a clustering distance according to each scatter point in the input data;
[0058] Specifically, in this step, the clustering distance can be determined according to the distances between the scatter points in the input data. Optionally, step 210 includes: obtaining the scatter point closest to each scatter point in the input data, and determining the average value of the distances between each scatter point and the closest scatter point as the clustering distance, ensuring that the determined clustering distance is relatively small.
[0059] Step 220: Divide the scatter points of the input data into multiple scatter point blocks according to the clustering distance.
[0060] Specifically, after the clustering distance is determined, the scatter points of the input data can be clustered and divided into multiple scatter point blocks according to the clustering distance. Optionally, this step 220 includes: Based on the density clustering algorithm, divide the scatter points of the input data into multiple scatter point blocks according to the clustering distance. After dividing the scatter points of the input data into multiple scatter points based on the density clustering algorithm according to the clustering distance, the distance between each scatter point in each scatter point block and the nearest scatter point is less than or equal to the clustering distance. Therefore, by using the density clustering algorithm to divide the scatter points of the input data into multiple scatter point blocks in this way, the distance between each scatter point in each scatter point block and the nearest scatter point can be made smaller, and some points that are far apart can be excluded from affecting the determination accuracy of the scanning distance of the concave hull algorithm, thereby ensuring the accuracy of the final sub-envelope of the scatter point block in the subsequent steps.
[0061] Step 230: For each scatter point block, determine the scanning distance of the concave hull algorithm according to the distance between the two nearest scatter points in the scatter point block, and generate the final sub-envelope of the scatter point block according to the scanning distance; this step is the same as step 120 in the above embodiment and will not be elaborated here.
[0062] Step 240: Merge the final sub-envelopes into an overall envelope. The overall envelope is a complete closed polyline that wraps all the scatter points of the input data; this step is the same as step 130 in the above embodiment and will not be elaborated here.
[0063] In the envelope generation method of this embodiment, by obtaining the scatter point closest to each scatter point in the input data and determining the average value of the distance between each scatter point and the closest scatter point as the clustering distance, and based on the density clustering algorithm, dividing the scatter points of the input data into multiple scatter points according to the clustering distance, so that the distance between each scatter point in each scatter point block and the nearest scatter point is less than or equal to the clustering distance, and further, the distance between each scatter point in each scatter point block and the nearest scatter point can be made smaller, and some points that are far apart can be excluded from affecting the determination accuracy of the scanning distance of the concave hull algorithm, thereby ensuring the accuracy of the final sub-envelope of the scatter point block in the subsequent steps.
[0064] Figure 3 It is a flowchart of another envelope generation method provided by an embodiment of the present invention. Refer to Figure 3 , optionally, this envelope generation method includes:
[0065] Step 310: Divide the scatter points of the input data into multiple scatter point blocks; this step is the same as step 110 in the above embodiment and will not be elaborated here.
[0066] Step 320: For each scatter point block, take the distance between the two closest scatter points in the scatter point block as the initial scanning distance of the concave hull algorithm, and use the initial scanning distance as the scanning distance;
[0067] Specifically, taking the distance between the two closest scatter points in the scatter point block as the initial scanning distance of the concave hull algorithm and using the initial scanning distance as the scanning distance can, on the one hand, ensure that the scanning distance is not too small, that is, not less than the distance between the two closest scatter points in the scatter point block, thereby reducing the situation where some scatter points in the scatter point block cannot be wrapped by the corresponding final sub-envelope line or cannot form a complete envelope line due to too short a scanning distance; on the other hand, it can ensure that the determined scanning distance is not too large, thereby reducing the situation where the boundary accuracy of the final sub-envelope line is affected due to too large a determined scanning distance.
[0068] Step 330: Based on the concave hull algorithm, generate the intermediate sub-envelope line corresponding to the scatter point block according to the scanning distance;
[0069] Specifically, take the scanning distance as the input parameter of the concave hull algorithm. After the scanning distance is determined, the intermediate sub-envelope line of the scatter point block at this scanning distance can be obtained according to the concave hull algorithm.
[0070] Step 340: Determine whether the intermediate sub-envelope line is used as the final sub-envelope line according to whether the intermediate sub-envelope line forms a complete closed polyline and wraps all the scatter points in the corresponding scatter point block. When the intermediate sub-envelope line is used as the final sub-envelope line, output the final sub-envelope line, and when the intermediate sub-envelope line is not used as the final sub-envelope line, adjust the scanning distance and return to the step of generating the intermediate sub-envelope line corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance.
[0071] Specifically, the intermediate sub-envelope line may not form a complete closed polyline or may not wrap all the scatter points in the scatter point block. In this step, determine whether the intermediate sub-envelope line is used as the final sub-envelope line according to whether the intermediate sub-envelope line forms a complete closed polyline and wraps all the scatter points in the corresponding scatter point block. When the intermediate sub-envelope line does not meet at least one of forming a complete closed polyline and wrapping all the scatter points in the scatter point block, do not use the intermediate sub-envelope line as the final sub-envelope line and adjust the scanning distance, then return to Step 330 to continue generating the corresponding intermediate sub-envelope line based on the adjusted scanning distance until the intermediate sub-envelope line meets the requirements of forming a complete closed polyline and wrapping all the scatter points in the corresponding scatter point block, and determine the intermediate sub-envelope line as the final sub-envelope line corresponding to the scatter point block and output it. When the intermediate sub-envelope line meets both the requirements of forming a complete closed polyline and wrapping all the scatter points in the scatter point block, directly determine the intermediate sub-envelope line as the final sub-envelope line of the scatter point block and output it.
[0072] Optionally, step 340 includes:
[0073] Step 341, check whether the intermediate sub-envelope forms a complete closed polyline and encloses all the scatter points in the scatter point block;
[0074] If so, execute step 342, use the intermediate sub-envelope as the final sub-envelope and output it;
[0075] If not, execute step 343, do not use the intermediate sub-envelope as the final sub-envelope, update the scanning distance according to the scanning step length increased at the scanning distance corresponding to the intermediate sub-envelope, and return to step 330.
[0076] Specifically, when the intermediate sub-envelope does not satisfy the condition of forming a complete closed polyline and enclosing all the scatter points in the scatter point block, it indicates that the determined scanning distance is too small, so the scanning distance needs to be increased. In this embodiment, the scanning step length is increased on the basis of the scanning distance corresponding to the intermediate sub-envelope obtained in step 330 to increase the scanning distance, realizing the adaptive adjustment of the scanning distance. And through the setting of the scanning step length, it is ensured that the increased scanning distance each time will not be too large, thereby ensuring a relatively high boundary accuracy of the generated final sub-envelope.
[0077] Step 350, merge each final sub-envelope into an overall envelope. The overall envelope is a complete closed polyline, and the overall envelope encloses all the scatter points of the input data; this step is the same as step 130 in the above embodiment and will not be elaborated here.
[0078] Figure 4 is a flowchart of another envelope generation method provided by an embodiment of the present invention. Refer to Figure 4 , optionally, this envelope generation method includes:
[0079] Step 410, divide the scatter points of the input data into multiple scatter point blocks; this step is the same as step 110 in the above embodiment and will not be elaborated here;
[0080] Step 420, for each scatter point block, determine the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generate the final sub-envelope of the scatter point block; this step is the same as step 120 in the above embodiment and will not be elaborated here;
[0081] Step 430, determine whether the total number of scatter point blocks is greater than 1.
[0082] If so, execute steps 440 - 470.
[0083] Specifically, steps 440 - 470 are the process of merging the final sub - envelopes corresponding to two scatter point blocks into one sub - envelope, and merging two scatter point blocks into one scatter point block. Therefore, it is necessary to ensure that the number of scatter point blocks is greater than 1.
[0084] Step 440: Determine the first envelope point set of the first sub - envelope corresponding to the first scatter point block and the second envelope point set of the second sub - envelope corresponding to the second scatter point block according to the distances between each pair of scatter point blocks.
[0085] Among them, the first scatter point block and the second scatter point block are the two scatter point blocks with the closest distance among all scatter point blocks. The envelope points in the first envelope point set and the second envelope point set are arranged in a set order, where the set order is clockwise or counter - clockwise.
[0086] Among them, the first sub - envelope is the final sub - envelope corresponding to the first scatter point block, and the second sub - envelope is the final sub - envelope corresponding to the second scatter point block. The first sub - envelope is a closed polyline that encloses all the scatter points in the first scatter point block. Each segment of the closed polyline corresponds to two envelope points. Therefore, there are multiple envelope points on the first sub - envelope, and the multiple envelope points on the first sub - envelope form the first envelope point set. Similarly, there are multiple envelope points on the second sub - envelope, and the multiple envelope points on the second sub - envelope form the second envelope point set. Among them, the envelope points in the first envelope point set are arranged in a set order, and the envelope points in the second envelope point set are arranged in a set order, where the set order is clockwise or counter - clockwise. Specifically, since both the first sub - envelope and the second sub - envelope are closed polylines, the envelope points on the first sub - envelope can surely be arranged clockwise or counter - clockwise in the first envelope point set. Similarly, the envelope points on the second sub - envelope can surely be arranged clockwise or counter - clockwise in the second envelope point set. The starting point when the envelope points in the first envelope point set are arranged in a set order is not limited in this step, that is, the first element in the first envelope point set is not limited in this step; similarly, the first element in the second envelope point set is not limited in this step. Exemplarily, the first envelope point set determined after step 440 is A = [a1, a2, …… an, a1], and the second envelope point set determined after step 440 is B = [b1, b2, …… bm, b1].
[0087] Step 450: Re - determine the starting element of the set envelope point set according to the first envelope point of the first envelope point set and the second envelope point of the second envelope point set, and re - arrange the envelope points in the set envelope point set in a set order with the starting element as the starting point of the set envelope point set; among them, the first envelope point and the second envelope point are the envelope points with the closest distance in the first envelope point set and the second envelope point set.
[0088] Among them, either the first envelope point set or the second envelope point set is a set of preset envelope points. In this step, it is first necessary to determine the two envelope points with the closest distance in the first envelope point set and the second envelope point set, that is, the first envelope point and the second envelope point. Exemplarily, the first envelope point is ak in the first envelope point set A = [a1, a2, …… an, a1], and the second envelope point is bp in the second envelope point set B = [b1, b2, …… bm, b1]. Exemplarily, when the second envelope point set is the set of preset envelope points, the second envelope point bp is re-determined as the starting element of the second envelope point set, and the re-ordered second envelope point set is B = [bp, … b1, b2 … bp].
[0089] Step 460: Recombine the non-set envelope point set and the re-arranged set of preset second envelope points into a single envelope point set, and merge the first sub-envelope line and the second sub-envelope line into a reorganized envelope line according to the single envelope point set, and use the first scatter point block and the second scatter point block as a scatter point block.
[0090] Among them, either the first envelope point set or the second envelope point set is a set of preset envelope points, and the other is a non-set envelope point set.
[0091] Optionally, this step 460 includes:
[0092] (1) Insert the envelope points in the re-arranged set of preset envelope points into the positions of the preset envelope points in the non-set envelope point set to obtain a single envelope point set. When the set of preset envelope points is the first envelope point set, the position of the preset envelope point in the non-set envelope point set is the position of the second envelope point. When the set of preset envelope points is the second envelope point set, the position of the preset envelope point in the non-set envelope point set is the position of the first envelope point.
[0093] Still taking the second envelope point set as the set of preset envelope points as an example, the first envelope point set is the non-set envelope point set. The re-arranged set of preset envelope points is B = [bp, … b1, b2 … bp], and inserting it into the position of ak in the non-set envelope point set A = [a1, a2, … ak … an, a1], the obtained single envelope point set is C = [a1, a2 … ak bp, … b1, b2 … bp, ak, … an, a1].[[]END]
[0094] (2) Merge the first sub-envelope line and the second sub-envelope line into a reorganized envelope line according to the single envelope point set, and use the first scatter point block and the second scatter point block as a scatter point block.
[0095] After obtaining a single set of envelope points, a recombined envelope line after merging the first sub-envelope line and the second sub-envelope line can be obtained according to the single set of envelope points, and the corresponding first scatter point block and the second scatter point block are merged into one scatter point block.
[0096] Step 470: Decrease the number of scatter point blocks by 1, and return to execute Step 430;
[0097] If not, execute Step 480:
[0098] Step 480: Output the recombined envelope line.
[0099] An embodiment of the present invention also provides an envelope line generation device, which is used to execute the envelope line generation method of any of the above embodiments of the present invention. Figure 5 It is a structural schematic diagram of an envelope line generation device provided by an embodiment of the present invention. Refer to Figure 5 , optionally, the envelope line generation device includes:
[0100] A division module 510, configured to divide the scatter points of the input data into multiple scatter point blocks, where each scatter point block includes multiple scatter points that can form a surface;
[0101] A sub-envelope line generation module 520, configured to, for each scatter point block, determine the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generate the final sub-envelope line of the scatter point block according to the scanning distance;
[0102] A merging module 530, configured to merge each final sub-envelope line into an overall envelope line, the overall envelope line being a complete closed polyline that wraps all the scatter points of the input data.
[0103] The envelope line generation device of this embodiment is used to execute the envelope line generation method of any of the above embodiments of the present invention, and correspondingly, has the beneficial effects of the envelope line generation method of any of the above embodiments of the present invention.
[0104] Note that the above is only a preferred embodiment of the present invention and the applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described here. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for generating an envelope line, characterized in that, Including: Dividing the scatter points of the input data into multiple scatter point blocks, where each scatter point block includes multiple scatter points that can form a surface; The scatter points are the central coordinate points of the photovoltaic string; For each of the scatter point blocks, determining the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generating the final sub-envelope of the scatter point block according to the scanning distance; Merging the final sub-envelopes into an overall envelope, the overall envelope being a complete closed polyline that wraps all the scatter points of the input data.
2. The envelope generation method according to claim 1, wherein The dividing the scatter points of the input data into multiple scatter point blocks includes: Determining the clustering distance according to the scatter points in the input data; Dividing the scatter points of the input data into multiple scatter point blocks according to the clustering distance.
3. The envelope generation method according to claim 2, wherein The determining the clustering distance according to the scatter points in the input data includes: Obtaining the scatter point closest to each scatter point in the input data, and determining the average value of the distances between each scatter point and the closest scatter point as the clustering distance.
4. The envelope generation method according to claim 3, wherein The dividing the scatter points of the input data into multiple scatter point blocks according to the clustering distance includes: Based on the density clustering algorithm, dividing the scatter points of the input data into multiple scatter point blocks according to the clustering distance.
5. The envelope generation method according to claim 1, characterized in that For each of the scatter point blocks, determining the scanning distance of the concave hull algorithm according to the distance between the two closest scatter points in the scatter point block, and generating the final sub-envelope of the scatter point block according to the scanning distance, includes: For each of the scatter point blocks, taking the distance between the two closest scatter points in the scatter point block as the initial scanning distance of the concave hull algorithm, and taking the initial scanning distance as the scanning distance; Based on the concave hull algorithm, generating the intermediate sub-envelope corresponding to the scatter point block according to the scanning distance; Determining whether the intermediate sub-envelope is used as the final sub-envelope according to whether the intermediate sub-envelope forms a complete closed polyline and wraps all the scatter points in the corresponding scatter point block, outputting the final sub-envelope when the intermediate sub-envelope is used as the final sub-envelope, and adjusting the scanning distance when the intermediate sub-envelope is not used as the final sub-envelope, and returning to the step of generating the intermediate sub-envelope corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance.
6. The envelope generation method according to claim 5, characterized in that Determining whether the intermediate sub-envelope is used as the final sub-envelope according to whether the sub-envelope forms a complete closed polyline and wraps all the scatter points in the corresponding scatter point block, outputting the final sub-envelope when the intermediate sub-envelope is used as the final sub-envelope, and adjusting the scanning distance when the intermediate sub-envelope is not used as the final sub-envelope, and returning to the step of generating the intermediate sub-envelope corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance, includes: Verifying whether the intermediate sub-envelope forms a complete closed polyline and wraps all the scatter points in the scatter point block, and if so, using the intermediate sub-envelope as the final sub-envelope and outputting it; If not, do not use the intermediate sub-envelope as the final sub-envelope, update the scanning distance by increasing the scanning step according to the scanning distance corresponding to the intermediate sub-envelope, and return to the step of generating the intermediate sub-envelope corresponding to the scatter point block based on the concave hull algorithm according to the scanning distance.
7. The envelope generation method according to claim 1, wherein Merging the final sub-envelopes into an overall envelope, where the overall envelope is a complete closed polyline that encloses all the scatter points of the input data, includes: Judging whether the total number of the scatter point blocks is greater than 1; If so, determine the first envelope point set of the first sub-envelope corresponding to the first scatter point block and the second envelope point set of the second sub-envelope corresponding to the second scatter point block according to the distances between every two of the scatter point blocks. The first scatter point block and the second scatter point block are the two scatter point blocks with the closest distance among all the scatter point blocks. The envelope points in the first envelope point set and the second envelope point set are arranged in a set order, where the set order is clockwise or counterclockwise; Redetermine the starting element of the set envelope point set according to the first envelope point of the first envelope point set and the second envelope point of the second envelope point set, and rearrange the envelope points in the set envelope point set in the set order with the starting element as the starting point of the set envelope point set; among them, the first envelope point and the second envelope point are the envelope points with the closest distance in the first envelope point set and the second envelope point set; Recombine the non-set envelope point set and the rearranged set envelope point set into a single envelope point set, merge the first sub-envelope and the second sub-envelope into a recombined envelope according to the single envelope point set, and regard the first scatter point block and the second scatter point block as one scatter point block; among them, either the first envelope point set or the second envelope point set is the set envelope point set, and the other is the non-set envelope point set; Decrease the number of the scatter point blocks by 1, and return to execute the step of judging whether the total number of the scatter point blocks is greater than 1; If not, output the recombined envelope.
8. The envelope generation method according to claim 7, characterized in that The recombining the non-set envelope point set and the rearranged set envelope point set into a single envelope point set, merging the first sub-envelope and the second sub-envelope into a recombined envelope according to the single envelope point set, and regarding the first scatter point block and the second scatter point block as one scatter point block includes: Insert the envelope points in the rearranged set envelope point set into the position of the set envelope point in the non-set envelope point set to obtain a single envelope point set. When the set envelope point set is the first envelope point set, the position of the set envelope point in the non-set envelope point set is the position of the second envelope point. When the set envelope point set is the second envelope point set, the position of the set envelope point in the non-set envelope point set is the position of the first envelope point; Merge the first sub-envelope line and the second sub-envelope line into a recombined envelope line according to a set of single envelope points, and use the first scatter point block and the second scatter point block as one scatter point block.
9. An envelope generation device, characterized in that, Including: A partitioning module, configured to partition the scatter points of the input data into multiple scatter point blocks, where each scatter point block includes multiple scatter points that can form a surface; the scatter points are the central coordinate points of the photovoltaic string; A sub-envelope line generation module, configured to, for each of the scatter point blocks, determine the scanning distance of the concave hull algorithm according to the distance between the two scatter points with the closest distance in the scatter point block, and generate the final sub-envelope line of the scatter point block according to the scanning distance; A merging module, configured to merge the final sub-envelope lines into an overall envelope line, where the overall envelope line is a complete closed polyline that wraps all the scatter points of the input data.
Citation Information
Patent Citations
A method for quantitatively evaluating contact line distribution of conjugate curved surface based on fractal dimension
CN109408872A
Regional division method and device for photovoltaic power station
CN113297712A