Woven pattern generation method and device and electronic equipment

By integrating mechanical performance prediction and enhancement models with AI algorithms, precise control over the number of weaving threads and mechanical properties is achieved, solving the limitations of traditional weaving techniques, improving weaving efficiency and product quality, and adapting to diversified market demands.

CN121637586APending Publication Date: 2026-03-10SHANGHAI TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Traditional weaving techniques have limitations in design flexibility, production efficiency, and product consistency. They are difficult to precisely control the number of weave threads and mechanical strength, and they cannot meet the needs of high-performance materials and complex structures.

Method used

By integrating a mechanical performance prediction model and a reinforcement model using AI algorithms, and generating a network weaving path, the system automatically identifies the image to be woven and optimizes the weaving path, thereby achieving precise control over the number of weaving threads and mechanical performance.

Benefits of technology

It improves weaving efficiency and precision, reduces human error, ensures the strength and consistency of woven products, adapts to market demand for personalized and customized products, reduces resource waste, and lowers production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637586A_ABST
    Figure CN121637586A_ABST
Patent Text Reader

Abstract

The invention provides a knitting pattern generation method and device and electronic equipment. The generation method comprises the steps of S1, obtaining a to-be-knitted image, anchor point coordinates and an expected knitting line number; s2, generating a network knitting path according to the to-be-knitted image, the anchor point coordinates and the expected knitting line number; s3, simulating a weaving result according to the network weaving path to obtain a woven product pattern; s4, outputting a pattern generation result; wherein the pattern generation result comprises the current knitted product pattern and the network knitting path. According to the method, the to-be-knitted image is automatically identified to generate the knitted product pattern and the network knitting path, mechanical property analysis can be carried out by combining knowledge of material mechanics and structural mechanics, the network knitting path is continuously optimized according to a mechanical property result, accurate control over the number of knitting threads and the mechanical property is achieved, and the production efficiency is improved. The knitting efficiency and accuracy are greatly improved, human errors are reduced, the strength of knitted products is improved, and efficient and accurate knitting design and production are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of textile technology, and more particularly to a method, apparatus, and electronic device for generating woven patterns. Background Technology

[0002] In recent years, although traditional weaving techniques have made some progress, they still rely on manual labor or simple machinery, limiting production efficiency and material performance improvements, and making it difficult to precisely control the number of threads (density) and mechanical strength. Furthermore, traditional weaving production methods, due to their long production cycles and low design-to-finish-product conversion rates, struggle to adapt to rapid market changes, significantly limiting the full potential of materials and the expansion of their applications. Moreover, with the increasing demand for high-quality, personalized, and functional fabrics from the textile industry, apparel design, and industrial fabric manufacturing sectors, consumers have higher expectations for product aesthetics, comfort, and durability. Traditional hand weaving or simple mechanized production can no longer meet the market's demand for diversified and customized products.

[0003] While existing weaving techniques and equipment have achieved a degree of automation, they still have limitations in design flexibility, production efficiency, and product consistency. For example, although some computer-aided design (CAD) tools are available to assist in pattern design, these tools struggle to achieve precise control over weave density and mechanical strength. These limitations hinder the further development of weaving technology in high-performance materials and complex structures. Furthermore, traditional weaving pattern design focuses more on appearance than mechanical performance, often resulting in insufficient strength or excessive use of raw materials. Summary of the Invention

[0004] The technical problem to be solved by this disclosure is to overcome the shortcomings of the prior art in terms of design flexibility, production efficiency and product consistency, and to provide a method, apparatus and electronic device for generating woven patterns.

[0005] This disclosure solves the above-mentioned technical problems through the following technical solution:

[0006] This disclosure provides a method for generating a woven pattern, the method comprising:

[0007] S1. Obtain the image to be woven, anchor point coordinates, and desired number of weaving threads;

[0008] S2. Generate a network weaving path based on the image to be woven, the anchor point coordinates, and the desired number of weaving lines;

[0009] S3. Obtain the woven product pattern based on the simulated weaving results of the network weaving path;

[0010] S4. Output the pattern generation result; wherein, the pattern generation result includes the current woven product pattern and the network weaving path.

[0011] Optionally, step S1 includes:

[0012] S11. Obtain the image to be woven, anchor point coordinates, desired number of weaving threads, and optimization mode;

[0013] Prior to step S4, the generation method further includes:

[0014] S5. Input the woven product pattern into the trained mechanical property prediction model to obtain the product stress distribution matrix and weight;

[0015] S6. Determine whether the stopping iteration condition is met. If the stopping iteration condition is not met, proceed to step S7; if the stopping iteration condition is met, proceed to step S8.

[0016] S7. Obtain the optimized network weaving path by taking the network weaving path, the preset number of iterations, the optimization mode, the product stress distribution matrix, and the weight input trained reinforcement model, and then proceed to step S3.

[0017] S8. Stop the iteration and go to step S4.

[0018] Optionally, step S2 includes:

[0019] The image to be woven is read in grayscale mode and converted into a binary image;

[0020] Determine the first coordinates of the non-zero pixels based on the binary image;

[0021] The pattern composed of non-zero pixels is scaled and adapted to a woven board of a preset size based on the first coordinates;

