A glass layout training data generation method and system

By generating glass layout training data through cyclic cutting, the problems of data dependence and insufficient pattern modeling in existing methods are solved, achieving high-quality data generation and model adaptability, reducing production costs and improving production efficiency.

CN123159104APending Publication Date: 2026-11-24HANGZHOU JUBO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611361748.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing methods for generating training data for glass layout rely on random generation or generative adversarial networks, which lack modeling of real production patterns. This leads to deviations in the size distribution of finished products from reality. Furthermore, due to the commercial confidentiality involved in glass production data, it is difficult to obtain real data, resulting in a data dependency dilemma.

Method used

Through a cyclic cutting process, based on the preset residual material generation mechanism, cutting method determination mechanism, and continuous cutting judgment mechanism, the system generates glass layout training data on its own, simulating real cutting rules and avoiding dependence on external real data.

Benefits of technology

The generated training data is of high quality, reflects industrial production conditions, adapts to real-world scenarios, improves the learning effect of the glass layout optimization model, reduces production costs, and increases efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159104A_ABST
    Figure CN123159104A_ABST
Patent Text Reader

Abstract

This application proposes a method and system for generating glass layout training data, relating to the field of artificial intelligence technology. The method includes: first, acquiring a glass sheet with a target width and height as the initial layout area; then, based on its width-to-height ratio, selecting a horizontal or vertical cutting direction for the first layer; and alternating the cutting direction for subsequent layers. Next, a loop is executed, with the preset condition being that the number of cutting layers reaches a preset value or the current layer's finished product no longer needs cutting. During the loop, leftover material for the current layer is generated according to a preset leftover material generation mechanism, and the cutting method is determined according to a preset cutting method determination mechanism. Based on this, the current layer's layout area is cut to obtain the finished product. Then, a preset continuing cutting determination mechanism is used to determine the finished product; if further cutting is needed, the next layer's layout area is generated. Finally, glass layout training data is generated based on the loop execution results. This technical solution can both avoid data dependence and accurately simulate real cutting rules to generate glass layout training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method and system for generating glass typesetting training data. Background Technology

[0002] The method for generating glass layout training data refers to simulating the real cutting process through specific rules or algorithms to generate layout scheme data that conforms to the laws of industrial production, which is then used to train the glass layout optimization model.

[0003] Currently, the generation of glass layout training data mainly relies on random generation methods and generative adversarial networks (GANs). Random generation methods generate cutting directions and positions based on simple rules. While this method can generate data quickly, it lacks modeling of real-world production patterns, leading to deviations in the size distribution of finished products and making it difficult for trained models to adapt to real-world scenarios. GANs generate synthetic data through adversarial training. However, training a GAN model requires a large amount of real-world layout data as a foundation. Glass production data, due to its involvement with company trade secrets, is difficult to obtain through public datasets or web scraping, causing this method to fall into a vicious cycle of "no data → unable to train a GAN → unable to generate data."

[0004] Therefore, there is an urgent need for a glass layout training data generation method that can both avoid data dependence and accurately simulate real cutting rules to address the above problems. Summary of the Invention

[0005] The purpose of this application is to provide a method and system for generating glass layout training data, which can both avoid data dependence and accurately simulate real cutting rules to generate glass layout training data.

[0006] This application is implemented as follows: Firstly, this application provides a method for generating glass layout training data, comprising the following steps: obtaining a glass sheet with a target width and height as the original layout area; selecting horizontal or vertical cutting for the first layer based on the aspect ratio of the original layout area, and alternating cutting directions for subsequent layers; executing a loop process until a preset condition is met, wherein the preset condition is that the number of cutting layers reaches a preset value, or the finished product of the current layer is determined to no longer require cutting; the loop process is as follows: generating the remaining material for the current layer according to a preset remaining material generation mechanism; determining the cutting method for the current layer according to a preset cutting method determination mechanism; cutting the layout area of ​​the current layer according to the remaining material and cutting method to obtain the finished product of the current layer; determining the finished product of the current layer according to a preset continuing cutting determination mechanism, so as to generate the layout area of ​​the next layer when it is determined that further cutting is required; and generating glass layout training data based on the execution result of the loop process.

