Method, device, computer equipment and storage medium for constructing product gene chain
By building a product gene chain, the problem of quality data dispersion in steel production is solved, the correlation and visualization of the entire cold-rolled strip data process is realized, and data traceability analysis and problem diagnosis are supported.
Patent Information
- Application Number
- CN202110340835.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-03-30
AI Technical Summary
The existing ERP/MES/PCS hierarchical architecture causes quality data to be dispersed in the steel production process and cannot realize full-process data association and data flow, resulting in many problems in product quality traceability, problem diagnosis, and process quality optimization and improvement plans.
Through the method of building product gene chain, the connection between the products of each cold rolling process is established, and the global product database and gene chain database view are used to traverse the global information of the material, determine the root node, determine the parent node, and create gene chain nodes and node attributes. Realize data association between various processes.
It achieves clear traceability analysis of cold-rolled strip steel production process data, provides underlying data support for cross-process data analysis and problem tracing, and visualizes the flow of material data through simple programming.
Smart Images

Figure CN113094423B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of big data application in steel process, and in particular to a big data application, device, computer equipment and storage medium for steel process. Background Art
[0002] At present, whether or not steel enterprises have the means to trace and analyze product-related data throughout the entire process has become one of the important conditions for them to pass national certification and quality management requirements, win high-end customers, and form competitive advantages.
[0003] Although the application of information technology at this stage plays a good supporting role in the process quality control of steel enterprises' products, the widely used layered architecture of ERP (Enterprise Resource Planning) / MES (Manufacturing Execution System) / PCS (Process Control System) disperses various quality data and process data of the preparation process in different systems. Only simple process quality data is transmitted between systems at all levels to meet the most basic conditions for system operation. This layered architecture design idea can only meet the information transmission of conventional products. By establishing a big data system to centrally store the data of each system, the problem of data dispersion can be solved. However, since the data association and data flow of products in each process of the whole process have not been established, there are still many problems in product quality traceability, problem diagnosis and location, and process quality optimization and improvement plans. Summary of the invention
[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the purpose of this application is to propose a method, device, computer equipment and storage medium for constructing a product gene chain to establish a connection between the products of each cold rolling process, so as to better realize the traceability analysis of the cold rolled strip production process data.
[0006] To achieve the above-mentioned purpose, the first aspect of the present application proposes a method for constructing a product gene chain, wherein the data structure of the product gene chain includes nodes and node attributes, and the method includes:
[0007] Traversing the global material information of the materials whose gene chain construction time is empty in the global product database, the global material information includes the process code of the process corresponding to the material, the material identifier corresponding to the material, and the material number of the material;
[0008] For each of the materials, judging whether the material is a root node according to the process code of the process corresponding to the material;
[0009] If the material is not a root node, the previous process code and the input material number corresponding to the material are determined from the gene chain database view according to the material identification of the material;
[0010] According to the previous process code corresponding to the material and the input material number, find the parent node of the material from the material global information;
[0011] Counting the number of the parent nodes, and when the number of the parent nodes is 0, determining the material as the root node of the product gene chain;
[0012] When the number of the parent nodes is greater than 0, a gene chain node corresponding to the material is created, and according to the material identifier corresponding to the material, the node information of the material is obtained from the gene chain database view;
[0013] The node information is stored in the node and node attributes corresponding to the gene chain node.
[0014] To achieve the above-mentioned purpose, the second aspect of the present application provides a device for constructing a product gene chain, wherein the data structure of the product gene chain includes nodes and node attributes, and the device includes:
[0015] A traversal module, used to traverse the global material information of the materials whose gene chain construction time is empty in the global product database, wherein the global material information includes the process code of the process corresponding to the material, the material identification corresponding to the material and the material number of the material;
[0016] A judgment module, used for judging, for each material, whether the material is a root node according to the process code of the process corresponding to the material;
[0017] The first determination module is used to determine the previous process code and the input material number corresponding to the material from the gene chain database view according to the material identification of the material when the material is not a root node;
[0018] A search module, used to search for the parent node of the material from the material global information according to the previous process code corresponding to the material and the input material number;
[0019] A second determination module is used to count the number of the parent nodes, and when the number of the parent nodes is 0, determine the material as the root node of the product gene chain;
[0020] A creation module, used for creating a gene chain node corresponding to the material when the number of the parent nodes is greater than 0, and obtaining the node information of the material from the gene chain database view according to the material identifier corresponding to the material;
[0021] The storage module is used to store the node information in the node and node attributes corresponding to the gene chain node.
[0022] The third aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for constructing a product gene chain as described in the first aspect embodiment is implemented.
[0023] The fourth aspect embodiment of the present application proposes a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the method for constructing a product gene chain as described in the first aspect embodiment is implemented.
[0024] The product gene chain construction method, device, computer equipment and storage medium proposed in this application have at least the following beneficial effects:
[0025] By traversing the global material information of the material whose gene chain construction time is empty in the global product database, the global material information includes the process code of the material corresponding to the process, the material identification of the material and the material number of the material; for each material, according to the process code of the material corresponding to the process, determine whether the material is the root node; if the material is not the root node, then according to the material identification of the material, determine the previous process code and the entry material number corresponding to the material from the gene chain database view; according to the previous process code and the entry material number corresponding to the material, find the parent node of the material from the global material information; count the number of parent nodes, and when the number of parent nodes is 0, determine the material as the root node of the product gene chain; when the number of parent nodes is greater than 0, create the gene chain node corresponding to the material, and obtain the node information of the material from the gene chain database view according to the material identification corresponding to the material; store the node information in the node and node attribute corresponding to the gene chain node, thereby establishing the product gene chain between each process, realizing a clearer material data connection of the whole process of cold-rolled strip steel, providing underlying data support for cross-process data analysis and problem tracing, and visualizing the material data flow through simple programming.
[0026] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0028] Figure 1It is a flowchart of a method for constructing a product gene chain proposed in one embodiment of the present application;
[0029] Figure 2 It is a flow chart of a method for constructing a product gene chain proposed in another embodiment of the present application;
[0030] Figure 3 This is an example diagram of the product gene chain construction result of a specific embodiment of the present application;
[0031] Figure 4 It is a schematic diagram of the structure of a device for constructing a product gene chain proposed in one embodiment of the present application;
[0032] Figure 5 It is a schematic diagram of the structure of a device for constructing a product gene chain proposed in another embodiment of the present application. DETAILED DESCRIPTION
[0033] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be construed as limiting the present application. On the contrary, the embodiments of the present application include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.
[0034] The widely used layered architecture of ERP / MES / PCS currently disperses various quality data and process data of the preparation process in different systems. Only simple process quality data is transmitted between systems at each level to meet the most basic conditions for system operation. However, this layered architecture design idea can only meet the information transmission of conventional products. By establishing a big data system to store the data of each system in a centralized manner, the problem of data dispersion can be solved. However, since the data association and data flow of the products in each process of the whole process have not been established, there are still many problems in product quality traceability, problem diagnosis and location, and process quality optimization and improvement plans.
[0035] In order to solve the problem that various quality data and process data in the cold-rolled strip production process are scattered, and after the data of various systems are centrally stored by establishing a big data system, data association is missing and data flow is unclear, which is not conducive to data traceability analysis, the present application provides a method, device, computer equipment and storage medium for constructing a product gene chain, which can be applied to the cold-rolled strip production process. By establishing the connection between the products of each cold rolling process, the traceability analysis of the cold-rolled strip production process data can be better realized.
[0036] The following is an explanation of the method, device, computer equipment and storage medium for constructing the product gene chain proposed in this application in conjunction with the accompanying drawings.
[0037] Figure 1 It is a flow chart of a method for constructing a product gene chain proposed in one embodiment of the present application.
[0038] It should be noted that the execution subject of the method for constructing the product gene chain of this embodiment is the construction device of the product gene chain, which can be implemented by software and / or hardware, and can be configured in a computer device, which may include but is not limited to a terminal, a server, etc. In the embodiment of the present application, the data structure of the product gene chain includes at least nodes and node attributes, wherein the nodes are nodes included in the product gene chain, and are used to store information corresponding to each node in the product gene chain, and the node attributes are used to store attribute information corresponding to each node.
[0039] like Figure 1 As shown, the method for constructing the gene chain of the product includes the following steps:
[0040] Step 101, traverse the global material information of the material whose gene chain construction time is empty in the global product database, and the material global information includes the process code of the process corresponding to the material, the material identification corresponding to the material, and the material number of the material.
[0041] In an embodiment of the present application, a global product database stores a queue of materials that have completed production in each process. For unprocessed materials in the global product database, the corresponding gene chain construction time is empty. For processed materials, the corresponding gene chain construction time is the time when the material is determined as a node in the product gene chain.
[0042] In a possible implementation of the embodiment of the present application, before traversing the global material information of the material whose gene chain construction time is empty in the global product database, the global product database can be first constructed to obtain the information of the material corresponding to each process to construct the global product database, and the global product database includes: material identification, material number, material production time, process code and gene chain construction time. As an example, the data structure of the global product database is shown in Table 1.
[0043] Table 1
[0044] Data Item Data Types illustrate GlobalProductId bigint Material globally unique identifier MatId nvarchar(MAX) Material Number FacilityId nvarchar(50) Operation code ProductionDate datetime Material production time GenealogyDate datetime Gene chain construction time
[0045] Among them, the material globally unique identifier GlobalProductId (that is, the material identifier described in the embodiment of the present application) is used to distinguish between various materials, and each material corresponds to a unique GlobalProductId.
[0046] In a possible implementation of the embodiment of the present application, a defect product database Defects and a measurement value database MeasurementData can also be constructed, and the surface quality inspection defect data and defect images of materials in each process are centrally stored in a global data structure Defects, and the basic automated measurement value historical data of materials in each process are centrally stored in MeasurementData. Among them, the data structure of Defects includes defect ID (recorded as DefectId), material number, defect type, defect surface (identification of the upper surface or lower surface), defect height, defect width, position of the defect in the length direction of the strip, position of the defect in the width direction of the strip, defect image information, etc.; the data structure of MeasurementData includes data ID, material number, measurement value type, measurement value data, data generation timestamp, etc. Defects and MeasurementData match the material number MatId in the data structure with the material number MatId in GlobalProducts to realize the association of the three data structures of GlobalProducts, Defects, and MeasurementData, and index the global information of materials through GlobalProductId in GlobalProducts, thereby realizing the construction of global information of materials.
[0047] As an example, the data structure of Defects is shown in Table 2, and the data structure of MeasurementData is shown in Table 3.
[0048] Table 2
[0049]
[0050] Table 3
[0051] Serial number Data Item Data Types illustrate 1 MeasurementDataId bigint Data ID 2 MatId nvarchar(MAX) Material Number 3 MeasurementDescriptionId int Measurement type 4 DataBlob varbinary(MAX) Measurement data 5 ProductionTimestamp datetime Data generation timestamp
[0052] In the embodiment of the present application, constructing a product gene chain is to generate nodes and transformation relationships of the gene chain by acquiring global information of materials in a global product database.
[0053] Step 102: for each material, determine whether the material is a root node according to the process code of the process corresponding to the material.
[0054] In an embodiment of the present application, the process code corresponding to the root node can be pre-defined. For each material obtained in step 101, by comparing whether the process code of each material is consistent with the process code corresponding to the pre-defined root node, the material that is consistent with the process code corresponding to the pre-defined root node is determined as the root node.
[0055] Step 103, if the material is not a root node, determine the previous process code and the entry material number corresponding to the material from the gene chain database view according to the material identification of the material.
[0056] In an embodiment of the present application, if the process code of the material is found to be inconsistent with the process code corresponding to the pre-defined root node, it is determined that the material is not the root node, and the previous process code and the entry material number corresponding to the material are determined from the gene chain database view based on the material identification of the material.
[0057] In a possible implementation of the embodiment of the present application, before determining the previous process code and the entry material number corresponding to the material from the gene chain database view, the production performance data corresponding to each process can be mapped in the global data structure through the database view to obtain the gene chain database view, wherein the global data structure specifically only maps the common definition data in the MES production performance data of each process, and the gene chain database view includes: material identification (i.e., the material global unique identification, recorded as GlobalProductId), entry material number (recorded as EntryMatId), material number (recorded as MatId), process code (recorded as FacilityId), previous process code (recorded as PreFacilityId), material length, material width, material thickness, material weight and material production time.
[0058] As an example, the gene chain database view can be defined as shown in Table 4.
[0059] Table 4
[0060] Serial number Data Item Data Types illustrate 1 GlobalProductId bigint Material globally unique identifier 2 EntryMatId nvarchar(MAX) Import material number 3 MatId nvarchar(MAX) Material Number 4 FacilityId nvarchar(50) Operation code 5 PreFacilityId nvarchar(50) Previous process code 6 Length float Material length 7 Width float Material width 8 Thickness float Material thickness 9 Weight float Material weight 10 ProductionDate datetime Material production time
[0061] Step 104, according to the previous process code and the input material number corresponding to the material, find the parent node of the material from the material global information.
[0062] In an embodiment of the present application, after obtaining the previous process code and the input material number corresponding to the material, the parent node of the material can be found from the material global information based on the previous process code and the input material number corresponding to the material.
[0063] Specifically, the search for the parent node is to search for a material whose process code is the same as the previous process code of the material and whose material number is the same as the imported material number from the obtained material global information. Then this material is the parent node of the current material.
[0064] Step 105, counting the number of parent nodes, and when the number of parent nodes is 0, determining the material as the root node of the product gene chain.
[0065] Step 106, when the number of parent nodes is greater than 0, create a gene chain node corresponding to the material, and obtain the node information of the material from the gene chain database view according to the material identifier corresponding to the material.
[0066] Step 107, store the node information in the node and node attributes corresponding to the gene chain node.
[0067] The node data structure is defined as Nodes, including node ID (node identification, denoted as NodeId), material width, material length, material thickness, and material weight, as shown in Table 5. The node attribute data structure is defined as NodeAttributes, including node ID, process code, material identification, and material production time, as shown in Table 6. Node attributes are associated with nodes through node IDs.
[0068] Table 5
[0069] Serial number Data Item Data Types illustrate 1 NodeId bigint Node ID 2 Width float Material width 3 Length float Material length 4 Thickness float Material thickness 5 Weight float Material weight
[0070] Table 6
[0071] Serial number Data Item Data Types illustrate 1 NodeId bigint Node ID 2 FacilityId nvarchar(50) Operation code 3 ProductionDate datetime Material production time 4 GlobalProductId bigint Material globally unique identifier
[0072] In an embodiment of the present application, when a material is not a root node, the previous process code and the entry material number corresponding to the material are determined from the gene chain database view according to the material identification of the material, and then the parent node of the material is found from the material global information according to the previous process code and the entry material number corresponding to the material, and the number of parent nodes is counted, and when the number of parent nodes is 0, the material is determined as the root node of the product gene chain; when the number of parent nodes is greater than 0, a gene chain node corresponding to the material is created, and according to the material identification corresponding to the material, the node information of the material is obtained from the gene chain database view, and then the node information is stored in the node and node attributes corresponding to the gene chain node.
[0073] Furthermore, in a possible implementation method of the embodiment of the present application, when a material is a root node, the material is created as the root node of the product gene chain, and according to the material identifier corresponding to the material, the root node information of the material is obtained from the gene chain database view, and the root node information is stored in the data structure corresponding to the node and the node attribute.
[0074] The method for constructing a product gene chain in this embodiment traverses the global material information of the material whose gene chain construction time is empty in the global product database, and the global material information includes the process code of the process corresponding to the material, the material identification corresponding to the material, and the material number of the material; for each material, according to the process code of the process corresponding to the material, determine whether the material is a root node; if the material is not a root node, then determine the previous process code and the entry material number corresponding to the material from the gene chain database view according to the material identification of the material; find the parent node of the material from the global material information according to the previous process code and the entry material number corresponding to the material; count the number of parent nodes, and when the number of parent nodes is 0, determine the material as the root node of the product gene chain; when the number of parent nodes is greater than 0, create a gene chain node corresponding to the material, and obtain the node information of the material from the gene chain database view according to the material identification corresponding to the material; store the node information in the node and node attribute corresponding to the gene chain node, thereby establishing a product gene chain between each process, realizing a clearer material data connection of the whole process of cold-rolled strip steel, providing underlying data support for cross-process data analysis and problem tracing, and visualizing the material data flow through simple programming.
[0075] In a possible implementation of the embodiment of the present application, the data structure of the product gene chain also includes a pre-conversion type, a conversion type and a conversion, such as Figure 2 As shown, in Figure 1 Based on the embodiment shown, after step 106, the following steps may also be included:
[0076] Step 201, according to the node identifiers corresponding to the gene chain nodes and the parent nodes respectively, conversion data is generated and stored in a data structure corresponding to the conversion.
[0077] Among them, the generated conversion data is related to the conversion data structure. The conversion is defined as Transitions. The corresponding data structure includes conversion ID, source node ID, target node ID, pre-conversion type ID, and conversion type ID. As shown in Table 7, the generated conversion data includes conversion ID, source node ID, target node ID, pre-conversion type ID, and conversion type ID, and the conversion data is stored in the corresponding position of the conversion data structure.
[0078] Table 7
[0079] Serial number Data Item Data Types illustrate 1 Id bigint Conversion ID 2 FromNodeId bigint Source Node ID 3 ToNodeId bigint Target node ID 4 TransitionTypeId int Conversion Type ID 5 PreTransformationId int Pre-conversion type ID
[0080] In the embodiment of the present application, the starting value of the transformation ID is 1, and it automatically increases by 1 each time; the target node ID is the node ID in the Nodes data structure; the source node ID is the node ID of the found parent node; the pre-transformation type ID is assigned according to the process code and the previous process code, and the value is the pre-transformation type ID of the pre-transformation type data structure PreTransformationTypes; when the number of parent nodes ParentsCount=1, the transformation type ID is assigned according to the process code and the previous process code, and the value is the transformation type ID of the transformation type data structure TransitionTypes; when ParentsCount>1, the transformation type ID is the transformation type ID corresponding to the transformation type name "Merge" in the transformation type data structure TransitionTypes.
[0081] Step 202, according to the process corresponding to the material, determine the corresponding data in the pre-conversion type and the corresponding data in the conversion type.
[0082] Among them, the transformation type is defined as TransitionTypes, and the data structure includes the transformation type ID (recorded as TransitionTypeId) and the transformation type name (recorded as TransitionTypeName), as shown in Table 8, wherein the transformation type name includes no transformation, cut, merge, and extend, as shown in Table 9; the pre-transformation type is defined as PreTransformationTypes, and the data structure includes the pre-transformation type ID (recorded as PreTransformationId) and the pre-transformation type name (recorded as PreTransformationName), as shown in Table 10, wherein the pre-transformation type name includes no pre-transformation, horizontal flip, and vertical flip, as shown in Table 11.
[0083] Table 8
[0084]
[0085] Table 9
[0086] TransitionTypeId TransitionTypeName 1 No conversion 2 Cut 3 merge 4 extend
[0087] Table 10
[0088]
[0089] Table 11
[0090]
[0091] In an embodiment of the present application, for the pre-conversion type data structure and the conversion type data structure of the gene chain node, the data in the pre-conversion type data structure and the data in the conversion type data structure can be determined according to the process corresponding to the material.
[0092] For example, assuming that the process corresponding to the material is "leveling", since leveling unwinds and winds the material, and the extension of the material by leveling can be ignored, it can be determined that the PreTransformationId of the material is 3 and the TransitionTypeId is 1.
[0093] The method for constructing the product gene chain of this embodiment sets the data structure of the product gene chain to include pre-conversion type, conversion type and conversion, generates conversion data and stores it in the data structure corresponding to the conversion according to the node identifiers corresponding to the gene chain node and the parent node respectively, and determines the corresponding data in the pre-conversion type and the corresponding data in the conversion type according to the process corresponding to the material, thereby realizing the process marking of the material and enriching the data structure of the product gene chain.
[0094] In a possible implementation of the embodiment of the present application, for materials that have been processed in the global product database, they can be marked by updating the gene chain construction time in the global product database. Thus, in the embodiment of the present application, after creating a node of the product gene chain (including creating a root node of the product gene chain and creating a gene chain node of the product gene chain), the current time can also be obtained, and then the gene chain construction time corresponding to the material in the global product database can be updated to the current time. That is to say, after creating the material in the global product database as the root node or gene chain node (other nodes except the root node) of the product gene chain, the gene chain construction time corresponding to the material in the global product database can be updated from empty to the time of creating the node, thereby realizing the marking of the processed materials in the global product database, which can avoid the repeated processing of the materials in the global product database and ensure the accuracy of the product gene chain construction.
[0095] In order to facilitate understanding of the technical solution of the above embodiment, the following examples are given for illustration.
[0096] Assume that cold rolling has four processes, namely, rolling mill, annealing, leveling and shearing, and the process codes, i.e., FacilityId, are A13, A2, A31 and CUT1 respectively. Assume that the data in the global product database (GlobalProducts) is as shown in Table 12, and the data in the gene chain database view (Genealogy) is as shown in Table 13.
[0097] Table 12
[0098]
[0099] Table 13
[0100]
[0101] The process of constructing the gene chain for the materials in Table 12 is as follows:
[0102] Step a. Assume that the root node is defined as A13. In GlobalProducts, traverse the global information of materials with empty gene chain construction time, and obtain 6 data. Here, the GlobalProductIds are 372171, 372172, 375996, 376260, 376261, and 376262 as examples.
[0103] (1) For the material with GlobalProductId 372171, since the FacilityId in GlobalProducts is A13, which is the root node, a root node is created. The root node information is stored in Nodes and NodeAttributes. The root node information can be retrieved and obtained from the Genealogy view based on the GlobalProductId in GlobalProducts. By updating the gene chain construction time in GlobalProducts, the material is marked as processed.
[0104] (2) For the material with GlobalProductId 372172, since the FacilityId of the material with GlobalProductId 372172 in GlobalProducts is A2, which is not the root node, perform the following steps:
[0105] Step c. Find the parent node of the material with GlobalProductId 372172, whose previous process code PreFacilityId in Genealogy is A13, and whose entry material number EntryMatId is TEST1. Find the material obtained by traversing GlobalProducts in step a, and the search condition is that PreFacilityId and EntryMatId meet the equal conditions with FacilityId and MatId in GlobalProducts respectively. The parent node is the material with GlobalProductId 372171, and the number of parent nodes ParentsCount = 1. Since ParentsCount>0, execute step e.
[0106] Step e. Create a node for the current material and store the information in Nodes and NodeAttributes; generate transformation data and store it in Transitions. The transformation ID is automatically incremented by 1; ToNodeId is the node ID in Nodes in this step; FromNodeId is the node ID of the parent node found in step c; because the cover does not unwind or reel the material, PreTransformationId is 1 and TransitionTypeId is 1.
[0107] (3) For the material with GlobalProductId 375996, since the FacilityId of the material with GlobalProductId 375996 in GlobalProducts is A31, which is not the root node, perform the following steps:
[0108] Step c. Find the parent node of the material with GlobalProductId 375996, whose previous process code PreFacilityId in Genealogy is A2, and the entry material number EntryMatId is TEST2. By finding the material obtained by traversing GlobalProducts in step a, the search condition is that PreFacilityId and EntryMatId meet the equal conditions with FacilityId and MatId in GlobalProducts respectively, the parent node is the material with GlobalProductId 372172, and the number of parent nodes ParentsCount = 1. Since ParentsCount>0, execute step e.
[0109] Step e. Create a node for the current material and store the information in Nodes and NodeAttributes; generate transformation data and store it in Transitions. The transformation ID is automatically incremented by 1; ToNodeId is the node ID in Nodes in this step; FromNodeId is the node ID of the parent node found in step c; because flattening unwinds and reels the material, and the extension of the material by flattening can be ignored, PreTransformationId is 3 and TransitionTypeId is 1.
[0110] (4) For the material with GlobalProductId 376260, since the FacilityId of the material with GlobalProductId 376260 in GlobalProducts is CUT1, which is not the root node, perform the following steps:
[0111] Step c. Find the parent node of the material with GlobalProductId 376260, whose previous process code PreFacilityId in Genealogy is A31, and the entry material number EntryMatId is TEST3. By finding the material obtained by traversing GlobalProducts in step a, the search condition is that PreFacilityId and EntryMatId respectively meet the equal conditions with FacilityId and MatId in GlobalProducts, and the parent node is the material with GlobalProductId 375996, and the number of parent nodes ParentsCount = 1. Since ParentsCount>0, execute step e.
[0112] Step e. Create a node for the current material and store the information in Nodes and NodeAttributes; generate transformation data and store it in Transitions. The transformation ID is automatically incremented by 1; ToNodeId is the node ID in Nodes in this step; FromNodeId is the node ID of the parent node found in step c; because shearing unwinds and reels the material, PreTransformationId is 3 and TransitionTypeId is 2.
[0113] (5) For the material with GlobalProductId 376261, since the FacilityId of the material with GlobalProductId 376261 in GlobalProducts is CUT1, which is not the root node, perform the following steps:
[0114] Step c. Find the parent node of the material with GlobalProductId 376260, whose previous process code PreFacilityId in Genealogy is A31, and the entry material number EntryMatId is TEST3. By finding the material obtained by traversing GlobalProducts in step a, the search condition is that PreFacilityId and EntryMatId respectively meet the equal conditions with FacilityId and MatId in GlobalProducts, and the parent node is the material with GlobalProductId 375996, and the number of parent nodes ParentsCount = 1. Since ParentsCount>0, execute step e.
[0115] Step e. Create a node for the current material and store the information in Nodes and NodeAttributes; generate transformation data and store it in Transitions. The transformation ID is automatically incremented by 1; ToNodeId is the node ID in Nodes in this step; FromNodeId is the node ID of the parent node found in step c; because shearing unwinds and reels the material, PreTransformationId is 3 and TransitionTypeId is 2.
[0116] (6) For the material with GlobalProductId 376262, since the FacilityId of the material with GlobalProductId 376262 in GlobalProducts is CUT1, which is not the root node, perform the following steps:
[0117] Step c. Find the parent node of the material with GlobalProductId 376260, whose previous process code PreFacilityId in Genealogy is A31, and the entry material number EntryMatId is TEST3. By finding the material obtained by traversing GlobalProducts in step a, the search condition is that PreFacilityId and EntryMatId respectively meet the equal conditions with FacilityId and MatId in GlobalProducts, and the parent node is the material with GlobalProductId 375996, and the number of parent nodes ParentsCount = 1. Since ParentsCount>0, execute step e.
[0118] Step e. Create a node for the current material and store the information in Nodes and NodeAttributes; generate transformation data and store it in Transitions. The transformation ID is automatically incremented by 1; ToNodeId is the node ID in Nodes in this step; FromNodeId is the node ID of the parent node found in step c; because shearing unwinds and reels the material, PreTransformationId is 3 and TransitionTypeId is 2.
[0119] After the above process, a product gene chain is constructed for the above materials traversed in GlobalProducts, such as Figure 3 As shown. Figure 3It can be clearly seen that the material GlobalProductId is 372171, which is produced in the A13 rolling mill process, and then undergoes the hood-retracting process, that is, reaches A2, and completes the processing to generate a new material with GlobalProductId 372172. After that, it undergoes flattening, that is, reaches the A31 process, and completes the processing to generate a new material with GlobalProductId 375996. After that, it enters the shearing process, that is, reaches the CUT1 process for coiling, and is divided into 3 coils of material, with GlobalProductIds of 376260, 376261, and 376262. It can be seen that the constructed product gene chain of the entire process of cold-rolled strip production can be easily displayed in an intuitive way.
[0120] Figure 4 It is a structural diagram of a device for constructing a product gene chain proposed in an embodiment of the present application. The data structure of the product gene chain includes nodes and node attributes.
[0121] like Figure 4 As shown, the device 30 for constructing the product gene chain includes:
[0122] The traversal module 310 is used to traverse the material global information of the material whose gene chain construction time is empty in the global product database, and the material global information includes the process code of the process corresponding to the material, the material identification corresponding to the material and the material number of the material.
[0123] In some embodiments of the present application, a global product database can be constructed by obtaining information about materials corresponding to each process, and the global product database includes: material identification, material number, material production time, process code and gene chain construction time.
[0124] The judgment module 320 is used to judge, for each of the materials, whether the material is a root node according to the process code of the process corresponding to the material.
[0125] The first determination module 330 is used to determine the previous process code and the input material number corresponding to the material from the gene chain database view according to the material identification of the material when the material is not a root node.
[0126] In some embodiments of the present application, the gene chain database view can be obtained by mapping the production performance data corresponding to each process in the global data structure through the database view, and the gene chain database view includes: material identification, input material number, material number, process code, previous process code, material length, material width, material thickness, material weight and material production time.
[0127] The search module 340 is used to search for the parent node of the material from the material global information according to the previous process code corresponding to the material and the input material number.
[0128] The second determination module 350 is used to count the number of the parent nodes, and when the number of the parent nodes is 0, determine the material as the root node of the product gene chain.
[0129] The creation module 360 is used to create a gene chain node corresponding to the material when the number of the parent nodes is greater than 0, and obtain the node information of the material from the gene chain database view according to the material identifier corresponding to the material.
[0130] The storage module 370 is used to store the node information in the node and node attribute corresponding to the gene chain node.
[0131] In some embodiments of the present application, the creation module 360 is also used to: when the material is a root node, create the root node of the product gene chain, and obtain the root node information of the material from the gene chain database view according to the material identifier corresponding to the material; the storage module 370 is also used to: store the root node information in a data structure corresponding to the node and the node attributes.
[0132] In some embodiments of the present application, the data structure of the product gene chain also includes a pre-conversion type, a conversion type and a conversion, and the storage module 370 is also used to: generate conversion data and store it in the data structure corresponding to the conversion according to the node identifiers corresponding to the gene chain node and the parent node respectively; determine the corresponding data in the pre-conversion type and the corresponding data in the conversion type according to the process corresponding to the material.
[0133] In some embodiments of the present application, Figure 5 As shown, in Figure 4 Based on the embodiment shown, the device 30 for constructing the product gene chain further includes:
[0134] A time acquisition module 380 is used to acquire the current time;
[0135] The updating module 390 is used to update the gene chain construction time corresponding to the material in the global product database to the current time.
[0136] It should be noted that the above explanation of the embodiment of the method for constructing a product gene chain is also applicable to the device for constructing a product gene chain of this embodiment. The implementation principle is similar and will not be repeated here.
[0137] The device for constructing a product gene chain in the embodiment of the present application traverses the global material information of the material whose gene chain construction time is empty in the global product database, and the global material information includes the process code of the process corresponding to the material, the material identification corresponding to the material, and the material number of the material; for each material, according to the process code of the process corresponding to the material, it is determined whether the material is a root node; if the material is not a root node, according to the material identification of the material, the previous process code and the entry material number corresponding to the material are determined from the gene chain database view; according to the previous process code and the entry material number corresponding to the material, the parent node of the material is found from the global material information. point; count the number of parent nodes, and when the number of parent nodes is 0, determine the material as the root node of the product gene chain; when the number of parent nodes is greater than 0, create a gene chain node corresponding to the material, and obtain the node information of the material from the gene chain database view according to the material identification corresponding to the material; store the node information in the node and node attributes corresponding to the gene chain node, thereby establishing a product gene chain between each process, achieving a clearer material data connection for the entire process of cold-rolled strip steel, providing underlying data support for cross-process data analysis and problem tracing, and visualizing the flow of material data through simple programming.
[0138] In order to implement the above embodiments, the present application also proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for constructing a product gene chain as described in the above embodiments is implemented.
[0139] In order to implement the above embodiments, the present application also proposes a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the method for constructing a product gene chain as described in the above embodiments is implemented.
[0140] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0141] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0142] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0143] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0144] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0145] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0146] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0147] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for constructing a product gene chain, characterized in that: The data structure of the product gene chain includes nodes and node attributes, and the method includes: Traversing the global material information of the materials whose gene chain construction time is empty in the global product database, the global material information includes the process code of the process corresponding to the material, the material identifier corresponding to the material, and the material number of the material; For each of the materials, judging whether the material is a root node according to the process code of the process corresponding to the material; If the material is not a root node, the previous process code and the input material number corresponding to the material are determined from the gene chain database view according to the material identification of the material; According to the previous process code corresponding to the material and the input material number, find the parent node of the material from the material global information; Counting the number of the parent nodes, and when the number of the parent nodes is 0, determining the material as the root node of the product gene chain; When the number of the parent nodes is greater than 0, a gene chain node corresponding to the material is created, and according to the material identifier corresponding to the material, the node information of the material is obtained from the gene chain database view; Storing the node information in the node and node attributes corresponding to the gene chain node; The data structure of the product gene chain also includes pre-conversion type, conversion type and conversion. After creating the gene chain node corresponding to the material, it also includes: Generate conversion data according to the node identifiers corresponding to the gene chain node and the parent node respectively, and store the conversion data in a data structure corresponding to the conversion; According to the process corresponding to the material, determine the data corresponding to the pre-conversion type and the data corresponding to the conversion type; Among them, the generated conversion data is related to the conversion data structure, and the corresponding data structure includes conversion ID, source node ID, target node ID, pre-conversion type ID, and conversion type ID. The starting value of the conversion ID is 1, and it automatically increases by 1 each time. The target node ID is the node ID in the Nodes data structure, and the source node ID is the node ID of the found parent node. The pre-conversion type ID is assigned according to the process code and the previous process code, and the value is the pre-conversion type ID of the pre-conversion type data structure. When the number of parent nodes = 1, the conversion type ID is assigned according to the process code and the previous process code, and the value is the conversion type ID of the conversion type data structure. When the parent node>1, the conversion type ID is the conversion type ID corresponding to the conversion type name of the merge in the conversion type data structure.
2. The method according to claim 1, characterized in that After determining whether the material is a root node, the method further includes: If the material is a root node, create the root node of the product gene chain, and obtain the root node information of the material from the gene chain database view according to the material identifier corresponding to the material; The root node information is stored in a data structure corresponding to the node and the node attribute.
3. The method according to claim 1 or 2, characterized in that After creating the node of the product gene chain, it also includes: Get the current time; The gene chain construction time corresponding to the material in the global product database is updated to the current time.
4. The method according to claim 1, characterized in that Before traversing the global material information of the material whose gene chain construction time is empty in the global product database, it also includes: The information of the materials corresponding to each process is obtained to build a global product database, which includes: material identification, material number, material production time, process code and gene chain construction time.
5. The method according to claim 1, characterized in that Before determining the previous process code and the input material number corresponding to the material from the gene chain database view, the method further includes: The production performance data corresponding to each process is mapped in the global data structure through the database view to obtain the gene chain database view, which includes: material identification, input material number, material number, process code, previous process code, material length, material width, material thickness, material weight and material production time.
6. A device for constructing a product gene chain, characterized in that: The data structure of the product gene chain includes nodes and node attributes, and the device includes: A traversal module, used to traverse the global material information of the materials whose gene chain construction time is empty in the global product database, wherein the global material information includes the process code of the process corresponding to the material, the material identification corresponding to the material and the material number of the material; A judgment module, used for judging, for each material, whether the material is a root node according to the process code of the process corresponding to the material; The first determination module is used to determine the previous process code and the input material number corresponding to the material from the gene chain database view according to the material identification of the material when the material is not a root node; A search module, used to search for the parent node of the material from the material global information according to the previous process code corresponding to the material and the input material number; A second determination module is used to count the number of the parent nodes, and when the number of the parent nodes is 0, determine the material as the root node of the product gene chain; A creation module, used for creating a gene chain node corresponding to the material when the number of the parent nodes is greater than 0, and obtaining the node information of the material from the gene chain database view according to the material identifier corresponding to the material; A storage module, used to store the node information in the node and node attributes corresponding to the gene chain node; The data structure of the product gene chain also includes pre-conversion type, conversion type and conversion. After creating the gene chain node corresponding to the material, it also includes: Generate conversion data according to the node identifiers corresponding to the gene chain node and the parent node respectively, and store the conversion data in a data structure corresponding to the conversion; According to the process corresponding to the material, determine the data corresponding to the pre-conversion type and the data corresponding to the conversion type; Among them, the generated conversion data is related to the conversion data structure, and the corresponding data structure includes conversion ID, source node ID, target node ID, pre-conversion type ID, and conversion type ID. The starting value of the conversion ID is 1, and it automatically increases by 1 each time. The target node ID is the node ID in the Nodes data structure, and the source node ID is the node ID of the found parent node. The pre-conversion type ID is assigned according to the process code and the previous process code, and the value is the pre-conversion type ID of the pre-conversion type data structure. When the number of parent nodes = 1, the conversion type ID is assigned according to the process code and the previous process code, and the value is the conversion type ID of the conversion type data structure. When the parent node>1, the conversion type ID is the conversion type ID corresponding to the conversion type name of the merge in the conversion type data structure.
7. The device as claimed in claim 6, characterized in that The creation module is also used to: When the material is a root node, the root node of the product gene chain is created, and the root node information of the material is obtained from the gene chain database view according to the material identifier corresponding to the material; The storage module is further used for: The root node information is stored in a data structure corresponding to the node and the node attribute.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for constructing a product gene chain as described in any one of claims 1 to 5 is implemented.
9. A computer device, characterized in that: It comprises a processor, a memory and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the method for constructing a product gene chain as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Intelligent flexible manufacturing system and method for automobile bodies
CN106249718A
Link tracking method and device, computer equipment and readable storage medium
CN110569222A
Information sharing chain generation method and device, electronic equipment and storage medium
CN110912809A
Method and system for building multi-point link interaction environment
JP2006246441A