[0022] Determine the second coordinates of the rivet points on the braided board based on the anchor point coordinates and the pattern;

[0023] The third coordinate of the outline of the pattern is determined, and the DDA (Digital Differential Analyzer) algorithm is used to generate sequentially connected lines to fill the interior of the pattern based on the third coordinate and the desired number of weave lines; wherein, the network weave path is composed of sequentially connected lines, and the connection direction of the lines indicates the direction of the network weave path.

[0024] Optionally, the mechanical performance prediction model adopts a GAN (Generative Adversarial Network) model;

[0025] The reinforcement model adopts one of the following models: PPO (proximal policy optimization), genetic algorithm, and Q-learning algorithm.

[0026] Optionally, the GAN model includes a generator and a discriminator;

[0027] The generator employs an improved Unet architecture, which extracts and reconstructs image features through downsampling and upsampling paths of a deep symmetric structure, and is equipped with batch normalization and LeakyReLU activation functions after each convolutional layer;

[0028] The discriminator employs a PatchGAN architecture to locally evaluate the authenticity of the generated mechanics distribution map, enhancing its sensitivity to details through multiple downsampling layers.

[0029] Optionally, the GAN model is trained based on several woven pattern samples and corresponding mechanical distribution maps;

[0030] The mechanical distribution map is obtained by converting each pixel of the woven pattern sample into coarse-grained atoms, connecting adjacent atoms to form a microstructure model of the woven pattern sample, and performing molecular dynamics simulation on the microstructure model.

[0031] Optionally, when the reinforcement model adopts the PPO model, the PPO model adopts the Actor-Critic architecture, and the PPO model includes a location mapping module and multiple hidden layers;

[0032] The number of units in the hidden layer is set according to the processing power and accuracy requirements.

[0033] Optionally, the optimization modes include: a stress concentration point reduction mode for braided structures, a lightweight transformation mode for braided structures, and a simultaneous optimization mode for braided structure reinforcement and lightweighting resistance.

[0034] When the optimization mode adopts the stress concentration point reduction mode of the braided structure, the stopping iteration condition is that the stress concentration points of the product stress distribution matrix in the current round are reduced compared with the initial round, and the preset number of iterations is reached;

[0035] When the optimization mode adopts the lightweight transformation mode of the braided structure, the stopping iteration condition is that the weight of the current round is reduced compared to the initial round, and the preset number of iterations is reached;

[0036] When the optimization mode adopts the braided structure enhancement-lightweight resistance simultaneous optimization mode, the stopping iteration condition is that the stress concentration points and weight of the product stress distribution matrix in the current round are reduced compared to the initial round, and the preset number of iterations is reached.

[0037] This disclosure also provides a device for generating a woven pattern, the device comprising: an acquisition module, a network woven path generation module, a product pattern simulation module, and an output module;

[0038] The acquisition module is used to acquire the image to be woven, the anchor point coordinates, and the desired number of weaving threads;

[0039] The network weaving path generation module is used to generate a network weaving path based on the image to be woven, the anchor point coordinates, and the desired number of weaving lines.

[0040] The product pattern simulation module is used to simulate the weaving results based on the network weaving path to obtain the woven product pattern.

[0041] The output module is used to output the pattern generation result; wherein, the pattern generation result includes the current woven product pattern and the network weaving path.

[0042] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement the aforementioned method for generating a knitted pattern.

[0043] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.

[0044] The positive advancements of this disclosure are as follows: By integrating AI algorithms such as mechanical performance prediction models and reinforcement models, it can automatically identify the image to be woven, generate the pattern of the woven product and the network weaving path, combine knowledge of materials mechanics and structural mechanics to perform mechanical performance analysis, and continuously optimize the network weaving path based on the mechanical performance results. This achieves precise control over the number of weaving threads and mechanical properties, significantly improving weaving efficiency and accuracy. While effectively controlling weaving costs, it reduces human error and effectively improves the strength of woven products, achieving efficient and precise weaving design and production. It can serve the textile industry, clothing design, industrial fabric manufacturing, and other fields that require precise weaving patterns and structures. This technology can also serve the field of materials science, using AI technology to guide the generation of weaving patterns or structures that meet specific requirements. Attached Figure Description

[0045] Figure 1 A flowchart illustrating a method for generating a knitted pattern according to Embodiment 1 of this disclosure;

[0046] Figure 2 An example of a weaving image for a method of generating a weaving pattern provided in Embodiment 1 of this disclosure;

[0047] Figure 3An example of a woven product pattern provided by a method for generating a woven pattern according to Embodiment 1 of this disclosure;

[0048] Figure 4 A flowchart illustrating a specific implementation of a method for generating a knitted pattern according to Embodiment 1 of this disclosure;

[0049] Figure 5 A flowchart illustrating a specific implementation of step S2 of a method for generating a knitted pattern according to Embodiment 1 of this disclosure;

[0050] Figure 6 An example of adapting a method for generating a weaving pattern provided in Embodiment 1 of this disclosure to a pattern on a weaving board;

[0051] Figure 7 An example of a pattern outline for a method of generating a woven pattern provided in Embodiment 1 of this disclosure;