[0007] Secondly, this application provides a glass typesetting training data generation system, which includes: The raw data acquisition module is configured to acquire the target width and height of the original glass sheet as the raw layout area. The cutting direction determination module is configured to select horizontal or vertical cutting for the first layer based on the aspect ratio of the original layout area, and then alternate cutting directions for subsequent layers. The cyclic cutting module is configured to execute a cyclic process until a preset condition is met. The preset condition is that the cutting layer reaches a preset value, or the finished product of the current layer is determined to no longer require cutting. The cyclic process is as follows: generate the remaining material for the current layer according to a preset remaining material generation mechanism; determine the cutting method for the current layer according to a preset cutting method determination mechanism; cut the layout area of ​​the current layer according to the remaining material and cutting method to obtain the finished product of the current layer; and determine the finished product of the current layer according to a preset continuing cutting determination mechanism, so that when it is determined that further cutting is needed, the layout area of ​​the next layer is generated. The training data generation module is configured to generate glass layout training data based on the execution results of the cyclic process.

[0008] Thirdly, this application provides an electronic device including a memory for storing one or more programs; a processor; and, when the one or more programs are executed by the processor, implementing the method as described in any one of the first aspects above.

[0009] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of the first aspects above.

[0010] Compared with the prior art, this application has at least the following advantages or beneficial effects: This application proposes a method for generating glass layout training data. Its iterative process simulates real-world cutting rules, resulting in higher-quality generated glass layout training data. This data fully reflects various situations and patterns in glass layout during industrial production, providing rich and accurate learning samples for training glass layout optimization models. Furthermore, unlike generative adversarial networks (GANs), which require a large amount of real-world layout data, this application does not rely on external real-world data, but only performs iterative cutting and data processing through its own set rules and mechanisms. From acquiring the original layout area to iterative cutting to generate finished products, and finally generating training data, the entire process is completed within a closed rule system. This approach, through pre-set mechanisms for generating leftover material, determining cutting methods, and determining continued cutting, achieves self-generation and iteration of data, avoiding the difficulty in obtaining glass production data due to its involvement in corporate trade secrets. It successfully breaks the vicious cycle of "no data → unable to train GAN → unable to generate data" that GANs are trapped in. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart of an embodiment of a glass typesetting training data generation method according to this application; Figure 2 This is a schematic diagram of the layout of the glass sheets in one embodiment of this application; Figure 3 This is a schematic diagram of the finished layout of the first level in one embodiment of this application; Figure 4 This is a schematic diagram of the finished layout of the second level in one embodiment of this application; Figure 5 This is a schematic diagram of the finished product layout at the third level in one embodiment of this application; Figure 6 This is a schematic diagram of the finished layout of the fourth level in one embodiment of this application; Figure 7 This is a structural block diagram of an embodiment of a glass typesetting training data generation system according to this application; Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of this application.

[0013] Icons: 101, Raw data acquisition module; 102, Cutting direction determination module; 103, Loop cutting module; 104, Training data generation module; 201, Processor; 202, Memory; 203, Communication interface. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. In the description of this application, except for descriptions related to hierarchy such as "first level," "second level," etc., which have an actual relationship or order, other relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0015] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the various embodiments and features described below can be combined with each other. Example 1

[0016] Please see Figure 1 The method for generating training data for glass typesetting includes the following steps: Step S101: Obtain the target width and height of the original glass sheet as the original typesetting area. Figure 2 A glass plate with a width of 2500 and a height of 2000 is shown.

[0017] Step S102: Select the horizontal or vertical direction to cut the first level according to the aspect ratio of the original layout area, and then switch the cutting direction alternately for subsequent levels.

[0018] It should be noted that this application selects the first-layer cutting direction based on the aspect ratio of the original layout area, and then alternates the cutting direction for subsequent layers. This standardized cutting method is more in line with the conventional operation of glass cutting in actual production and can accurately simulate real cutting scenarios. Figure 3-6 As shown, it assumes that the first level is a vertical cut (cutting along the height direction), the second level is a horizontal cut (cutting along the width direction), the third level is a vertical cut again, and the fourth level becomes a horizontal cut once more. The decision of whether the first level is a vertical or horizontal cut can be made by statistically analyzing the percentage of layouts with higher cutting rates obtained using either horizontal or vertical cutting for different aspect ratios. This percentage is then used to determine whether to choose horizontal or vertical cutting for the original layout area with different aspect ratios, thus strongly correlated with the cutting direction of the first level with the high cutting rate.

[0019] In this application, "level" refers to the recursively generated segmentation levels during the glass sheet cutting process, used to describe the depth of the cutting path and the derivation relationship of the cutting blocks. Specifically, the first level (level 1) is the initial cutting level of the glass sheet. Each subsequent recursive cutting operation increases the level number by 1, with a maximum limit of 5 levels (generally limited to a maximum of 5 levels due to glass cutting industry constraints). Example: Sheet → First-level cutting (level 1) → Sub-block cutting (level 2) → Grandchild block cutting (level 3) → ... Each level's cutting operation generates several sub-blocks, forming branch nodes in a tree structure, with the level number corresponding to the tree's depth. It is important to note that when cutting subsequent levels such as the second and third levels, the four-step iterative process processes each block within that level.

