Engineering scale generation method and device, storage medium and electronic equipment
The method and device use intelligent algorithms to determine the material requirements of flexible photovoltaic brackets, addressing the inaccuracy in traditional assessment methods and enhancing the precision and efficiency of material evaluation.
Patent Information
- Application Number
- CN202411353694.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional engineering quantity assessment methods struggle to accurately evaluate the material requirements of flexible photovoltaic brackets due to their deformable characteristics and non-standardized sizes.
A method and device for generating a bill of quantities using intelligent algorithms to determine the number of middle piles, optimize initial heights, and calculate the length and number of flexible support cables based on connection relationships between short spans in photovoltaic systems.
Accurately calculates the number of middle piles, target heights, and length of flexible support cables, improving the accuracy and efficiency of material requirement evaluation for flexible photovoltaic supports.
Smart Images

Figure CN119227387A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the photovoltaic field, and more specifically, to a method and device for generating an engineering quantity table, a storage medium, and an electronic device. Background Art
[0002] With the transformation of the global energy structure and the challenge of climate change, solar energy has been widely promoted and applied as a clean and renewable energy source. The installation of photovoltaic systems involves a large amount of engineering quantity statistics, especially in the design and layout of the support system. Traditional photovoltaic supports are mostly made of rigid materials, such as steel or aluminum. Although these materials have good stability, they are inconvenient during installation and transportation.
[0003] To solve these problems, flexible bracket technology came into being. Flexible photovoltaic brackets usually use lightweight, bendable materials, such as polymer composite materials, which can provide better installation flexibility and adaptability without reducing the load-bearing capacity. Flexible brackets can easily adapt to different installation surfaces, such as irregular roofs or ground, greatly simplifying the installation process and reducing installation costs.
[0004] However, due to the deformable characteristics and non-standardized size of flexible brackets, traditional engineering quantity statistics methods have difficulty in accurately assessing the material requirements of flexible photovoltaic brackets.
[0005] With regard to the problem in related technologies that the material requirements for flexible photovoltaic brackets cannot be accurately assessed, no effective solution has been proposed so far.
[0006] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention
[0007] The embodiments of the present application provide a method and device for generating a bill of quantities, a storage medium, and an electronic device to at least solve the problem in the related art that the material requirements of flexible photovoltaic brackets cannot be accurately evaluated, and no effective solution has been proposed so far.
[0008] According to one aspect of an embodiment of the present application, a method for generating a bill of quantities is provided, comprising: determining the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic components, and the middle piles and flexible support cables are components of photovoltaic flexible supports in a photovoltaic system; determining the initial height of each middle pile, and optimizing the initial height of each middle pile according to a preset algorithm to obtain a target height of each middle pile; determining the length of the flexible support cables according to the target height of each middle pile and the distance between each middle pile, and determining the number of the flexible support cables according to the number of long strings, wherein the long string is composed of multiple short spans; generating a bill of quantities according to the number of middle piles, the target height of each middle pile, the length of the flexible support cables, and the number of the flexible support cables.
[0009] In an exemplary embodiment, the initial height of each center pile is optimized according to a preset algorithm to obtain a target height of each center pile, including: determining a loss function, wherein the loss function includes: an angle loss function and a height adjustment loss function; calculating a gradient corresponding to the loss function at the initial height, wherein the gradient is used to indicate the rate of change of the loss function at the initial height; and updating the initial height according to the gradient to obtain the target height of each center pile.
[0010] In an exemplary embodiment, determining the initial height of each center pile includes: determining a geographical location corresponding to the photovoltaic system; determining the initial coordinates of each center pile in a target application based on the geographical location and the initial height; determining an initial angle corresponding to three adjacent center piles based on the initial coordinates; and determining an adjusted angle corresponding to three adjacent center piles based on the adjusted heights and the adjusted coordinates.
[0011] In an exemplary embodiment, before determining the number of center piles based on the connection relationship between each short span and other short spans, the method also includes: determining multiple first rectangular patterns corresponding to the photovoltaic component in the target application, and determining the long side center point coordinates of each first rectangular pattern; inputting the long side center point coordinates of each first rectangular pattern into a first set; determining the adjacent point coordinates of each long side center point coordinate in the first set based on a KD tree algorithm, wherein the adjacent point coordinates are the coordinates in the first set; establishing a connection relationship between the center point coordinates of each long side and the corresponding adjacent point coordinates to obtain a first map; and determining the short span according to the path in the first map.
[0012] In an exemplary embodiment, before determining the number of center piles based on the connection relationship between each short span and other short spans, the method also includes: determining multiple second rectangular patterns corresponding to the short spans in the target application, and determining the short side center point coordinates of each second rectangular pattern; inputting the short side center point coordinates of each second rectangular pattern into a second set; determining the adjacent point coordinates of each short side center point coordinate in the second set based on a KD tree algorithm, wherein the adjacent point coordinates of each short side center point coordinate are coordinates in the second set; establishing a connection relationship between each short side center point coordinate and the corresponding adjacent point coordinates to obtain a second graph; and determining the long string according to the path in the second graph.
[0013] In an exemplary embodiment, before determining the number of middle piles according to the connection relationship between each short span and other short spans, the method further includes: when any short span has a connection relationship with the other short spans, determining that the middle pile exists between the any short span and the other short spans; when no connection relationship exists between the any short span and the other short spans, determining that the middle pile does not exist between the any short span and the other short spans.
[0014] According to another aspect of an embodiment of the present application, a device for generating a bill of quantities is also provided, including: a first determination module, used to determine the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic components, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system; a second determination module, used to determine the initial height of each middle pile, and optimize the initial height of each middle pile according to a preset algorithm to obtain a target height of each middle pile; a third determination module, used to determine the length of the flexible support cable according to the target height of each middle pile and the distance between the middle piles, and determine the number of the flexible support cables according to the number of long strings, wherein the long strings are composed of multiple short spans; a generation module, used to generate a bill of quantities according to the number of middle piles, the target height of each middle pile, the length of the flexible support cable and the number of the flexible support cables.
[0015] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for generating a bill of quantities when run.
[0016] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for generating the engineering quantity table through the computer program.
[0017] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, wherein the computer program is executed by a processor to execute the above-mentioned method for generating a bill of quantities.
[0018] Through the embodiment of the present application, the number of middle piles is determined according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic components, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system; the initial height of each middle pile is determined, and the initial height of each middle pile is optimized according to a preset algorithm to obtain the target height of each middle pile; the length of the flexible support cable is determined according to the target height of each middle pile and the distance between the middle piles, and the number of the flexible support cables is determined according to the number of long strings, wherein the long string is composed of multiple short spans; the engineering quantity table is generated according to the number of middle piles, the target height of each middle pile, the length of the flexible support cable, and the number of the flexible support cables. That is, in the embodiment of the present application, the number of middle piles, the target height of each middle pile, the length of the flexible support cable, and the number of the flexible support cables are accurately calculated through an intelligent algorithm, which improves the accuracy and efficiency of evaluating the material requirements of the engineering material, and solves the problem that the material requirements of the flexible photovoltaic support cannot be accurately evaluated in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The exemplary embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a hardware structure block diagram of a computer device for the method for generating a bill of quantities of an engineering project according to an embodiment of the present application;
[0021] Figure 2 is a flow chart of a method for generating a bill of quantities according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a 1x1 photovoltaic module according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of the middle pile height according to an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a photovoltaic system according to an embodiment of the present application;
[0025] Figure 6 It is a structural block diagram of a device for generating a bill of quantities according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms and "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] The method embodiments provided in the embodiments of the present application can be executed in a computer device or a similar computing device. Taking running on a computer device as an example, Figure 1 1 is a hardware structure block diagram of a computer device for generating a method for a table of quantities according to an embodiment of the present application. Figure 1 As shown, the computer device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a microprocessor (Microprocessor Unit, referred to as MPU) or a programmable logic device (Programmable logic device, referred to as PLD)) and a memory 104 for storing data. In an exemplary embodiment, the computer device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer device. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating the engineering quantity table in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, which is equivalent to implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer device. In one embodiment, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a method for generating a bill of quantities is provided. Figure 2 : is a flow chart of a method for generating a bill of quantities according to an embodiment of the present application, which is run in the above-mentioned computer device, and the flow includes the following steps:
[0032] Step S202, determining the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system;
[0033] It should be noted that a photovoltaic system is generally composed of a center pile, a flexible support cable, and a short span, wherein the center pile is located between the short spans of the chain, and the flexible support cable is used to connect the two short spans. The photovoltaic flexible support is used to install, fix and support the photovoltaic components in the power generation system. The number of center piles, the target height of each center pile, the length of the flexible support cable, and the number of flexible support cables will affect the installation efficiency and power generation efficiency of the photovoltaic flexible support.
[0034] Step S204, determining the initial height of each center pile, and optimizing the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile;
[0035] Step S206, determining the length of the flexible support cable according to the target height of each center pile and the distance between two center piles, and determining the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans;
[0036] It should be noted that the number of flexible support cables is the number of long strings*2, and the length of the flexible support cables is the sum of the lengths of the connecting lines between the center columns.
[0037] Step S208 , generating a bill of quantities according to the number of the center piles, the target height of each center pile, the length of the flexible support cables, and the number of the flexible support cables.
[0038] It should be noted that the above-mentioned engineering quantity table includes: the number of the center piles, the target height of each center pile, the length of the flexible support cable and the number of the flexible support cables.
[0039] Through the above steps, the number of middle piles is determined according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic components, and the middle piles and flexible support cables are components of the photovoltaic flexible support in the photovoltaic system; the initial height of each middle pile is determined, and the initial height of each middle pile is optimized according to a preset algorithm to obtain the target height of each middle pile; the length of the flexible support cable is determined according to the target height of each middle pile and the distance between the middle piles, and the number of the flexible support cables is determined according to the number of long strings, wherein the long string is composed of multiple short spans; the engineering quantity table is generated according to the number of middle piles, the target height of each middle pile, the length of the flexible support cable and the number of the flexible support cables. That is, in the embodiment of the present application, the number of middle piles, the target height of each middle pile, the length of the flexible support cable and the number of the flexible support cables are accurately calculated by an intelligent algorithm, which improves the accuracy and efficiency of evaluating the material requirements of the engineering material, and solves the problem that the material requirements of the flexible photovoltaic support cannot be accurately evaluated in the related art.
[0040] Optionally, in order to better understand the above step S204, the above step S204 can be implemented in the following way: determine the loss function, wherein the loss function includes: an angle loss function and a height adjustment loss function; calculate the gradient corresponding to the loss function at the initial height, wherein the gradient is used to indicate the rate of change of the loss function at the initial height; update the initial height according to the gradient to obtain the target height of each center pile.
[0041] That is to say, when optimizing the height of the center column, the following steps need to be performed:
[0042] Step 1: Define a loss function, where the loss function is a function that measures the quality of a solution. In the embodiment of the present application, the loss function consists of two parts:
[0043] 1) Angle loss: When the angle exceeds the specified range, the loss function will give a high penalty to encourage the algorithm to find a solution that meets the angle requirements. For example, when the angle is not in the range of [175°, 185°], this item gives a high penalty.
[0044] 2) Height adjustment loss: Penalizes the sum of the absolute values of the height adjustments of each middle column. This penalty term encourages the algorithm to find the solution that requires the minimum adjustment to keep the original height of the middle column unchanged.
[0045] Let y be a vector containing the heights of all points, y orig is the initial height vector, and the loss function L(y) can be expressed as follows:
[0046] L(y)=∑ang l e_l oss(y)+λ∑∣y i -y orig,i ∣, where λ is a weight parameter used to balance the two losses, angle_loss(y) is the angle loss, and ∣y i -y orig,i ∣ is the height adjustment loss.
[0047] Step 2: Initialize the height of the center column; start from the original height, because the original height of the center column may not meet the angle requirement, therefore, it is necessary to adjust the height of the center column through iterative optimization.
[0048] Step 3: Calculate the gradient of the loss function;
[0049] The gradient is the partial derivative of the loss function with respect to the height of each column, and the gradient indicates the direction in which the loss function increases (or decreases) the fastest. In the embodiment of the present application, the gradient calculation is implemented by a numerical method, that is, by making a small disturbance at each height point and calculating the rate of change of the loss function.
[0050] Step 4: Iterative optimization;
[0051] In each iteration, the height of the column is updated according to the gradient. The update rule is to move one step (learning rate) in the negative direction of the gradient, which reduces the value of the loss function. The iterative process is repeated until a stopping condition is met, such as reaching the maximum number of iterations or the gradient becomes very small.
[0052] Step 5: Determine whether the stop condition is reached;
[0053] The algorithm stops when the gradient of the loss function becomes small enough, indicating that we are close to the solution that minimizes the loss, or when a preset number of iterations is reached.
[0054] Step 6: Output the optimized height.
[0055] After multiple iterations, the algorithm outputs a set of new center column heights, which should make the vector angles on both sides of all center columns between 175 degrees and 185 degrees, while minimizing the overall height adjustment.
[0056] This method can be used to obtain a set of optimized center column heights, which not only meets the strict requirements of the angle in the engineering design, but also minimizes the modification of the original design. This algorithm is particularly suitable for handling complex photovoltaic flexible bracket layouts, ensuring the stability and economy of the bracket structure under different terrain and environmental conditions.
[0057] The final optimization result is as follows Figure 4 As shown, Figure 4 The blue part in the figure is the center column, which ensures that the angle between the lines on both sides of each center column is between 175 degrees and 185 degrees.
[0058] Through the embodiments of the present application, the height of the center pile can be accurately adjusted through a mathematical algorithm, thus avoiding errors that may exist in traditional designs. This is suitable for the automated design of large-scale photovoltaic power stations and can significantly improve design accuracy and efficiency.
[0059] Optionally, determining the initial height of each center pile includes: determining the geographical location corresponding to the photovoltaic system; determining the initial coordinates of each center pile in the target application based on the geographical location and the initial height; determining the initial angle corresponding to three adjacent center piles based on the initial coordinates; and determining the adjusted angle corresponding to three adjacent center piles based on the adjusted heights and the adjusted coordinates.
[0060] In the embodiment of the present application, it is necessary to ensure that the final angle is within the preset angle range.
[0061] Optionally, before determining the number of center piles based on the connection relationship between each short span and other short spans, the method also includes: determining multiple first rectangular patterns corresponding to the photovoltaic component in the target application, and determining the long side center point coordinates of each first rectangular pattern; inputting the long side center point coordinates of each first rectangular pattern into a first set; determining the adjacent point coordinates of each long side center point coordinate in the first set based on a KD tree algorithm, wherein the adjacent point coordinates are the coordinates in the first set; establishing a connection relationship between the center point coordinates of each long side and the corresponding adjacent point coordinates to obtain a first map; and determining the short span according to the path in the first map.
[0062] Specifically, in the embodiment of the present application, the short span is determined by the following steps:
[0063] Step 1: Determine the first rectangular pattern corresponding to the photovoltaic module and the coordinates of the center point of its long side;
[0064] like Figure 3 As shown, Figure 3 A small rectangle in the figure represents a photovoltaic module, wherein the target application can be understood as a CAD software environment in which the arrangement drawing of the photovoltaic module is saved.
[0065] The first rectangular pattern can be understood as that in the CAD drawing, each photovoltaic module is represented as a rectangle, and these rectangles represent the actual size and position of the module.
[0066] The coordinates of the center point of the long side can be understood as determining the center point of the long side of each rectangle.
[0067] Step 2: Input the coordinates of the center point of the long side into the first set;
[0068] The first set is a data structure for storing coordinate information of the center points of the long sides of all photovoltaic modules extracted from the CAD drawings.
[0069] Step 3: Determine the coordinates of the points adjacent to the coordinates of the center point of each long side in the first set based on the KD tree algorithm;
[0070] The KD tree algorithm is an efficient data structure for finding the nearest neighbor points in multidimensional space. In two-dimensional space, it creates a binary tree structure by splitting the point set according to the x-axis or y-axis to quickly search for the nearest neighbor points.
[0071] The adjacent point coordinates mean that for each long side center point coordinate in the first set, the algorithm will find the closest other long side center point coordinate.
[0072] Step 4: Establish a connection relationship between the coordinates of the center point of each long side and the coordinates of the corresponding adjacent points to obtain a first map;
[0073] The connected relationship is used to indicate that by determining which long edge center point coordinates are close to each other, an "edge" can be established between them, indicating physically adjacent or connected components.
[0074] The first graph is a constructed graphical representation in which PV modules are considered as nodes and the connections between modules are considered as edges, forming a network graph of PV modules. The first graph helps to identify which modules belong to the same short span.
[0075] Step 5: Determine the short span according to the path in the first graph;
[0076] A path can be understood as a continuous sequence of edges from one node (PV module) to another node in the first graph. Based on the above path, a structure consisting of multiple PV modules connected in series can be identified. These structures are arranged similarly in the CAD drawings and are physically adjacent, forming a "short span".
[0077] Through the above steps, the algorithm can automatically identify and count the layout of photovoltaic modules and determine which modules constitute short spans, which is of great significance for subsequent engineering quantity statistics, material demand assessment and support system design. This method not only improves efficiency, but also reduces the error of manual statistics, especially when dealing with large numbers and complex layouts of photovoltaic modules.
[0078] For example, read a 1x1 layer from cad. A 1x1 component is usually a rectangle. Read the position of the center point of the rectangle, the length and width of the rectangle, and the rotation angle of the rectangle relative to the center point. Read the coordinates of the center point of the long side of the matrix. A rectangle contains the coordinates of the center points on the long sides of 2 matrices.
[0079] Input the coordinates of the center points on the long sides of all 1x1 rectangles into the point set A1, where A1m is a point in A1. In the point set A1, use kdtree to find the nearest point A1n of A1m. The rotation angles of the rectangle where point A1m is located and the rectangle where point A1n is located are basically the same, and at the same time, the distance between point A1m and the nearest point A1n is less than (the spacing between components + the set deviation), then the two adjacent rectangles are considered to be the same short span and connected. Otherwise, they are not connected to each other. Perform the above operation on all points in the point set, determine which other rectangles a rectangle is connected to, generate a connection relationship, and identify it as an edge.
[0080] All rectangles are identified as nodes and the nodes are numbered. An edge is composed of two nodes, indicating that the two nodes are connected. Then, a graph is generated based on the connection relationship. The number of connected vectors in the graph is determined, and the number of short spans composed of multiple 1x1 components is obtained.
[0081] Optionally, before determining the number of center piles based on the connection relationship between each short span and other short spans, the method also includes: determining multiple second rectangular patterns corresponding to the short spans in the target application, and determining the short side center point coordinates of each second rectangular pattern; inputting the short side center point coordinates of each second rectangular pattern into a second set; determining the adjacent point coordinates of each short side center point coordinate in the second set based on a KD tree algorithm, wherein the adjacent point coordinates of each short side center point coordinate are the coordinates in the second set; establishing a connection relationship between each short side center point coordinate and the corresponding adjacent point coordinates to obtain a second graph; and determining the long string according to the path in the second graph.
[0082] In an embodiment of the present application, the coordinates of the adjacent points of the coordinates of the center point of each short side in the second set are determined based on the KD tree algorithm, and those bracket components that are close to each other in space are identified and matched through efficient data structures and search algorithms. The KD tree can quickly locate adjacent coordinate points, which is particularly important for processing a large amount of coordinate data and can significantly improve the efficiency of the algorithm. A connection relationship between the coordinates of each short side center point and the corresponding adjacent point coordinates is established to obtain a second graph, that is, a graph model is constructed in which nodes represent the center points of the short sides and edges represent the spatial connectivity between these points, thereby abstracting the physical layout into a mathematical model for subsequent analysis and optimization.
[0083] The long string is determined according to the path in the second graph, that is, the continuous long string of brackets composed of short spans is identified through the connection relationship in the graph model. This is to integrate the layout information of a single short span into a long string, so as to further evaluate the engineering quantity of the entire photovoltaic bracket system, including the number and location of end piles, middle piles, and the length of the cable and other key data.
[0084] For example, read all short span rectangles from cad, read the coordinates of the center points on the short sides of the short span rectangles (one rectangle contains two); input the center points on the short sides of all rectangles into the point set A2, where A2n is a point in A2.
[0085] In the point set A2, use kdtree to find the nearest point A2n of A2m. The rotation angles of the rectangle where point A2m is located and the rectangle where point A2n is located are basically the same. At the same time, the distance between point A2m and the nearest point A2n is less than (the spacing set by the short span + the set deviation), then the two adjacent rectangles are considered to be in the same long string. Otherwise, they are not connected to each other. Perform the above operation on all points in the point set, determine which other rectangles a rectangle is connected to, generate a connection relationship, and identify it as an edge. Identify all rectangles as nodes and number the nodes. An edge consists of two nodes, indicating that the two nodes are connected. Use depth-first search (DFS) to determine how many connected components there are in a given graph. A connected component is a long string.
[0086] In an embodiment of the present application, geometric modeling and spatial data search technology (such as KD tree) are used to convert the CAD design into an operational mathematical model, and a graph is established to represent the connection relationship between short spans. Finally, long strings and related engineering quantities are identified and counted based on the path information in the graph.
[0087] Optionally, before determining the number of middle piles according to the connection relationship between each short span and other short spans, the method further includes: when any short span is connected to the other short spans, determining that the middle pile exists between the any short span and the other short spans; when no connection relationship exists between the any short span and the other short spans, determining that the middle pile does not exist between the any short span and the other short spans.
[0088] like Figure 5 As shown in the figure, if one end of a short span is not connected, it is considered to be the end pile position. The end pile coordinates are determined after the spacing is set outside the short span. If both ends of a short span are connected, it is a middle pile. The middle pile coordinates are the center point of the straight line formed by the center points of the adjacent short sides of the two short spans. By traversing all short spans, the number of end piles and middle piles can be determined.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROX / RAX, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0090] In this embodiment, a device for generating a bill of quantities is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0091] Figure 6 : is a structural block diagram of a device for generating a bill of quantities according to an embodiment of the present application, the device comprising:
[0092] A first determination module 62 is used to determine the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system;
[0093] A second determination module 64 is used to determine the initial height of each center pile, and optimize the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile;
[0094] A third determination module 66 is used to determine the length of the flexible support cable according to the target height of each center pile and the distance between the center piles, and to determine the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans;
[0095] The generating module 68 is used to generate a bill of quantities according to the number of the center piles, the target height of each center pile, the length of the flexible support cables and the number of the flexible support cables.
[0096] Through the above device, the number of middle piles is determined according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic components, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system; the initial height of each middle pile is determined, and the initial height of each middle pile is optimized according to a preset algorithm to obtain the target height of each middle pile; the length of the flexible support cable is determined according to the target height of each middle pile and the distance between the middle piles, and the number of the flexible support cables is determined according to the number of long strings, wherein the long string is composed of multiple short spans; the engineering quantity table is generated according to the number of middle piles, the target height of each middle pile, the length of the flexible support cable and the number of the flexible support cables. That is, in the embodiment of the present application, the number of middle piles, the target height of each middle pile, the length of the flexible support cable and the number of the flexible support cables are accurately calculated by an intelligent algorithm, which improves the accuracy and efficiency of evaluating the material requirements of the workers, and solves the problem that the material requirements of the flexible photovoltaic support cannot be accurately evaluated in the related art.
[0097] In an exemplary embodiment, the second determination module 64 is used to determine a loss function, wherein the loss function includes: an angle loss function and a height adjustment loss function; calculate the gradient of the loss function at the initial height, wherein the gradient is used to indicate the rate of change of the loss function at the initial height; update the initial height according to the gradient to obtain the target height of each center pile.
[0098] In an exemplary embodiment, the second determination module 64 is used to determine the geographical location corresponding to the photovoltaic system; determine the initial coordinates of each center pile in the target application based on the geographical location and the initial height; determine the initial angle corresponding to three adjacent center piles based on the initial coordinates, and determine the adjusted angle corresponding to three adjacent center piles based on the adjusted height and the adjusted coordinates.
[0099] In an exemplary embodiment, a first determination module 62 is used to determine multiple first rectangular patterns corresponding to the photovoltaic component in a target application, and determine the coordinates of the center point of the long side of each first rectangular pattern; input the coordinates of the center point of the long side of each first rectangular pattern into a first set; determine the adjacent point coordinates of each long side center point coordinate in the first set based on a KD tree algorithm, wherein the adjacent point coordinates are the coordinates in the first set; establish a connection relationship between the coordinates of each long side center point and the corresponding adjacent point coordinates to obtain a first map; and determine the short span according to the path in the first map.
[0100] In an exemplary embodiment, the first determination module 62 is used to determine multiple second rectangular patterns corresponding to the short span in the target application, and determine the short side center point coordinates of each second rectangular pattern; input the short side center point coordinates of each second rectangular pattern into a second set; determine the adjacent point coordinates of each short side center point coordinate in the second set based on the KD tree algorithm, wherein the adjacent point coordinates of each short side center point coordinate are the coordinates in the second set; establish a connection relationship between each short side center point coordinate and the corresponding adjacent point coordinates to obtain a second map; determine the long string according to the path in the second map.
[0101] In an exemplary embodiment, the first determination module 62 is used to determine that the middle pile exists between any short span and the other short spans when there is a connection relationship between any short span and the other short spans; and to determine that the middle pile does not exist between any short span and the other short spans when there is no connection relationship between any short span and the other short spans.
[0102] Optionally, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for generating a bill of quantities when run.
[0103] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0104] S1, determining the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system;
[0105] S2, determining an initial height of each center pile, and optimizing the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile;
[0106] S3, determining the length of the flexible support cable according to the target height of each center pile and the distance between two center piles, and determining the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans;
[0107] S4, generating a bill of quantities according to the number of the middle piles, the target height of each middle pile, the length of the flexible support cables, and the number of the flexible support cables.
[0108] Optionally, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0109] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0110] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0111] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0112] S1, determining the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system;
[0113] S2, determining an initial height of each center pile, and optimizing the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile;
[0114] S3, determining the length of the flexible support cable according to the target height of each center pile and the distance between two center piles, and determining the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans;
[0115] S4, generating a bill of quantities according to the number of the middle piles, the target height of each middle pile, the length of the flexible support cables, and the number of the flexible support cables.
[0116] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0117] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0118] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0119] An embodiment of the present application also provides a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0120] Optionally, in this embodiment, the computer program product may be configured to perform the following steps through a computer program:
[0121] S1, determining the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system;
[0122] S2, determining an initial height of each center pile, and optimizing the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile;
[0123] S3, determining the length of the flexible support cable according to the target height of each center pile and the distance between two center piles, and determining the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans;
[0124] S4, generating a bill of quantities according to the number of the middle piles, the target height of each middle pile, the length of the flexible support cables, and the number of the flexible support cables.
[0125] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0127] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a bill of quantities, characterized in that: include: Determine the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system; Determine the initial height of each center pile, and optimize the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile; Determining the length of the flexible support cable according to the target height of each center pile and the distance between two center piles, and determining the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans; A bill of quantities is generated based on the number of center piles, the target height of each center pile, the length of the flexible support cables, and the number of the flexible support cables.
2. The method for generating a bill of quantities according to claim 1, characterized in that: Optimizing the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile includes: Determine a loss function, wherein the loss function includes: an angle loss function and a height adjustment loss function; Calculating the gradient of the loss function at the initial height, wherein the gradient is used to indicate the rate of change of the loss function at the initial height; The initial height is updated according to the gradient to obtain the target height of each center pile.
3. The method for generating a bill of quantities according to claim 2, characterized in that: In the process of optimizing the initial height of each center pile according to a preset algorithm to obtain the target height of each center pile, the method further includes: Determining a geographical location corresponding to the photovoltaic system; Determining the initial coordinates of each center pile in the target application according to the geographic location and the initial height; The initial angles corresponding to the three adjacent center piles are determined according to the initial coordinates, and the adjusted angles corresponding to the three adjacent center piles are determined according to the adjusted heights and the adjusted coordinates.
4. The method for generating a bill of quantities according to claim 1, characterized in that: Before determining the number of center piles according to the connection relationship between each short span and other short spans, the method further includes: determining a plurality of first rectangular patterns corresponding to the photovoltaic assembly in the target application, and determining the coordinates of the center point of the long side of each first rectangular pattern; Inputting the coordinates of the center point of the long side of each first rectangular pattern into the first set; Determine the coordinates of the adjacent points of the coordinates of the center point of each long side in the first set based on the KD tree algorithm, wherein the coordinates of the adjacent points are the coordinates in the first set; Establishing a connection relationship between the coordinates of the center point of each long side and the coordinates of the corresponding adjacent points to obtain a first map; The short span is determined according to the path in the first graph.
5. The method for generating a bill of quantities according to claim 1, characterized in that: Before determining the number of middle piles according to the connection relationship between each short span and other short spans, the method further includes: determining a plurality of second rectangular patterns corresponding to the short spans in the target application, and determining the coordinates of the center point of the short side of each second rectangular pattern; Inputting the coordinates of the center point of the short side of each second rectangular pattern into the second set; Determine the coordinates of the points adjacent to the coordinates of the center point of each short side in the second set based on the KD tree algorithm, wherein the coordinates of the points adjacent to the coordinates of the center point of each short side are the coordinates in the second set; Establishing a connection relationship between the coordinates of the center point of each short side and the coordinates of the corresponding adjacent points to obtain a second map; The long string is determined according to the path in the second graph.
6. The method for generating a bill of quantities according to claim 1, characterized in that: Before determining the number of middle piles according to the connection relationship between each short span and other short spans, the method further includes: when any short span has a connection relationship with the other short spans, determining that the middle pile exists between the any short span and the other short spans; In the case that any of the short spans does not have a connection relationship with the other short spans, it is determined that any of the short spans does not have the middle pile with the other short spans.
7. A device for generating a table of quantities, characterized in that: include: A first determination module is used to determine the number of middle piles according to the connection relationship between each short span and other short spans, wherein the short span is composed of photovoltaic modules, and the middle piles and flexible support cables are components of photovoltaic flexible supports in the photovoltaic system; A second determination module is used to determine an initial height of each center pile, and optimize the initial height of each center pile according to a preset algorithm to obtain a target height of each center pile; a third determination module, configured to determine the length of the flexible support cable according to the target height of each center pile and the distance between the center piles, and to determine the number of the flexible support cables according to the number of long strings, wherein the long string is composed of a plurality of short spans; A generating module is used to generate a bill of quantities according to the number of the center piles, the target height of each center pile, the length of the flexible support cables and the number of the flexible support cables.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.
9. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