[0052] Figure 8 An example of the rivet points determined in a method for generating a woven pattern according to Embodiment 1 of this disclosure;

[0053] Figure 9 A schematic diagram of the mechanical properties of a method for generating a weave pattern before optimization, as provided in Embodiment 1 of this disclosure;

[0054] Figure 10 A schematic diagram illustrating the optimized mechanical properties of a method for generating a weave pattern provided in Embodiment 1 of this disclosure;

[0055] Figure 11 This is a schematic diagram of a woven pattern generation device provided in Embodiment 2 of this disclosure;

[0056] Figure 12 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of this disclosure. Detailed Implementation

[0057] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.

[0058] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0059] Example 1

[0060] Figure 1 A flowchart illustrating a method for generating a knitted pattern, provided as an exemplary embodiment of this disclosure, is included. The method includes:

[0061] S1. Obtain the image to be woven, anchor point coordinates, and desired number of weaving threads.

[0062] S2. Generate the network weaving path based on the image to be woven, anchor point coordinates, and desired number of weaving lines.

[0063] S3. Obtain the pattern of the woven product by simulating the weaving results based on the network weaving path.

[0064] S4. Output the pattern generation result. The pattern generation result includes the current woven product pattern and the network weaving path.

[0065] The network weaving path is a broken line with numerous turns from the starting point to the ending point, including the pattern formed by the broken line and the path direction (from the starting point to the ending point). The broken line can be decomposed into several lines connected end to end in sequence.

[0066] In an example of automatically weaving abdominal wall repair material using silk as the raw material, an image to be woven is obtained based on the abdominal wall wound. The woven product must cover the entire wound. An example of the image to be woven is shown below. Figure 2 As shown, an example of the corresponding woven product pattern is as follows: Figure 3 As shown, here Figure 3 The image in the image is relative to Figure 2 It's flipped upside down.

[0067] The pattern generation results can be provided to an automatic knitting machine for automated product weaving. The pattern generation results also include the finished product pattern, network weaving path, and parameters from the intermediate processes.

[0068] The method for generating woven patterns in this embodiment can serve a wider range of fields, such as the textile industry, clothing design, industrial fabric manufacturing, and materials science, thereby expanding the market applications of woven products.

[0069] In this embodiment, an AI algorithm integrating mechanical performance prediction models and reinforcement models can automatically identify the image to be woven, generate the woven product pattern and network weaving path, and combine knowledge of materials mechanics and structural mechanics to perform mechanical performance analysis. Based on the mechanical performance results, the network weaving path is continuously optimized, achieving precise control over the number of weaving threads and mechanical properties. This significantly improves weaving efficiency and accuracy, effectively controls weaving costs, reduces human error, and effectively improves the strength of woven products. It enables efficient and precise weaving design and production, serving the textile industry, clothing design, industrial fabric manufacturing, and other fields requiring precise weaving patterns and structures. This technology can also serve the field of materials science, using AI technology to guide the generation of weaving patterns or structures that meet specific requirements.

[0070] In one embodiment, refer to Figure 4 Step S1 includes:

[0071] S11. Obtain the image to be woven, anchor point coordinates, desired number of weaving threads, and optimization mode.

[0072] Before step S4, the generation method further includes:

[0073] S5. Input the woven product pattern into the trained mechanical property prediction model to obtain the product stress distribution matrix and weight.

[0074] S6. Determine whether the stopping iteration condition is met. If the stopping iteration condition is not met, proceed to step S7; if the stopping iteration condition is met, proceed to step S8.

[0075] S7. Obtain the optimized network weaving path from the trained reinforcement model using the network weaving path, preset iteration count, optimization mode, product stress distribution matrix, and weight input, and then proceed to step S3.

[0076] S8. Stop the iteration and go to step S4.

[0077] The design of the woven pattern is evaluated in real time using a mechanical performance prediction model, taking into account the physical properties of the material and the mechanical response under usage conditions. Through an iterative optimization process, the design is continuously adjusted to meet the mechanical performance requirements, with a particular focus on reducing stress concentration points to improve the durability and service life of the woven pattern design.

[0078] The reinforcement model is used to find the design solution that maximizes mechanical performance in a broad design space. As long as the stopping iteration condition is not met, the weaving pattern and its corresponding mechanical performance are continuously optimized iteratively.

[0079] In one embodiment, refer to Figure 5 Step S2 includes:

[0080] S21. Read the image to be woven in grayscale mode and convert it into a binary image.

[0081] S22. Determine the first coordinates of non-zero pixels based on the binary image.

[0082] S23. Based on the first coordinate, the pattern composed of non-zero pixels is scaled and adapted to the woven board of a preset size.

[0083] S24. Determine the second coordinates of the rivet points on the braided board based on the anchor point coordinates and the pattern.

[0084] S25. Determine the third coordinate of the pattern's outline. Based on the third coordinate and the desired number of weaving lines, use the DDA algorithm to generate lines that connect end to end to fill the interior of the pattern. The network weaving path is composed of lines that connect end to end, and the direction of the line connections indicates the direction of the network weaving path.