[0020] For example, when the glass sheet is cut into such... Figure 3After the two blocks shown, a specific cyclical cutting process is performed on both blocks. It's important to understand that throughout the entire glass cutting and layout process, each generated block may require further cutting. Figure 4 The diagram showing the second-level finished layout uses an example where only the left block is cut. However, this doesn't mean that only the left block will be cut in practice. In other possible scenarios, the right block will also be considered when cutting. Figure 4 In the specific example shown, after being processed by the preset continuing-cutting determination mechanism, the right-hand block was determined to be unnecessary to cut further. In other words, for each block generated after cutting, a decision on whether to continue cutting is made based on the corresponding rules. Figure 4 It is just one specific manifestation among many possible situations.

[0021] Please continue reading. Figure 1 Step S103: Execute the loop process until a preset condition is met. The preset condition is that the cutting level reaches a preset value, or the finished product of the current level is determined to be no longer cut. The loop process is as follows: generate the leftover material of the current level according to the preset leftover material generation mechanism; determine the cutting method of the current level according to the preset cutting method determination mechanism; cut the layout area of ​​the current level according to the leftover material and cutting method of the current level to obtain the finished product of the current level; determine the finished product of the current level according to the preset continuing cutting determination mechanism, so that when it is determined that it needs to be cut again, the layout area of ​​the next level is generated.

[0022] Step S104: Based on the execution results of the loop process, generate glass layout training data (exemplarily, it may include a layout scheme dataset of finished product size, position and cutting path).

[0023] In the above embodiments, the loop terminates when any of the following conditions are met during execution: (1) The cutting level reaches the preset value (generally, the maximum is 5 due to the limitations of glass cutting in the glass industry). (2) The finished product at the current level is determined to be no longer needed to be cut (confirmed based on size threshold or probability model). Here, size threshold means that if the size of the finished product at the current level is less than a threshold, no further cutting will be performed; probability model means that a probability generation formula related to the current level is used to determine whether further cutting is needed.

[0024] During the execution loop, data is generated through four iterations: (1) Residual material generation: Residual material of the current level is generated according to the preset residual material generation mechanism; (2) Cutting method selection: Cutting method of the current level is determined according to the preset cutting method determination mechanism; (3) Cutting execution: Cutting the layout area of ​​the current level according to the residual material and cutting method of the current level to obtain the finished product of the current level; (4) Continuous cutting judgment: The finished product of the current level is judged according to the preset continuous cutting judgment mechanism, so that when it is judged that it needs to be cut again, the layout area of ​​the next level is generated.

[0025] Through these four iterative steps, the generated glass layout training data can more closely resemble the cutting logic in actual industrial production, effectively solving the problem of random generation methods lacking modeling of real production patterns. In other words, this four-step iterative process accurately simulates real cutting rules, resulting in higher quality glass layout training data. This data can fully reflect various situations and patterns in glass layout during industrial production, thus providing rich and accurate learning samples for training the glass layout optimization model.

[0026] Meanwhile, unlike generative adversarial networks (GANs), which require a large amount of real typesetting data, this application does not rely on external real data. It only performs cyclical cutting and data processing through its own set rules and mechanisms. From obtaining the original typesetting area to cyclically cutting to generate the finished product, and finally generating training data, the entire process is completed within a closed rule system. This processing method, through preset waste material generation mechanisms, cutting method determination mechanisms, and continuous cutting judgment mechanisms, achieves the self-generation and iteration of data. It avoids the problem of difficulty in obtaining glass production data due to the involvement of corporate trade secrets, and successfully breaks the vicious cycle of "no data → unable to train GAN → unable to generate data" that GANs fall into.

[0027] Furthermore, because the generated training data is of high quality and conforms to actual production patterns, the glass layout optimization model trained using this data can better adapt to real-world scenarios. In practical applications, the model can more accurately optimize layouts, improve the utilization rate of glass raw materials, reduce production costs, and increase production efficiency.

[0028] Based on the aforementioned scheme, in some implementations of this application, the step of selecting horizontal or vertical cutting of the first level according to the aspect ratio of the original layout area includes: when the aspect ratio of the original layout area is greater than the aspect ratio threshold, vertical cutting is selected; otherwise, horizontal cutting is selected.

[0029] Among the aforementioned implementation methods, this technical solution further refines the rules for selecting the first-level cutting direction based on the aspect ratio of the original layout area, building upon the existing glass layout training data generation method. Specifically, it introduces the concept of an aspect ratio threshold, comparing the aspect ratio of the original layout area with this threshold to determine whether the first level should use horizontal or vertical cutting.

