Knowledge graph-based cloth research and development method and system, medium and computer
By constructing a knowledge graph and using the XGBoost algorithm model, the problems of high trial-and-error costs and long cycles in fabric development were solved, and efficient new fabric design was achieved.
Patent Information
- Application Number
- CN202410835215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-06
AI Technical Summary
Existing fabric research and development methods suffer from high trial-and-error costs, long development cycles, difficulty in understanding fiber materials and process technologies, and rapid changes in market demand with long design cycles.
By constructing a knowledge graph-based fabric development method, the correlation between fabric and yarn data is mined using the knowledge graph, and the XGBoost algorithm model is used for prediction to generate yarn type and textile process.
This shortened the fabric development cycle, reduced trial and error costs, improved development efficiency, and generated more practical and feasible new fabric design solutions.
Smart Images

Figure CN118607385A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fabric research and development, and more specifically, to a fabric research and development method, system, medium and computer based on a knowledge graph. Background Art
[0002] At present, the main methods for the development of new fabrics include traditional trial and error, computer-aided design, and simulation. Traditional trial and error methods require a lot of time and resources, are costly, and are inefficient. Computer-aided design can speed up the design process, but often lacks in-depth analysis and evaluation of fabric performance. Although simulation can reduce the cost of actual testing, it requires a lot of data support and has errors and deviations. In addition, there are still some pain points in the development of new fabrics. First, it takes a lot of time and effort to understand and master fiber materials and process technologies, and requires professional knowledge and experience. Secondly, market demand changes rapidly, and the design of new fabrics needs to keep up with market changes in a timely manner. Finally, the development cycle of new fabrics is long and requires a lot of time and resources. Summary of the invention
[0003] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a fabric research and development method, system, medium and computer based on knowledge graph, so as to overcome the shortcomings of the prior art in fabric research and development, such as high trial and error cost, long research and development cycle and large amount of time consumption.
[0004] The above technical objectives of the present invention are achieved through the following technical solutions: a fabric development method based on knowledge graph, comprising: S1. Obtain a fabric commodity data set; the fabric commodity data set includes a plurality of fabric commodity data; each piece of fabric commodity data is labeled to obtain at least one corresponding fabric attribute label; S2. Obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled to obtain at least one corresponding yarn attribute label; S3. According to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; and each second node also includes all yarn attribute tags corresponding to the yarn commodity data; S4, respectively mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; respectively mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; inputting all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and correspondingly obtaining a trained classification algorithm prediction model; S5. Acquire the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
[0005] Optionally, according to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph, including: Each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node; According to the corresponding relationship between the raw material of each fabric commodity and the corresponding yarn commodity data, an association relationship between each first node and at least one second node is respectively established.
[0006] Optionally, the number of occurrences of each fabric attribute label is determined respectively, and the corresponding number is recorded as the first number; it is determined whether the first number is greater than a preset first number threshold, and if so, the fabric attribute label corresponding to the first number is set as the third node; All first nodes having the cloth attribute label are respectively associated with third nodes corresponding to the cloth attribute label.
[0007] Optionally, the number of occurrences of each yarn attribute label is determined respectively, and the corresponding number is recorded as a second number; it is determined whether the second number is greater than a preset second number threshold, and if so, the yarn attribute label corresponding to the second number is set as the fourth node; All second nodes having the yarn attribute label are associated with the fourth nodes corresponding to the yarn attribute label.
[0008] Optionally, mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding includes: Using the Deep Walk algorithm, each first node is used as the initial node, and a step length of 4 steps is used to perform a random walk on the knowledge graph to obtain a corresponding first walk sequence; Using the Word2Vec word embedding algorithm, each first walk sequence is converted into the corresponding first graph embedding.
[0009] Optionally, mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding includes: Using the Node2Vec algorithm, taking each second node as the initial node, and performing a random walk on the knowledge graph with a step length of 4 steps, a corresponding second walk sequence is obtained; Using the Word2Vec word embedding algorithm, each second walk sequence is converted into a corresponding second graph embedding.
[0010] Optionally, the step of labeling each piece of fabric commodity data to obtain at least one corresponding fabric attribute label includes: Get product photos from fabric product data; Input the product photos into the pre-trained deep convolutional neural network to identify the product photos; correspondingly obtain several fabric attribute labels; Fabric attribute tags include: fabric type, fabric color, fabric texture, fabric style, fabric thickness, fabric structure, fabric properties, and fabric craftsmanship; The step of labeling each yarn commodity data to obtain at least one corresponding yarn attribute label includes: The yarn attribute labels include: yarn brand, yarn model, yarn material, yarn type, yarn process, yarn density, yarn diameter, yarn fineness, yarn strength and yarn process.
[0011] The fabric R&D system based on knowledge graph includes: The fabric commodity data labeling module is used to obtain a fabric commodity data set; the fabric commodity data set includes a plurality of fabric commodity data; each piece of fabric commodity data is labeled to obtain at least one corresponding fabric attribute label; The yarn commodity data labeling module is used to obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled respectively to obtain at least one corresponding yarn attribute label; Knowledge graph construction module: used to set each fabric commodity data as a first node and each yarn commodity data as a second node according to the preset association relationship to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; each second node also includes all yarn attribute tags corresponding to the yarn commodity data; Prediction model training module: used to map each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; map each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; input all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and obtain a trained classification algorithm prediction model; Fabric process prediction module: used to obtain the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
[0012] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0013] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0014] In summary, the present invention has the following beneficial effects: the present application provides a fabric development method based on a knowledge graph, by collecting existing fabric data and yarn data related to the fabric data, constructing a related knowledge graph, and mining and learning the relevance of the knowledge graph, so that the related model can learn and perceive the relationship between the entity type of the fabric and the attributes of the fabric. When people need to develop new fabrics, they only need to input the relevant fabric attributes into the prediction model to obtain the corresponding textile process and yarn type. Compared with the traditional trial and error method and computer-aided design, it can greatly shorten the research and development cycle, reduce the trial and error cost, and improve the research and development efficiency. The present application also takes into account factors such as the characteristics of fiber materials, the feasibility of fabric structure, and the feasibility of process technology, and can generate more practical and feasible new fabric design solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flow chart of the fabric development method based on knowledge graph of the present invention; Figure 2 This is a structural diagram of the fabric research and development system based on knowledge graph of the present invention; Figure 3 is an internal structure diagram of a computer device in an embodiment of the present invention; Figure 4 It is a flowchart for using deep convolutional neural network to identify fabric photos; Figure 5 This is a schematic diagram of Deep Walk node wandering; Figure 6 This is a schematic diagram of node2vec node movement.
[0016] In the figure: 1. Fabric product data labeling module; 2. Yarn product data labeling module; 3. Knowledge graph construction module; 4. Prediction model training module; 5. Fabric process prediction module. DETAILED DESCRIPTION
[0017] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. Several embodiments of the present invention are shown in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.
[0018] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0019] In the present invention, unless otherwise clearly specified and limited, the first feature being "above" or "below" the second feature may include the first and second features being in direct contact, or may include the first and second features being in contact not directly but through another feature between them. Moreover, the first feature being "above", "above" and "above" the second feature includes the first feature being directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. The first feature being "below", "below" and "below" the second feature includes the first feature being directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature. The terms "vertical", "horizontal", "left", "right", "above", "below" and similar expressions are for illustrative purposes only, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0020] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0021] The present invention provides a fabric development method based on knowledge graph, such as Figure 1 As shown, including: S1. Obtain a fabric commodity data set; the fabric commodity data set includes a plurality of fabric commodity data; each piece of fabric commodity data is labeled to obtain at least one corresponding fabric attribute label; S2. Obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled to obtain at least one corresponding yarn attribute label; S3. According to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; and each second node also includes all yarn attribute tags corresponding to the yarn commodity data; S4, respectively mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; respectively mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; inputting all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and correspondingly obtaining a trained classification algorithm prediction model; S5. Acquire the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
[0022] In practical applications, the data collection of cloth products mainly uses cameras to take pictures of cloth products, and uses 1x, 10x, and infrared sensing devices to obtain cloth pictures and light wave data information. Through information annotation, the material, type, craftsmanship, color and other elements of the cloth are annotated, and it is ensured that these images have sufficient details and accurate labels. Fabric type: Cloth may be made of different types of materials, such as cotton, linen, silk, etc. Color: The color of the cloth is an important feature that may affect its appearance and use. Texture: Cloth may have different textures, such as fine grid texture or rough coarse grain. Style: Cloth may have different styles, such as wavy, striped or plant patterns. Thickness: Cloth may have different thicknesses, which may affect its use and performance. Fabric structure: Cloth may have different fabric structures, such as fabric, wool or polyester. Fabric properties: color, drape, transparency, elasticity. Craftsmanship: such as knitting, woven, etc. By identifying these dimensions, the image recognition system can accurately identify the type and characteristics of the cloth. Further, such as Figure 4As shown; deep convolutional neural networks or other machine learning algorithms can be used to identify these dimensional models of cloth. The goal of model training is to output labels such as material, type, texture, color, time, etc., and form embedding information of cloth varieties. During the training process, the hyperparameters of the model can be adjusted so that the model performs well on the training data and does not overfit. Use test data to evaluate the performance of the model and ensure that it can be used in the real world. Deploy the model to the application so that users can input images into the model and obtain predicted cloth-related labels and multi-dimensional embedding information. Enter the collected cloth data into the product database.
[0023] Generally speaking, the raw materials of fabrics are yarns, so the data of raw materials are collected, and the raw materials such as yarn materials, types, processes, density, diameter, properties and other elements are labeled through information labeling, and ensure that these images have sufficient details and accurate labels. Brand and model: The brand and model of yarn products are unique identifiers, which need to be recorded and used for subsequent data analysis and mining. Specifications: The specifications of yarn products include indicators such as wire diameter, fineness, strength, etc. Materials: Materials include fiber raw materials such as cotton, linen, silk, and wool. Process: Such as elasticity, breathability, etc. Origin and manufacturer: The origin and manufacturer of yarn products. Collect and organize this data and enter it into the database.
[0024] In this application, the XGBOOST algorithm model is a classification algorithm model. During the training process, the physical attributes of the fabric are classified based on the fabric attributes as the classification standard to obtain a trained model. When predicting the fabric process, the required fabric attributes are input into the classification model, and based on the fabric attributes, the physical attributes that meet the requirements are searched to obtain the corresponding fabric process, yarn type selection, fabric thickness, fabric texture and other related data. The fabric can be produced according to the data and the characteristics of the fabric can be verified.
[0025] Furthermore, according to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph, including: Each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node; According to the corresponding relationship between the raw material of each fabric commodity and the corresponding yarn commodity data, an association relationship between each first node and at least one second node is respectively established.
[0026] In practical applications, the content of the knowledge graph mainly includes: nodes and the connection relationship between nodes; in this application, it is first necessary to determine the textile fabric knowledge graph: determine the scope of the knowledge graph as the fabric design and production field of the textile industry, and the goal is to improve the efficiency and quality of new fabric design solutions. The nodes in this application mainly include entity types; entity types mainly include fiber materials, fabric structures, process technologies, air permeability, elasticity, thickness, count and other entities. The preset association relationship is to connect the raw materials with the corresponding yarn products after determining the raw materials of the fabric, that is, to connect the first node with the second node according to the type of raw materials; when multiple yarns are needed for weaving, one fabric can also be connected to multiple yarns, that is, to connect the first node with multiple second nodes.
[0027] Furthermore, the number of occurrences of each fabric attribute label is determined respectively, and the corresponding number is recorded as the first number; whether the first number is greater than a preset first number threshold is determined, and if so, the fabric attribute label corresponding to the first number is set as the third node; and all first nodes having the fabric attribute label are respectively associated with the third nodes corresponding to the fabric attribute label.
[0028] In practical applications, when setting up the first node corresponding to the fabric, it is necessary to add the corresponding attribute labels of the fabric in the node; for some common or important attributes of the fabric, such as waterproof, breathable, four-way stretch, etc., there are related features in a variety of fabrics, so the fabric attribute can be separated from the first node as a new attribute node, and connected to other first nodes, so that the knowledge graph can be more easily perceived by the model learning related features.
[0029] Furthermore, the number of occurrences of each yarn attribute label is determined respectively, and the corresponding number is recorded as the second number; whether the second number is greater than a preset second number threshold is determined, and if so, the yarn attribute label corresponding to the second number is set as the fourth node; all the second nodes having the yarn attribute label are respectively associated with the fourth node corresponding to the yarn attribute label.
[0030] In practical applications, when setting up the second node corresponding to the yarn, it is also necessary to add the corresponding attribute of the yarn to the second node; for some important or common attributes of the yarn, such as fiber length, fiber diameter, fiber strength, etc., there are related features in a variety of yarns, so the attribute can be separated from the second node as a yarn-related attribute node, that is, the fourth node; the fourth node is connected to the second node with the attribute. This makes it easier for the knowledge graph to be learned by the model to perceive the relevant features.
[0031] Furthermore, the mapping of each first node to a low-dimensional vector space to obtain a corresponding first graph embedding includes: Using the Deep Walk algorithm, each first node is used as the initial node, and a step length of 4 steps is used to perform a random walk on the knowledge graph to obtain a corresponding first walk sequence; Using the Word2Vec word embedding algorithm, each first walk sequence is converted into the corresponding first graph embedding.
[0032] In practical applications, DeepWalk is a graph embedding algorithm based on random walks. Its basic idea is to regard the neighboring nodes of a node as context and use word embedding algorithms such as Word2Vec to embed the node into a low-dimensional vector space. a. Generate a node adjacency matrix A. b. Starting from an initial node, follow the random walk strategy and continuously move to the nodes adjacent to it. c. Repeat the above steps to generate multiple walk paths. These paths are the "sentences" in the DeepWalk algorithm. d. Use the Word2Vec model to train the "sentences" to obtain the embedding vector of each node. Figure 5 As shown in the figure, it is a walking sequence generated by DEEP WALK. The starting node is In the case of The root node is walked with a step length of 4, and its walk sequence (The route marked by arrows in the figure) passes through points marked as , , , .
[0033] Furthermore, mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding includes: using a Node2Vec algorithm, taking each second node as an initial node, performing a random walk on the knowledge graph with a step length of 4 steps, and obtaining a corresponding second walk sequence; using a Word2Vec word embedding algorithm to convert each second walk sequence into a corresponding second graph embedding.
[0034] In practical applications, node2vec is a graph embedding algorithm based on random walks. Its basic idea is to learn the embedding vector of nodes by controlling the jumping strategy of nodes in random walks. Node2Vec adjusts the probability of random walks to balance the results of graph embedding between "homogeneity" and "structurality". Node2vec still uses random walks to obtain the neighbor sequence of vertices, but the difference is that node2vec uses a biased random walk. "Homogeneity" means that the embedding expressions of adjacent network nodes should be similar, for example, u and Node. "Structural" means that network nodes with similar structures need to have similar embedding expressions, such as u and s6 nodes. Given the current vertex , visit the next vertex The probability is:
[0035] in is the vertex and vertices The unnormalized transition probability between is the normalization constant.
[0036] like Figure 6 As shown in the figure, in order to express the structure of the graph network, the BFS (Breadth First Search) method should be used for sampling. This is because BFS can scan local structures. At the same time, in order to express the homogeneity of the graph structure, the DFS (Depth First Search) method is used for scanning. By adjusting the probability of random walks, the scanning process can be balanced between BFS and DFS. The process of Node2vec is as follows: a. Obtain the interaction sequence between users and items. b. Generate the corresponding item relationship graph based on the generated interaction sequence. c. Use the improved random walk method (a mixture of BFS and DFS) to generate the item sequence. d. Embed the generated sequence through the word2vec model.
[0037] Furthermore, the step of labeling each piece of fabric commodity data to obtain at least one corresponding fabric attribute label includes: Get product photos from fabric product data; Input the product photos into the pre-trained deep convolutional neural network to identify the product photos; correspondingly obtain several fabric attribute labels; Fabric attribute tags include: fabric type, fabric color, fabric texture, fabric style, fabric thickness, fabric structure, fabric properties, and fabric craftsmanship; The step of labeling each yarn commodity data to obtain at least one corresponding yarn attribute label includes: The yarn attribute labels include: yarn brand, yarn model, yarn material, yarn type, yarn process, yarn density, yarn diameter, yarn fineness, yarn strength and yarn process.
[0038] like Figure 2 As shown, the present invention also provides a fabric research and development system based on a knowledge graph, including: The fabric commodity data labeling module is used to obtain a fabric commodity data set; the fabric commodity data set includes a plurality of fabric commodity data; each piece of fabric commodity data is labeled to obtain at least one corresponding fabric attribute label; The yarn commodity data labeling module is used to obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled respectively to obtain at least one corresponding yarn attribute label; Knowledge graph construction module: used to set each fabric commodity data as a first node and each yarn commodity data as a second node according to the preset association relationship to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; each second node also includes all yarn attribute tags corresponding to the yarn commodity data; Prediction model training module: used to map each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; map each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; input all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and obtain a trained classification algorithm prediction model; Fabric process prediction module: used to obtain the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
[0039] For the specific definition of the fabric research and development system based on the knowledge graph, please refer to the definition of the fabric research and development method based on the knowledge graph above, which will not be repeated here. Each module in the above-mentioned fabric research and development system based on the knowledge graph can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0040] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a fabric development method based on a knowledge graph is implemented.
[0041] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0042] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: S1. Obtain a fabric commodity data set; the fabric commodity data set includes a plurality of fabric commodity data; each piece of fabric commodity data is labeled to obtain at least one corresponding fabric attribute label; S2. Obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled to obtain at least one corresponding yarn attribute label; S3. According to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; and each second node also includes all yarn attribute tags corresponding to the yarn commodity data; S4, respectively mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; respectively mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; inputting all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and correspondingly obtaining a trained classification algorithm prediction model; S5. Acquire the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
[0043] In one embodiment, according to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph, including: Each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node; According to the corresponding relationship between the raw material of each fabric commodity and the corresponding yarn commodity data, an association relationship between each first node and at least one second node is respectively established.
[0044] In one embodiment, the number of occurrences of each fabric attribute label is determined respectively, and the corresponding number is recorded as the first number; it is determined whether the first number is greater than a preset first number threshold, and if so, the fabric attribute label corresponding to the first number is set as the third node; All first nodes having the cloth attribute label are respectively associated with third nodes corresponding to the cloth attribute label.
[0045] In one embodiment, the number of occurrences of each yarn attribute label is determined respectively and recorded as the second number; it is determined whether the second number is greater than a preset second number threshold, and if so, the yarn attribute label corresponding to the second number is set as the fourth node; all second nodes having the yarn attribute label are respectively associated with the fourth node corresponding to the yarn attribute label.
[0046] In one embodiment, mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding comprises: Using the Deep Walk algorithm, each first node is used as the initial node, and a step length of 4 steps is used to perform a random walk on the knowledge graph to obtain a corresponding first walk sequence; Using the Word2Vec word embedding algorithm, each first walk sequence is converted into the corresponding first graph embedding.
[0047] In one embodiment, mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding includes: Using the Node2Vec algorithm, taking each second node as the initial node, and performing a random walk on the knowledge graph with a step length of 4 steps, a corresponding second walk sequence is obtained; Using the Word2Vec word embedding algorithm, each second walk sequence is converted into a corresponding second graph embedding.
[0048] In one embodiment, the step of labeling each piece of fabric commodity data to obtain at least one corresponding fabric attribute label includes: Get product photos from fabric product data; Input the product photos into the pre-trained deep convolutional neural network to identify the product photos; correspondingly obtain several fabric attribute labels; Fabric attribute tags include: fabric type, fabric color, fabric texture, fabric style, fabric thickness, fabric structure, fabric properties, and fabric craftsmanship; The step of labeling each yarn commodity data to obtain at least one corresponding yarn attribute label includes: The yarn attribute labels include: yarn brand, yarn model, yarn material, yarn type, yarn process, yarn density, yarn diameter, yarn fineness, yarn strength and yarn process.
[0049] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0050] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0051] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. Fabric development method based on knowledge graph, It is characterized in that include: S1. Obtain a data set of fabric products; The fabric commodity data set includes a number of fabric commodity data; Label each piece of fabric commodity data respectively to obtain at least one corresponding fabric attribute label; S2. Obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled to obtain at least one corresponding yarn attribute label; S3. According to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; and each second node also includes all yarn attribute tags corresponding to the yarn commodity data; S4, respectively mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; respectively mapping each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; inputting all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and correspondingly obtaining a trained classification algorithm prediction model; S5. Acquire the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
2. According to the knowledge graph-based fabric development method of claim 1, It is characterized in that According to the preset association relationship, each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node, to construct a knowledge graph, including: Each piece of fabric commodity data is set as a first node, and each piece of yarn commodity data is set as a second node; According to the corresponding relationship between the raw material of each fabric commodity and the corresponding yarn commodity data, an association relationship between each first node and at least one second node is respectively established.
3. According to the knowledge graph-based fabric development method of claim 1, It is characterized in that Determine the number of occurrences of each fabric attribute label respectively, and record the corresponding number as the first number; determine whether the first number is greater than a preset first number threshold, and if so, set the fabric attribute label corresponding to the first number as the third node; All first nodes having the cloth attribute label are respectively associated with third nodes corresponding to the cloth attribute label.
4. The fabric development method based on knowledge graph according to claim 1, It is characterized in that Determine the number of occurrences of each yarn attribute label respectively, and record the corresponding number as the second number; determine whether the second number is greater than a preset second number threshold, and if so, set the yarn attribute label corresponding to the second number as the fourth node; All second nodes having the yarn attribute label are associated with the fourth nodes corresponding to the yarn attribute label.
5. The fabric development method based on knowledge graph according to claim 1, It is characterized in that The method of mapping each first node to a low-dimensional vector space to obtain a corresponding first graph embedding comprises: Using the Deep Walk algorithm, each first node is used as the initial node, and a step length of 4 steps is used to perform a random walk on the knowledge graph to obtain a corresponding first walk sequence; Using the Word2Vec word embedding algorithm, each first walk sequence is converted into the corresponding first graph embedding.
6. The fabric development method based on knowledge graph according to claim 1, It is characterized in that The mapping each second node to the low-dimensional vector space to obtain the corresponding second graph embedding includes: Using the Node2Vec algorithm, taking each second node as the initial node, and performing a random walk on the knowledge graph with a step length of 4 steps, a corresponding second walk sequence is obtained; Using the Word2Vec word embedding algorithm, each second walk sequence is converted into a corresponding second graph embedding.
7. The fabric development method based on knowledge graph according to claim 1, It is characterized in that The step of labeling each piece of fabric commodity data to obtain at least one corresponding fabric attribute label includes: Get product photos from fabric product data; Input the product photos into the pre-trained deep convolutional neural network to identify the product photos; correspondingly obtain several fabric attribute labels; Fabric attribute tags include: fabric type, fabric color, fabric texture, fabric style, fabric thickness, fabric structure, fabric properties, and fabric craftsmanship; The step of labeling each yarn commodity data to obtain at least one corresponding yarn attribute label includes: The yarn attribute labels include: yarn brand, yarn model, yarn material, yarn type, yarn process, yarn density, yarn diameter, yarn fineness, yarn strength and yarn process.
8. Fabric R&D system based on knowledge graph, It is characterized in that include: Fabric product data annotation module: used to obtain fabric product data set; The fabric commodity data set includes a number of fabric commodity data; Label each piece of fabric commodity data respectively to obtain at least one corresponding fabric attribute label; The yarn commodity data labeling module is used to obtain a yarn commodity data set; the yarn commodity data set includes a plurality of yarn commodity data; each yarn commodity data is labeled respectively to obtain at least one corresponding yarn attribute label; Knowledge graph construction module: used to set each fabric commodity data as a first node and each yarn commodity data as a second node according to the preset association relationship to construct a knowledge graph; wherein each first node also includes all fabric attribute tags corresponding to the fabric commodity data; each second node also includes all yarn attribute tags corresponding to the yarn commodity data; Prediction model training module: used to map each first node to a low-dimensional vector space to obtain a corresponding first graph embedding; map each second node to a low-dimensional vector space to obtain a corresponding second graph embedding; input all first graph embeddings and all second graph embeddings into a pre-established xgboost algorithm model for training, and obtain a trained classification algorithm prediction model; Fabric process prediction module: used to obtain the attribute information of the target fabric, input the attribute information into the classification algorithm prediction model for prediction, and obtain the yarn type and the corresponding textile process output by the model.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