[0085] Among them, in such Figure 2 and Figure 3 In the example shown, the corresponding pattern is scaled to fit the preset size of the woven board. Figure 6 As shown, an example of the pattern outline is as follows: Figure 7 As shown, an example of a defined rivet point is as follows: Figure 8 As shown, the mechanical properties before optimization are as follows: Figure 9 As shown, the optimized mechanical properties are as follows: Figure 10 As shown.

[0086] Specifically, the specific processing of step S2 is as follows:

[0087] 1. Read the image: Use the cv2.imread function to read the image to be woven in grayscale mode;

[0088] 2. Convert it to a binary image: Use the cv2.threshold function to convert the grayscale image to a binary image. Set the threshold to 127, set pixel values ​​below the threshold to 0, and set pixel values ​​above the threshold to 255.

[0089] 3. Find the coordinates of the pattern: Use the np.where function to find the first coordinates of all pixels greater than 0 (i.e., the pixels where the pattern is located). Then convert these first coordinates to (row, column) format.

[0090] 4. Scale and fit the pattern to the knitting board: Scales and fits the points of the pattern to a knitting board of a specified size (example shown). Figure 6 As shown):

[0091] (1) Calculate the bounding box and aspect ratio of the contour: Use cv2.boundingRect to calculate the bounding box of the contour (example of the contour is shown below). Figure 7 (as shown), then calculate the aspect ratio.

[0092] (2) Scale the outline according to the aspect ratio and the required size.

[0093] (3) Scale and center the outline: Scale the outline using a scaling factor and translate the outline so that it starts at coordinates (0,0).

[0094] (4) Ensure that the third coordinate of the profile (i.e. the profile coordinate) is an integer: In order to accommodate the position of the nails on the braiding board, round the third coordinate and convert it to an integer.

[0095] 5. Draw the pattern: Based on the preset anchor point coordinates (i.e., endpoint coordinates), generate the second coordinates of all rivet points (example of a defined rivet point is shown below). Figure 8 (As shown). Generate the braided board diagram and the outline of the braided board, and draw the positions of the rivet points in the braided board.

[0096] 6. Read the coordinate points on the pattern outline, combine them with the desired number of weaving lines, use the DDA (Digital Differential Analyzer) algorithm to generate lines, and check whether these lines are inside the filled polygon to ensure that the generated lines are all inside the graphic.

[0097] The DDA algorithm is a simple and effective method for rasterizing straight line segments. The DDA algorithm approximates each pixel on the straight line incrementally using an incremental technique. The following is a detailed description of the DDA algorithm:

[0098] (1) Initialize variables: First, we need to determine the starting point (x0, y0) and ending point (x1, y1) of the straight line. Based on these points, calculate the increment and number of steps of the straight line (i.e., the line).

[0099] (2) Calculate the increment and number of steps: Calculate the increments dx and dy of the line in the x and y directions:

[0100] dx = x1 - x0

[0101] dy = y1 - y0

[0102] Determine the number of steps for the line based on the maximum value of dx and dy:

[0103] steps = max(|dx|, |dy|)

[0104] Calculate the increment in the x and y directions for each step:

[0105]

[0106] (3) Initialize the starting point: Set the initial point (x,y) as the starting point (x0,y0).

[0107] (4) Generate points on the line step by step: Use a loop to iteratively generate points on the line. In each iteration, add the calculated increment to the coordinates of the current point until all points for all steps have been generated. To ensure that the generated points are integer coordinates, rounding can be used to round them to the nearest integer.

[0108] (5) Save the generated points: Save each generated point to a list or other data structure, and finally return the coordinates of these points.

[0109] 7. Save the generated lines to a CSV file (a file extension), and in Python (a computer language), save the text file as a G-code file.

[0110] In one embodiment, the mechanical performance prediction model employs a GAN model.

[0111] The reinforcement model employs one of the following: the PPO model, the genetic algorithm model, or the Q-learning algorithm model.

[0112] Among them, the trained GAN model is used as a mechanical evaluation model to score the mechanical performance of the woven pattern design in real time. Taking into account the physical properties of the material and the mechanical response under the conditions of use, the design is continuously adjusted through an iterative optimization (strengthening) process to meet the mechanical performance requirements. Special attention is paid to reducing stress concentration points to improve the durability and service life of the woven pattern design.

[0113] By using trained reinforcement models, such as the PPO model, we can find design solutions that maximize mechanical performance in a broad design space.

[0114] In one embodiment, a GAN model includes a generator and a discriminator.

[0115] The generator employs an improved Unet architecture, which extracts and reconstructs image features through downsampling and upsampling paths of a deep symmetric structure. Each convolutional layer is followed by batch normalization and the LeakyReLU activation function.

[0116] The discriminator uses the PatchGAN architecture to locally evaluate the authenticity of the generated mechanical distribution map, and enhances its sensitivity to details through multiple downsampling layers.

[0117] The generator and discriminator are the two core components of the GAN model.

[0118] The generator employs an improved Unet architecture, responsible for converting input woven pattern design images of various sizes (such as 512*512 / 1024*1024, etc.) into corresponding mechanical distribution maps (i.e., stress distribution matrices). During this process, the generator extracts and reconstructs image features through downsampling and upsampling paths of a deep symmetric structure. Each convolutional layer is followed by batch normalization and a LeakyReLU activation function to enhance the model's non-linear processing capabilities. The upsampling stage utilizes transposed convolutional layers to progressively recover image details and preserves key features through skip connections.