[0030] When the aspect ratio of the original layout area is greater than the aspect ratio threshold, it means that the area is relatively "wider," and vertical cutting is chosen. Vertical cutting may be more beneficial in the subsequent layout process, allowing the glass sheet to be rationally divided into finished products that meet the requirements, avoiding overly long or irregular cut blocks, thereby improving the rationality and efficiency of the layout. Conversely, when the aspect ratio of the original layout area is less than or equal to the aspect ratio threshold, it indicates that the area is relatively "taller" or has a more balanced aspect ratio, and horizontal cutting is chosen. Horizontal cutting can better adapt to the characteristics of this aspect ratio and also helps to obtain a more rational layout result.

[0031] In summary, by introducing the concept of aspect ratio threshold, it can quickly determine whether to cut horizontally or vertically on the first level, improving the efficiency of data generation. Furthermore, by adjusting the aspect ratio threshold, the choice of cutting direction can be optimized according to specific circumstances to adapt to different production conditions and finished product requirements, making the entire glass layout training data generation method more universal and practical.

[0032] Based on the aforementioned scheme, in some implementations of this application, the step of generating the remaining material of the current level according to the preset remaining material generation mechanism includes: calculating the probability that there is remaining material in the current level according to the first probability formula to obtain a first probability value, wherein the output of the first probability formula increases with the increase of the level; comparing the first probability value with a first random number, wherein if the first probability value is greater than the first random number, the remaining material of the current level that satisfies the maximum value of remaining material is randomly generated, otherwise the remaining material of the current level is set to not exist, wherein the first random number is a number randomly generated within a first preset range.

[0033] Based on experience and statistical analysis from actual production, it is known that the deeper the layer, the greater the probability of leftover material. In some of the aforementioned implementation methods, whether leftover material is generated at the current layer is quantitatively controlled by a first probability formula (e.g., derived from a transformation of the sigmoid function) and a first random number (e.g., a number randomly generated between 0 and 1). This avoids the blindness of random generation, making the generated leftover material situation more consistent with actual production scenarios, which helps improve the quality of subsequent glass layout training data. Furthermore, by comparing with the first random number, uncertainty is introduced, meaning that leftover material may or may not be generated at the same layer. Therefore, even at the same layer, the randomness of leftover material generation will lead to diverse layout paths. This avoids a single data generation pattern, allowing for coverage of more potential leftover material scenarios in actual production (such as the diversity of leftover material size and location).

[0034] It should be noted that "leftover materials" refers to scraps or offcuts not included in the finished product (such as...). Figure 3 In the diagram, the thin strip on the far right is the leftover material, and the remaining two large pieces are the finished product. The maximum value of the leftover material refers to the maximum width or height of the leftover material. Therefore, by limiting the width or height of the leftover material to within the maximum value (e.g., 50), the size of the leftover material will be ensured to be reasonable.

[0035] Based on the aforementioned scheme, in some implementations of this application, the maximum value of the remaining material is determined based on the comparison results of multiple generated data and real data.

[0036] In some of the aforementioned implementation methods, the determination of the maximum surplus material value employs a method based on comparing multiple generated data sets with actual data. Specifically, during the glass layout training data generation process, data is generated multiple times, and these generated data are compared and analyzed with glass layout data from actual production. Through this comparison, the differences and patterns in surplus material conditions between the generated data and actual data are identified, thereby determining a suitable maximum surplus material value. This maximum surplus material value will be used in the subsequent random generation of surplus material at the current level that satisfies the maximum surplus material value, ensuring that the generated surplus material data both exhibits a certain degree of randomness and closely approximates actual production conditions to a certain extent.

[0037] For example, the maximum value of the remaining material can be obtained in the following way: Set a candidate range for the maximum value of surplus material (e.g., 5 to 100, with a step size of 5) to cover common surplus material sizes in industrial production. Then, compare each generated data set with the actual data, and select the maximum value of the surplus material width or height corresponding to the smallest KL divergence value by calculating the KL divergence value. For example, if experiments show that the KL divergence value between the generated and actual data is smallest when the maximum surplus material value is 50, then this value is determined to be the optimal parameter. The formula for calculating the KL divergence value is as follows: ,in, To calculate the KL divergence value, To generate a data distribution, For the true data distribution, To generate the data density function, This is the density function of the real data.