[0119] The discriminator employs a PatchGAN architecture to locally evaluate the realism of the generated mechanical distribution maps, enhancing its sensitivity to details through multiple downsampling layers. Model training involves a large number of knitted pattern design images and their corresponding mechanical distribution maps, obtained through molecular dynamics simulations to ensure the scientific validity and practicality of the training data. During training, parameters are continuously adjusted using backpropagation and gradient descent methods, employing a combined strategy of GAN loss and L1 loss to optimize the global consistency and pixel-level accuracy of the generated images.

[0120] In addition, each convolutional kernel in the generator is 4x4 in size, with a stride of 2-4, and the dropout ratio in the upsampling stage can be adjusted to 0.3-0.7 to ensure that the model enhances feature representation while preventing overfitting.

[0121] In one embodiment, the GAN model is trained based on several woven pattern samples and the corresponding mechanical distribution map.

[0122] The mechanical distribution map is obtained by converting each pixel of the woven pattern sample into coarse-grained atoms, with adjacent atoms connecting to form a microstructure model of the woven pattern sample, and then performing molecular dynamics simulations on the microstructure model.

[0123] Molecular dynamics simulations play a crucial role in the preparation and processing of training data for GAN models, particularly in accurately simulating the mechanical behavior and response of woven pattern designs under stress. The core technology transforms each pixel of the woven pattern into coarse-grained "atoms" and connects them with their neighboring "atoms" to form a microstructural model of the woven pattern.

[0124] Specifically, the woven pattern is mapped onto a 23cm × 32cm rectangular frame, with atoms within 1-2cm of the boundary fixed as boundary conditions. Subsequently, the entire woven pattern is uniformly stretched by 10% to 20% in both the transverse and longitudinal directions, and energy minimization is performed using the conjugate gradient descent method to optimize the stretched structure. This method generates a high-quality, high-precision stress distribution dataset that not only comprehensively reflects the possible mechanical responses of different designs in practical use but also provides a scientific basis for training Generative Adversarial Network (GAN) models. Simultaneously, the simulation process fully considers the physical properties of the material, such as elastic modulus and yield strength, as well as environmental factors such as temperature and humidity, ensuring that the dataset realistically reflects real-world conditions.

[0125] In one embodiment, when the reinforcement model adopts the PPO model, the PPO model adopts an Actor-Critic architecture, and the PPO model includes a location mapping module and multiple hidden layers.

[0126] The number of units in the hidden layer is set according to processing power and accuracy requirements.

[0127] The reinforcement model is a neural network based on reinforcement learning, employing an Actor-Critic architecture. It includes a location mapping module and multiple hidden layers, where the number of units in the hidden layers can be flexibly configured to vary between 64, 128, or 256 to accommodate different processing power and accuracy requirements. This design enhances the network's ability to process complex design data, making the learning process more efficient and accurate.

[0128] In one embodiment, the optimization modes include: a mode for reducing stress concentration points in the braided structure, a mode for lightweighting the braided structure, and a mode for simultaneously optimizing the braided structure by enhancing and lightweighting its resistance.

[0129] When the optimization mode adopts the stress concentration point reduction mode of the braided structure, the stopping iteration condition is that the stress concentration points of the product stress distribution matrix in the current round are reduced compared with the initial round, and the preset number of iterations is reached.

[0130] When the optimization mode adopts the lightweight transformation mode of the braided structure, the stopping iteration condition is that the weight of the current round is reduced compared to the initial round, and the preset number of iterations is reached.

[0131] When the optimization mode adopts the braided structure enhancement-lightweight resistance optimization mode, the stopping iteration condition is that the stress concentration points and weight of the product stress distribution matrix in the current round are reduced compared with the initial round, and the preset number of iterations is reached.

[0132] In one embodiment, the generation method includes:

[0133] The network weaves a path and divides it into multiple segments, each containing the path coordinates of the line segments.

[0134] Add routing speed information to each path coordinate.

[0135] Save this data as a text file and convert it to G-code format.

[0136] The path file in G-code format can be stored on an SD card (a type of memory card). The SD card is then inserted into the automatic braiding machine. The automatic braiding machine reads the file from the SD card and starts the braiding process according to the selected file. A number of steel bars, matching the number of braiding endpoints, are inserted into the chassis of the braiding machine. The shape of the steel bar combination matches the geometry to be braided. Based on the algorithm, geometry, and chassis specifications, the coordinates of the inserted steel bars are automatically generated.

[0137] The following are several application scenarios of the woven pattern generation method, which realizes automated design and optimization of woven paths, significantly improves production efficiency, reduces the time from design to production, and quickly transforms from proof of concept to physical production. Automated woven equipment reduces manual intervention, alleviates labor intensity, and lowers the error rate. It also enables rapid generation and adjustment of woven patterns to meet market demands for personalized and customized products, enhancing product market competitiveness; ensures woven products have excellent mechanical properties and meet stringent usage standards; optimizes material usage and production processes, reducing resource waste and lowering production costs; and can handle various types of fibers, thus adapting to a wider range of application scenarios.