[0038] The maximum value of the leftover material directly affects the aspect ratio distribution of the generated data. If the leftover material is too large, it may result in large pieces of leftover material that do not conform to reality in the generated data; if it is too small, it may ignore the leftover material sizes commonly found in real production. In the example above, by traversing the candidate values ​​and selecting the parameter with the smallest KL divergence, the distribution of leftover material in the generated data will be ensured to be highly consistent with the real scene. Furthermore, traditional methods (such as GANs) rely on a large amount of real data to train the generator, while this solution can determine the parameters through limited comparison and optimization, which can reduce the cost of data generation.

[0039] Based on the aforementioned scheme, in some implementations of this application, the first probability formula is: ,in, This represents the current level number. This is the first probability value obtained from the calculation.

[0040] In actual glass cutting, the probability of scrap material generation typically increases with the number of cutting layers. The first probability formula is designed based on this actual production pattern. By using this formula, the calculated probability value increases with the number of cutting layers, more reasonably simulating the probability of scrap material generation during actual cutting. This first probability formula provides a clear and concise method for calculating the probability of scrap material existence. Operators only need to set the current layer... By substituting the values ​​into the formula, the corresponding probability value can be quickly calculated. This eliminates the need for complex analysis and judgment. It simplifies the probability calculation steps in the data generation process and improves the efficiency of data generation.

[0041] It should be noted that this first probability formula is actually derived by transforming the sigmoid function. In this case, the first random number can be a random number between 0 and 1 generated by a random number generator. For example, the first probability formula can also be transformed using the following rules: ,in, and For adjustable parameters (in some of the above implementation methods) ).

[0042] Based on the aforementioned scheme, in some implementations of this application, the step of determining the cutting method of the current level according to the preset cutting method determination mechanism includes: simultaneously generating multiple random cutting schemes and multiple equal-division cutting schemes based on the blocks to be cut at the current level; calculating the KL divergence value between the aspect ratio distribution of the finished product and the actual distribution of each cutting scheme; selecting the cutting scheme with the smallest KL divergence value as the execution scheme to obtain the cutting method of the current level.

[0043] In some of the above implementation methods, a dynamic optimization mechanism based on KL divergence (the preset cutting method is determined based on KL divergence) is used to quantify the statistical distribution difference between the candidate cutting scheme and the real data in order to select the optimal cutting method. This can avoid the problem of product distribution distortion caused by blind selection.

[0044] It should be noted that simple random cutting (such as...) Figure 3 The first level (which is randomly divided into two parts) may generate a large number of finished products that do not conform to the actual production pattern (such as being too small in size or having abnormal proportions), causing the data distribution to deviate from reality. Fixed, evenly divided cutting (such as...) Figure 4 (As shown in the diagram, the left block of the first level is divided into four equal parts in the second level.) While this can generate regular finished products, it cannot adapt to the flexible requirements of "combinations of finished products with the same width / height" in real production, resulting in insufficient data diversity. Thus, the incorrect choice of cutting method at each level will amplify the deviation in the distribution of finished products at each level, ultimately leading to a significant difference between the generated data and the real data.

[0045] In some of the aforementioned implementation methods, three random cutting schemes (e.g., random cutting position, random cutting quantity) are first generated to simulate the combination requirements of finished products with the same width / height in real production. Simultaneously, three evenly divided cutting schemes (e.g., 2 cuts, 3 cuts, and 4 cuts) are generated to adapt to the cutting scenario of batches of finished products of the same size in real production. Then, for the finished product dimensions generated by each candidate scheme, its aspect ratio distribution histogram is calculated, thereby calculating the KL divergence between this distribution and the actual data distribution. Finally, the candidate scheme with the smallest KL divergence value is selected from these six cutting schemes as the cutting method for the current level, ensuring that the generated finished product distribution most closely resembles the real production data.

[0046] In summary, among the aforementioned implementation methods, the use of KL divergence quantification and comparison forces the aspect ratio distribution of the generated data to align with the actual data, thus resolving the distribution distortion problem inherent in random / equal division methods. Furthermore, the candidate solutions include both random and equal division, preserving the diversity brought by randomness while meeting the needs of mass production through equal division, thus aligning with actual production scenarios. Additionally, the selection of each level of division scheme is independent and optimal, avoiding the cumulative effect of incorrect selections and ensuring overall data quality.

[0047] Based on the aforementioned scheme, in some implementations of this application, the step of determining the finished product of the current level according to the preset continuing cutting determination mechanism includes: calculating the probability that the current level needs to be cut again according to the second probability formula to obtain a second probability value, wherein the output of the second probability formula increases with the increase of the level; comparing the second probability value with a second random number, and determining that the current level needs to be cut again when the second probability value is less than the second random number, otherwise determining that it does not need to be cut again, wherein the second random number is a number randomly generated within a second preset range.

[0048] It should be noted that, based on statistical data from real-world data, the higher the layer, the lower the probability of continuing to cut. Forcing a maximum cutting layer (e.g., 5 layers) would not consider the differences in block size across different layers, potentially leading to premature termination of cutting for large shallow blocks (wasting cutting potential) or continued cutting for small deep blocks (generating invalid data). Conversely, using a fixed cutting probability (e.g., 50% probability of continuing cutting per layer) without modeling the real-world pattern of "lower cutting intention with deeper layers" would result in data distribution deviating from reality.

[0049] In some of the above implementations, although the second probability value increases with the increase of the level, which is contrary to the rule that "the deeper the level, the lower the willingness to cut", by introducing a second random number, when the second probability value is less than the second random number, it is determined that the current level needs to be cut again, which can satisfy the rule that "the deeper the level, the lower the willingness to cut". Of course, in some implementations of this application, the step of judging the finished product of the current level according to the preset continuing cutting judgment mechanism may also include: calculating the probability that the current level needs to be cut again according to the third probability formula to obtain the third probability value, the output of the third probability formula increasing with the increase of the level; comparing the third probability value with the third random number, and when the third probability value is greater than the third random number, it is determined that the current level needs to be cut again, otherwise, it is determined that it does not need to be cut again, wherein the third random number is a number randomly generated within a third preset range.

[0050] For example, the third probability formula can take the following form: ,in, This represents the current level number. The calculated third probability value, α For the attenuation center point (e.g.) α =3), used to control the starting level of probability decay. β For decay rate (e.g.) β =2), used to control the steepness of the probability decrease.

[0051] In some of the aforementioned implementations, the probability of determining that the current level needs further segmentation dynamically decreases with the level depth. This allows for sufficient segmentation of shallow, large blocks to improve data diversity while preventing excessive segmentation of deep, small blocks that generates invalid data. Furthermore, by using a second probability value and a second random number, the uncertainty of human decision-making in real-world production can be simulated, avoiding the generation of overly regular and rigid data.

[0052] Based on the aforementioned scheme, in some implementations of this application, the second probability formula is: ,in, This represents the current level number. This is the calculated second probability value.

[0053] The more layers a raw glass sheet is cut, the smaller the finished glass size becomes. Therefore, the deeper the layer, the less likely it is to be cut further; otherwise, blocks smaller than the minimum size will be defined as scrap, resulting in excessive scrap and reducing the cutting rate of the raw sheet. In some of the aforementioned implementation methods, a combination of a second probability formula and a second random number can simulate the real glass cutting process where "the deeper the layer, the lower the cutting intention." Simultaneously, it can simulate the uncertainty of human cutting decisions, generating data that is both realistic and diverse.

[0054] It should be noted that this second probability formula is actually obtained by transforming the sigmoid function. In this case, the second random number can be a random number between 0 and 1 generated by a random number generator. For example, the second probability formula can also be transformed using the following rules: ,in, k and μ For adjustable parameters (such as) k =1, μ =5).

[0055] Based on the aforementioned scheme, in some implementations of this application, the step of cutting the layout area of ​​the current level according to the remaining material and cutting method of the current level further includes: controlling the randomly generated bad areas on the left and / or top side of the block, and then cutting the layout area of ​​the current level according to the remaining material and cutting method of the current level.

[0056] In some of the above implementation methods, by introducing bad areas and controlling the randomly generated bad areas to the left and / or top of the block, and then cutting the layout area of ​​the current level according to the remaining material and cutting method of the current level, it is possible to simulate the situation where there are bad areas in the glass sheet, thereby generating special layout data, which can further generate richer glass layout training data. Example 2

[0057] Please see Figure 7 This application provides a glass typesetting training data generation system, which includes: The raw data acquisition module 101 is configured to acquire a glass sheet with a target width and height as the raw layout area. The cutting direction determination module 102 is configured to select horizontal or vertical cutting for the first layer based on the aspect ratio of the raw layout area, and then alternately switch cutting directions for subsequent layers. The cyclic cutting module 103 is configured to execute a cyclic process until a preset condition is met, wherein the preset condition is that the cutting layer reaches a preset value, or the finished product of the current layer is determined to no longer require cutting. The cyclic process is as follows: generating the remaining material of the current layer according to a preset remaining material generation mechanism; determining the cutting method of the current layer according to a preset cutting method determination mechanism; cutting the layout area of ​​the current layer according to the remaining material and cutting method of the current layer to obtain the finished product of the current layer; and determining the finished product of the current layer according to a preset continuing cutting determination mechanism, so as to generate the layout area of ​​the next layer when it is determined that further cutting is required. The training data generation module 104 is configured to generate glass layout training data based on the execution result of the cyclic process.