[0138] Application Scenario 1:

[0139] In the field of medical devices, AI-powered automated weaving technology can be used to manufacture medical fabrics that meet specific mechanical properties, such as surgical suture sheets and stents. By precisely controlling the density and strength of the weaving, this technology ensures that medical products meet stringent biocompatibility and mechanical strength requirements. The AI ​​system can also customize weaving patterns according to surgical needs, ensuring the precise adaptability and functionality of each product. For example, a method and apparatus for automatically weaving abdominal wall repair materials using silk as raw material. First, the shape and size information of the abdominal wall wound is collected (with a photo of a ruler attached). Then, using an AI algorithm, a weaving pattern and path are generated based on the shape and size of the abdominal wall repair material required for the wound. The mechanical properties of the weaving path are then predicted and optimized to generate a weaving path with specified density, optimized strength, and less material usage. This is automatically converted into lathe language by the AI ​​system and imported into the self-designed and constructed automated weaving equipment proposed in this invention. The equipment automatically raises and lowers the required columns and executes the automated weaving process, ultimately obtaining the weaving pattern.

[0140] Application Scenario 2:

[0141] In the design and production of sports equipment, such as athletic shoes, AI algorithms can be used to design shoe fabrics based on the athlete's specific needs, such as weight, elasticity, and abrasion resistance. The AI ​​system analyzes the athlete's activity patterns and force distribution, generating weaving patterns and paths with optimized mechanical properties. Shoes made this way are not only lighter but also better suited for high-intensity athletic activities, improving performance while reducing material waste.

[0142] Application Scenario 3:

[0143] In the automotive interior sector, AI-guided automated weaving technology enables the production of car seat fabrics with optimized mechanical properties. AI algorithms predict the pressure distribution of passengers under common driving conditions and design the weaving structure of the seat fabric accordingly to enhance ride comfort and fabric durability. This technology not only improves seat functionality but also reduces costs and environmental impact by optimizing material usage.

[0144] Application Scenario 4:

[0145] In the field of aerospace materials, high-strength, lightweight woven composite materials are crucial. AI-optimized weaving paths can enhance the mechanical properties of materials, such as tensile strength and impact resistance, while maintaining their lightweight characteristics. This is particularly important for manufacturing aerospace structural components, as they often need to withstand high loads under extreme conditions without adding extra weight.

[0146] Example 2

[0147] Corresponding to the aforementioned embodiments of the method for generating woven patterns, this disclosure also provides embodiments of an apparatus for generating woven patterns.

[0148] Figure 11 This is a schematic diagram of a knitted pattern generation apparatus provided for an exemplary embodiment of the present disclosure. The apparatus includes: an acquisition module 11, a network knitting path generation module 12, a product pattern simulation module 13, and an output module 14.

[0149] The acquisition module 11 is used to acquire the image to be woven, the anchor point coordinates, and the expected number of weaving threads.

[0150] The network weaving path generation module 12 is used to generate a network weaving path based on the image to be woven, the anchor point coordinates, and the desired number of weaving lines.

[0151] The product pattern simulation module 13 is used to simulate the weaving results based on the network weaving path to obtain the woven product pattern.

[0152] Output module 14 is used to output the pattern generation result. The pattern generation result includes the current woven product pattern and the network weaving path.

[0153] In this embodiment, an AI algorithm integrating mechanical performance prediction models and reinforcement models can automatically identify the image to be woven, generate the woven product pattern and network weaving path, and combine knowledge of materials mechanics and structural mechanics to perform mechanical performance analysis. Based on the mechanical performance results, the network weaving path is continuously optimized, achieving precise control over the number of weaving threads and mechanical properties. This significantly improves weaving efficiency and accuracy, effectively controls weaving costs, reduces human error, and effectively improves the strength of woven products. It enables efficient and precise weaving design and production, serving the textile industry, clothing design, industrial fabric manufacturing, and other fields requiring precise weaving patterns and structures. This technology can also serve the field of materials science, using AI technology to guide the generation of weaving patterns or structures that meet specific requirements.

[0154] In one embodiment, the acquisition module 11 is further configured to acquire the image to be woven, anchor point coordinates, desired number of weaving threads, and optimization mode.

[0155] The device also includes: a mechanical performance prediction module 15, a judgment module 16, a reinforcement module 17, and a stop iteration module 18.

[0156] The mechanical property prediction module 15 is used to input the woven product pattern into the trained mechanical property prediction model to obtain the product stress distribution matrix and weight.

[0157] The judgment module 16 is used to determine whether the stopping iteration condition is met. If the stopping iteration condition is not met, the process is transferred to the reinforcement module 17; if the stopping iteration condition is met, the process is transferred to the stopping iteration module 18.

[0158] The reinforcement module 17 is used to obtain the optimized network weaving path from the reinforcement model trained with the network weaving path, preset iteration number, optimization mode, product stress distribution matrix and weight input, and then transfer it to the product pattern simulation module 13.

[0159] The Stop Iteration module 18 is used to stop the iteration and switch to the Output module 14.