[0058] For the specific implementation process of the above system, please refer to the glass layout training data generation method provided in Example 1, which will not be repeated here.

[0059] In some implementations of this application, the step of selecting horizontal or vertical cutting of the first level based on the aspect ratio of the original layout area includes: selecting vertical cutting when the aspect ratio of the original layout area is greater than the aspect ratio threshold, and selecting horizontal cutting otherwise.

[0060] In some implementations of this application, generating the remaining material of the current level according to the preset remaining material generation mechanism includes: calculating the probability that there is remaining material in the current level according to the first probability formula to obtain a first probability value, wherein the output of the first probability formula increases with the increase of the level; comparing the first probability value with a first random number, wherein if the first probability value is greater than the first random number, the remaining material of the current level that satisfies the maximum value of remaining material is randomly generated, otherwise the remaining material of the current level is set to not exist, wherein the first random number is a number randomly generated within a first preset range.

[0061] In some implementations of this application, the maximum value of the remaining material is determined based on the comparison results of multiple generated data and real data.

[0062] In some implementations of this application, the first probability formula is: ,in, This represents the current level number. This is the first probability value obtained from the calculation.

[0063] In some implementations of this application, the step of determining the cutting method of the current level according to the preset cutting method determination mechanism includes: simultaneously generating multiple random cutting schemes and multiple equal-division cutting schemes based on the blocks to be cut at the current level; calculating the KL divergence value between the aspect ratio distribution of the finished product and the actual distribution of each cutting scheme; selecting the cutting scheme with the smallest KL divergence value as the execution scheme to obtain the cutting method of the current level.

[0064] In some implementations of this application, the step of determining the finished product of the current level according to the preset continuing cutting determination mechanism includes: calculating the probability that the current level needs to be cut again according to the second probability formula to obtain a second probability value, wherein the output of the second probability formula increases with the increase of the level; comparing the second probability value with a second random number, and determining that the current level needs to be cut again when the second probability value is less than the second random number, otherwise determining that it does not need to be cut again, wherein the second random number is a number randomly generated within a second preset range.

[0065] In some implementations of this application, the second probability formula is: in, This represents the current level number. This is the calculated second probability value.

[0066] In some implementations of this application, the step of cutting the layout area of ​​the current level according to the remaining material and cutting method of the current level further includes: controlling the randomly generated bad areas to the left and / or top of the block, and then cutting the layout area of ​​the current level according to the remaining material and cutting method of the current level. Example 3

[0067] Please see Figure 8 This application provides an electronic device including at least one processor 201 and at least one memory 202. The processor 201 and memory 202 are directly connected to each other, or communicate with each other through a communication interface 203, or are electrically connected through one or more communication buses or signal lines to achieve data transmission or interaction. The memory 202 stores program instructions executable by the processor 201, which calls the program instructions to execute a glass typesetting training data generation method. For example, implementing: Obtain the target width and height of the original glass sheet as the initial layout area. Based on the aspect ratio of the original layout area, select either horizontal or vertical cutting for the first layer, and alternate cutting directions for subsequent layers. Execute this loop until a preset condition is met. The preset condition is that the number of cutting layers reaches a preset value, or the finished product of the current layer is determined to require no further cutting. The loop process is as follows: generate the remaining material for the current layer according to a preset remaining material generation mechanism; determine the cutting method for the current layer according to a preset cutting method determination mechanism; cut the layout area of ​​the current layer according to the remaining material and cutting method to obtain the finished product of the current layer; determine the finished product of the current layer according to a preset continuing cutting determination mechanism, so that if it is determined that further cutting is required, the layout area of ​​the next layer is generated. Based on the execution results of the loop process, generate glass layout training data.

[0068] The memory 202 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0069] The processor 201 can be an integrated circuit chip with signal processing capabilities. The processor 201 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0070] Understandable. Figure 8 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.

[0071] Example 4 This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor 201, implements a method for generating glass typesetting training data. For example, it implements: Obtain the target width and height of the original glass sheet as the initial layout area. Based on the aspect ratio of the original layout area, select either horizontal or vertical cutting for the first layer, and alternate cutting directions for subsequent layers. Execute this loop until a preset condition is met. The preset condition is that the number of cutting layers reaches a preset value, or the finished product of the current layer is determined to require no further cutting. The loop process is as follows: generate the remaining material for the current layer according to a preset remaining material generation mechanism; determine the cutting method for the current layer according to a preset cutting method determination mechanism; cut the layout area of ​​the current layer according to the remaining material and cutting method to obtain the finished product of the current layer; determine the finished product of the current layer according to a preset continuing cutting determination mechanism, so that if it is determined that further cutting is required, the layout area of ​​the next layer is generated. Based on the execution results of the loop process, generate glass layout training data.