[0160] In one embodiment, the network weaving path generation module 12 is also used to read the image to be woven in grayscale mode and convert it into a binary image.

[0161] The network weaving path generation module 12 is also used to determine the first coordinates of non-zero pixels based on the binary image.

[0162] The network weaving path generation module 12 is also used to scale and adapt the pattern composed of non-zero pixels onto a weaving board of a preset size according to the first coordinates.

[0163] The network weaving path generation module 12 is also used to determine the second coordinates of the rivet points on the weaving board based on the anchor point coordinates and the pattern.

[0164] The network weaving path generation module 12 is also used to determine the third coordinate of the pattern's outline. Based on the third coordinate and the desired number of weaving lines, the DDA algorithm is used to generate lines that are connected end-to-end in sequence to fill the interior of the pattern. The network weaving path is composed of these lines, and the direction of their connection indicates the direction of the network weaving path.

[0165] In one embodiment, the mechanical performance prediction model employs a GAN model.

[0166] The reinforcement model employs one of the following: the PPO model, the genetic algorithm model, or the Q-learning algorithm model.

[0167] In one embodiment, a GAN model includes a generator and a discriminator.

[0168] The generator employs an improved Unet architecture, which extracts and reconstructs image features through downsampling and upsampling paths of a deep symmetric structure. Each convolutional layer is followed by batch normalization and the LeakyReLU activation function.

[0169] The discriminator uses the PatchGAN architecture to locally evaluate the authenticity of the generated mechanical distribution map, and enhances its sensitivity to details through multiple downsampling layers.

[0170] In one embodiment, the GAN model is trained based on several woven pattern samples and the corresponding mechanical distribution map.

[0171] The mechanical distribution map is obtained by converting each pixel of the woven pattern sample into coarse-grained atoms, with adjacent atoms connecting to form a microstructure model of the woven pattern sample, and then performing molecular dynamics simulations on the microstructure model.

[0172] In one embodiment, when the reinforcement model adopts the PPO model, the PPO model adopts an Actor-Critic architecture, and the PPO model includes a location mapping module and multiple hidden layers.

[0173] The number of units in the hidden layer is set according to processing power and accuracy requirements.

[0174] In one embodiment, the optimization modes include: a mode for reducing stress concentration points in the braided structure, a mode for lightweighting the braided structure, and a mode for simultaneously optimizing the braided structure by enhancing and lightweighting its resistance.

[0175] When the optimization mode adopts the stress concentration point reduction mode of the braided structure, the stopping iteration condition is that the stress concentration points of the product stress distribution matrix in the current round are reduced compared with the initial round, and the preset number of iterations is reached.

[0176] When the optimization mode adopts the lightweight transformation mode of the braided structure, the stopping iteration condition is that the weight of the current round is reduced compared to the initial round, and the preset number of iterations is reached.

[0177] When the optimization mode adopts the braided structure enhancement-lightweight resistance optimization mode, the stopping iteration condition is that the stress concentration points and weight of the product stress distribution matrix in the current round are reduced compared with the initial round, and the preset number of iterations is reached.

[0178] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0179] Example 3

[0180] Figure 12 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the method for generating a knitted pattern as described in any of the above embodiments. Figure 12 The electronic device 90 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0181] like Figure 12 As shown, the electronic device 90 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including memory 92 and processor 91).

[0182] Bus 93 includes a data bus, an address bus, and a control bus.

[0183] The memory 92 may include volatile memory, such as random access memory (RAM) 921 and / or cache memory 922, and may further include read-only memory (ROM) 923.

[0184] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) program module 924, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0185] The processor 91 executes various functional applications and data processing by running computer programs stored in the memory 92, such as the method for generating woven patterns provided in any of the above embodiments.

[0186] Electronic device 90 can also communicate with one or more external devices 94 (e.g., keyboard, pointing device, etc.). This communication can be performed through input / output (I / O) interface 95. Furthermore, electronic device 90 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 96. As shown, network adapter 96 communicates with other modules of electronic device 90 via bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0187] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0188] In one embodiment, the electronic device further includes an automatic braiding machine, which includes a wire supply device, a braiding frame, and a motion system.

[0189] Thread supply device: This device is equipped with a spool that allows for the introduction of yarn at a controllable speed and maintains yarn tension using natural stretching force. It can accommodate yarns of different materials and thicknesses, ensuring the continuity and stability of the thread supply during the weaving process.

[0190] Woven frame: The woven frame is a structure designed to fix the woven pattern. It can be adjusted according to the requirements of the woven pattern to adapt to different woven needs.

[0191] Motion system: This system is connected to the wire feeding device and the braiding frame. It controls the guide rails, belts and other components through a motor to realize the movement of the wire in the horizontal plane (X-axis and Y-axis) and the movement of the braiding frame in the Z-axis, thereby precisely controlling the braiding path of the wire.

[0192] Processor 91 is also used to interpret G-code instructions and convert them into precise motion coordinates for the motion system, coordinating the entire weaving process.

[0193] In one embodiment, the processor 91 is also used for information exchange within the device via a data communication protocol.

[0194] The processor 91 is also used for real-time monitoring, which can monitor key parameters in the weaving process, such as thread routing and path optimization, to ensure the stability of the weaving process and product quality.

[0195] The processor 91 is also used to diagnose hardware and software faults and provide corresponding solutions to reduce the risk of production interruptions.

[0196] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A method of generating a weave pattern, characterized by, The generation method comprises: S1, obtaining an image to be knitted, anchor point coordinates and a desired number of knitting lines; S2, generating a network knitting path according to the image to be knitted, the anchor point coordinates and the desired number of knitting lines; S3, simulating a weaving result according to the network knitting path to obtain a product pattern after knitting; S4, outputting a pattern generation result; wherein the pattern generation result comprises the product pattern after knitting and the network knitting path.

2. The method of generating a knitting pattern according to claim 1, wherein, Step S1 comprises: S11, obtaining an image to be knitted, anchor point coordinates, a desired number of knitting lines and an optimization mode; Before step S4, the generation method further comprises: S5, inputting the product pattern after knitting into a trained mechanical property prediction model to obtain a product stress distribution matrix and a weight; S6, determining whether a stop iteration condition is met, if the stop iteration condition is not met, proceeding to step S7; if the stop iteration condition is met, proceeding to step S8; S7, inputting the network knitting path, a preset iteration number, the optimization mode, the product stress distribution matrix and the weight into a trained reinforcement model to obtain an optimized network knitting path, and proceeding to step S3; S8, stopping iteration, and proceeding to step S4.

3. The method of generating a knitting pattern according to claim 1, wherein, Step S2 comprises: reading the image to be knitted in a grayscale mode and converting it into a binary image; determining first coordinates of non-zero pixels according to the binary image; scaling and adapting a pattern composed of the non-zero pixels to a preset size of a knitting board according to the first coordinates; determining second coordinates of rivet points on the knitting board according to the anchor point coordinates and the pattern; determining third coordinates of contour lines of the pattern, and filling an interior of the pattern with lines connected in sequence and end-to-end according to the third coordinates and the desired number of knitting lines by using a DDA algorithm; wherein the network knitting path is composed of the lines connected in sequence and end-to-end, and a connection direction of the lines indicates a direction of the network knitting path.

4. The method of generating a weave pattern of claim 2, wherein, The mechanical property prediction model adopts a GAN model; The reinforcement model adopts one of a PPO model, a genetic algorithm model and a Q learning algorithm model.

5. The method of generating a weave pattern of claim 4, wherein, The GAN model comprises a generator and a discriminator; The generator adopts an improved Unet architecture, extracts and reconstructs image features through a deep symmetric structure of a down-sampling path and an up-sampling path, and is equipped with a batch normalization and a LeakyReLU activation function after each convolutional layer; The discriminator adopts a PatchGAN architecture, locally evaluates authenticity of a generated mechanical distribution map, and enhances sensitivity to details through multiple down-sampling layers.

6. The method of generating a weave pattern of claim 4, wherein, The GAN model is trained based on a plurality of knitting pattern samples and corresponding mechanical distribution maps; The mechanical distribution map is obtained by converting each pixel of the knitting pattern sample into a coarse-grained atom, connecting adjacent atoms to form a microstructure model of the knitting pattern sample, and performing molecular dynamics simulation on the microstructure model.

7. The method of generating a knitting pattern according to claim 4, wherein, When the reinforcement model adopts the PPO model, the PPO model adopts an Actor-Critic architecture, and the PPO model comprises a position mapping module and a plurality of hidden layers; The number of units of the hidden layer is set according to processing capacity and accuracy requirements.

8. The method of generating a knitting pattern according to claim 2, wherein, The optimization mode includes: a woven structure stress concentration point reduction mode, a woven structure lightweight modification mode, and a woven structure enhancement-lightweight antagonistic simultaneous optimization mode. When the woven structure stress concentration point reduction mode is adopted in the optimization mode, the stop iteration condition is stress concentration point reduction of the product stress distribution matrix of the current round compared with the initial round, and the preset iteration number is reached. When the woven structure lightweight modification mode is adopted in the optimization mode, the stop iteration condition is weight reduction of the current round compared with the initial round, and the preset iteration number is reached. When the woven structure enhancement-lightweight antagonistic simultaneous optimization mode is adopted in the optimization mode, the stop iteration condition is that both the stress concentration point and the weight of the product stress distribution matrix of the current round are reduced compared with the initial round, and the preset iteration number is reached.

9. A device for generating a woven pattern, characterized in that, The generation device includes: an acquisition module, a network weaving path generation module, a product pattern simulation module, and an output module. The acquisition module is used to acquire a to-be-weaved image, anchor point coordinates, and a desired number of weaving lines. The network weaving path generation module is used to generate a network weaving path according to the to-be-weaved image, the anchor point coordinates, and the desired number of weaving lines. The product pattern simulation module is used to simulate weaving results to obtain a product pattern after weaving according to the network weaving path. The output module is used to output a pattern generation result; wherein the pattern generation result includes the current product pattern after weaving and the network weaving path.

10. An electronic device comprising a memory, a processor, and a computer program stored on the memory for running on the processor, characterized in that, The processor executes the computer program to implement the generation method of the woven pattern in any one of claims 1 to 8.