[0072] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for generating training data for glass typesetting, characterized in that, Includes the following steps: Obtain the original glass sheet with the target width and height as the original typesetting area; Choose to cut the first level horizontally or vertically based on the aspect ratio of the original layout area, and then alternate the cutting direction for subsequent levels. The loop process is executed until a preset condition is met. The preset condition is that the cutting level reaches a preset value, or the finished product of the current level is determined to no longer need to be cut. The loop process is as follows: according to the preset waste material generation mechanism, the waste material of the current level is generated. Based on the preset cutting method determination mechanism, the cutting method of the current level is determined; based on the remaining material and cutting method of the current level, the layout area of ​​the current level is cut to obtain the finished product of the current level; The current layer of finished products is judged according to the preset continuous cutting judgment mechanism, so that when it is determined that further cutting is needed, the layout area of ​​the next layer is generated. Based on the execution results of the loop process, glass layout training data is generated.

2. The method according to claim 1, characterized in that, The step of selecting horizontal or vertical cutting of the first level based on the aspect ratio of the original layout area includes: If the aspect ratio of the original layout area is greater than the aspect ratio threshold, select vertical cutting; otherwise, select horizontal cutting.

3. The method according to claim 1, characterized in that, The step of generating the current level of waste material according to the preset waste material generation mechanism includes: The probability of having leftover material in the current level is calculated according to the first probability formula, and the first probability value is obtained. The output of the first probability formula increases with the increase of the level. The first probability value is compared with the first random number. If the first probability value is greater than the first random number, the remaining material of the current level that satisfies the maximum value of the remaining material is randomly generated. Otherwise, the remaining material of the current level is set to not exist. The first random number is a number randomly generated within the first preset range.

4. The method according to claim 3, characterized in that, The maximum value of the remaining material is determined based on the comparison results of multiple generated data and real data.

5. The method according to claim 3, characterized in that, The first probability formula is: ,in, This represents the current level number. This is the first probability value obtained from the calculation.

6. The method according to claim 1, characterized in that, The mechanism for determining the cutting method of the current level based on the preset cutting method includes: Based on the blocks to be cut at the current level, multiple random cutting schemes and multiple equal-division cutting schemes are generated simultaneously. Calculate the KL divergence value between the aspect ratio distribution of the finished product and the actual distribution for each cutting scheme, and select the cutting scheme with the smallest KL divergence value as the execution scheme to obtain the cutting method of the current level.

7. The method according to claim 1, characterized in that, The step of determining the finished product at the current level according to the preset continuous cutting determination mechanism includes: The probability of needing to continue cutting at the current level is calculated using the second probability formula, resulting in the second probability value. The output of the second probability formula increases with the increase of the level. The second probability value is compared with the second random number. If the second probability value is less than the second random number, it is determined that the current level needs to be cut again. Otherwise, it is determined that no further cutting is needed. The second random number is a number randomly generated within the second preset range.

8. The method according to claim 7, characterized in that, The second probability formula is: ,in, This represents the current level number. This is the calculated second probability value.

9. The method according to claim 1, characterized in that, The process of cutting the layout area of ​​the current level according to the remaining material and cutting method of the current level also includes: After controlling the randomly generated bad areas to the left and / or top of the block, the layout area of ​​the current level is then cut according to the remaining material and cutting method of the current level.

10. A glass typesetting training data generation system, characterized in that, include: The raw data acquisition module is configured to acquire the target width and height of the original glass sheet as the raw layout area; The cutting direction determination module is configured to: select horizontal or vertical cutting for the first level based on the aspect ratio of the original layout area, and then alternately switch the cutting direction for subsequent levels; The cyclic cutting module is configured to: execute a cyclic process until a preset condition is met, wherein the preset condition is that the cutting level reaches a preset value, or the finished product of the current level is determined to no longer need to be cut, and the cyclic process is: generate the leftover material of the current level according to a preset leftover material generation mechanism. Based on the preset cutting method determination mechanism, the cutting method of the current level is determined; based on the remaining material and cutting method of the current level, the layout area of ​​the current level is cut to obtain the finished product of the current level; The current layer of finished products is judged according to the preset continuous cutting judgment mechanism, so that when it is determined that further cutting is needed, the layout area of ​​the next layer is generated. The training data generation module is configured to generate glass layout training data based on the execution results of the loop process.