Bom construction method, processor, and machine-readable storage medium
By employing breadth-first traversal and relational chain labeling, the problems of high difficulty in BOM construction and high system load in existing technologies are solved, enabling fast and efficient BOM construction and partial updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGKE YUNGU TECH
- Filing Date
- 2023-03-31
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies, when constructing a BOM, cannot update the attributes of parent and child nodes based on graph databases, while algorithm-based traversal methods experience severe system load as the number of nodes and relationships increases, leading to increased construction difficulty and time.
A breadth-first traversal method is adopted. By determining the traversal identifier of the material, leaf components, complex relationship and simple relationship materials are distinguished. The simple relationship material table is used for traversal to build BOM. The change tag is determined by the relationship chain to realize local update and reduce overall reconstruction.
With large-scale data, it reduces the difficulty and time of BOM construction, quickly locates changes, reduces system load, and improves update efficiency.
Smart Images

Figure CN116579303B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a BOM construction method, a processor, and a machine-readable storage medium. Background Technology
[0002] The Bill of Materials (BOM) is the most fundamental data in a system, describing the components of a product and the relationships between them; it forms the basis of product information. Currently, there are two main methods for constructing a BOM: one based on graph databases and the other based on algorithmic traversal. A graph database, in essence, uses a graph data structure to store and retrieve data. Its data model primarily uses nodes and relationships (edges), but it can also handle key-value pairs. Traversal refers to visiting each node in a tree exactly once along a specified search path. Graph database-based methods can handle complex relationship problems, but they cannot update the attributes of the current node based on parent-child relationships. Algorithm-based traversal methods, while able to respond to changes in parent-child nodes in real time, place an increasingly heavy load on the system as the number of nodes and relationships increases. Summary of the Invention
[0003] To address the aforementioned shortcomings in the prior art, the purpose of this invention is to provide a BOM construction method, a processor, and a machine-readable storage medium.
[0004] To achieve the above objectives, a first aspect of the present invention provides a BOM (Bill of Materials) construction method, comprising:
[0005] Get the current material and determine the traversal identifier of the current material;
[0006] If the traversal identifier is the first identifier, determine whether the current material is a leaf component material;
[0007] If the current material is not a leaf component material, determine whether the current material is a complex relationship material, where the number of parents of a complex relationship material is greater than a preset sampling and partitioning threshold.
[0008] If the current material is not a material with complex relationships, a breadth-first traversal is performed based on the simple relationship material table to match the child materials of the current material. The simple relationship material table includes all simple relationship materials, and the number of parents of simple relationship materials is less than or equal to the preset sampling partition threshold.
[0009] The child material is used as the current material. The step of determining whether the current material is a leaf component material is executed until the current material is a leaf component material. Then, the traversal identifier of the current material is modified to the second identifier.
[0010] Identify all target materials in the relationship chain from the root component material corresponding to the current material to the current material;
[0011] Determine the change labels for each target material;
[0012] Data is aggregated based on target materials and change labels to construct a Bill of Materials (BOM).
[0013] In this embodiment of the invention, after determining whether the current material is a material with complex relationships, the method further includes:
[0014] When the current material has a complex relationship, match the child materials of the current material and collect relevant information of the current material for data aggregation;
[0015] The sub-level material is used as the current material, and the step of determining whether the current material is a blade component material is executed.
[0016] In this embodiment of the invention, before the step of obtaining the current material, the method further includes:
[0017] The material child information and material parent information of all materials are determined based on the preset material relationship table;
[0018] The root component material and leaf component material are determined based on the material child-level information and the material parent-level information;
[0019] The preset sampling partitioning threshold is determined based on the frequent itemset algorithm.
[0020] In this embodiment of the invention, the BOM construction method further includes:
[0021] Set leaf component materials and complex relationship materials as broadcast variables;
[0022] Root component materials and simple relationship materials are distributed and stored in a pre-defined cluster.
[0023] In this embodiment of the invention, after the step of distributing the root component materials and simple relationship materials in a preset cluster, the method further includes:
[0024] Material attribute information is determined based on a pre-set bill of materials.
[0025] Obtain the basic material properties for distributed storage;
[0026] Determine whether there is data skewness in the data distribution based on material properties;
[0027] In the presence of data skew, the basis for material attributes is redefined based on material attribute information;
[0028] Based on the redefined material attributes, the root component materials and simple relationship materials are re-distributed and stored in a pre-defined cluster.
[0029] In this embodiment of the invention, the BOM construction method further includes:
[0030] Obtain the input target change label, target change material number, target parent material number, and target child material number;
[0031] Determine the change information based on the target material number;
[0032] The material to be changed is determined based on the target change label, the target parent material number, and the target child material number;
[0033] Make changes to the materials based on the change information.
[0034] In this embodiment of the invention, determining the changed material based on the target change label, the target parent material number, and the target child material number includes:
[0035] Location of change relationship chain based on target change tag;
[0036] Determine whether there exists a first material in the change relationship chain whose parent material number and child material number are the same as the target parent material number and target child material number, respectively;
[0037] If a first material exists, the first material will be treated as the changed material.
[0038] In this embodiment of the invention, the BOM construction method further includes:
[0039] In the absence of a first material, change whether there are grandparent and grandchild material numbers in the relationship chain that correspond to the target parent material number and the target child material number, respectively.
[0040] If there is no grandfather-level material number and grandson-level material number, continue to query whether there are two material numbers in the change relationship chain that correspond to the target parent-level material number and the target child-level material number respectively;
[0041] In the case of two material numbers, all materials between the two material numbers are treated as change materials.
[0042] In this embodiment of the invention, after the step of continuing to query whether there are two material numbers corresponding to the target parent material number and the target child material number on the change relationship chain, the method further includes:
[0043] If there are no two material numbers in the change relationship chain that correspond to the target parent material number and the target child material number respectively, output a change failure message.
[0044] A second aspect of the present invention provides a processor configured to execute the BOM construction method as described in the above embodiments.
[0045] A third aspect of the present invention provides a machine-readable storage medium storing instructions that cause a machine to execute the BOM construction method as described in the above embodiments.
[0046] The above technical solution obtains the current material and determines its traversal identifier. Based on the traversal identifier, it is determined whether the current material needs to be traversed. If the traversal identifier is the first identifier, it is determined whether the current material is a leaf component material. If the current material is not a leaf component material, it is determined whether the current material is a complex relationship material, where the number of parents of a complex relationship material is greater than a preset sampling threshold. If the current material is not a complex relationship material, a breadth-first traversal is performed based on a simple relationship material table to match the child materials of the current material. The simple relationship material table includes all simple relationship materials, and the number of parents of a simple relationship material is less than or equal to the preset sampling threshold. The child materials are used as the current material, and the step of determining whether the current material is a leaf component material is executed until the current material is a leaf component material. At this point, the traversal identifier of the current material is modified to the second identifier. All target materials in the relationship chain from the root component material corresponding to the current material are determined, and the change tags of each target material are determined. Data is summarized based on the target materials and change tags to construct the BOM. By using breadth-first traversal, the difficulty and time of BOM construction are greatly reduced when dealing with large amounts of data. Furthermore, by determining change tags based on relationship chains during BOM construction, the change location can be quickly located when the bill of materials needs to be updated. The parent-child relationship can be used to directly update the changed materials based on the change requirements, without having to rebuild the entire BOM based on the change requirements, which greatly reduces the system load.
[0047] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0048] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0049] Figure 1 This is a flowchart illustrating a BOM construction method according to an embodiment of the present invention. Detailed Implementation
[0050] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0051] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0052] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0053] Figure 1 This is a flowchart illustrating a BOM (Bill of Materials) construction method according to an embodiment of the present invention. Figure 1 As shown, in this embodiment of the invention, a BOM construction method is provided. Taking the application of this method to a processor as an example, the method may include the following steps:
[0054] Step S100: Obtain the current material and determine the traversal identifier of the current material;
[0055] In this embodiment, it should be noted that a Bill of Materials (BOM) is a technical document describing the composition of a company's products. In the industrial sector, it indicates the structural relationships and required quantities between the product's final assembly, sub-assemblies, components, parts, and even raw materials. In this embodiment, materials are used to describe the various components of the product. The current material represents the material currently being traversed. When constructing the BOM, all material information is obtained through traversal for data aggregation. Traversal identifiers include a first identifier and a second identifier, with the first identifier being the default. In this embodiment, the first identifier indicates "yes," meaning that the current material corresponding to this traversal identifier needs to be further traversed to proceed to the next step; the second identifier indicates "no," meaning that the current material corresponding to this traversal identifier will not proceed to the next step of traversal.
[0056] Step S200: If the traversal identifier is the first identifier, determine whether the current material is a leaf component material;
[0057] It should be noted that the traversal identifier is the first identifier, meaning that the current material still needs to be determined in the next step. Based on the parent-child relationship of materials, materials can be divided into leaf component materials and root component materials. A material can be both a leaf component material and a root component material. In this embodiment, all materials are traversed starting from the root component material to summarize material information and construct the BOM.
[0058] Step S300: If the current material is not a leaf component material, determine whether the current material is a complex relationship material, wherein the number of parents of a complex relationship material is greater than a preset sampling and partitioning threshold.
[0059] It should be noted that materials with more than the preset sampling threshold number of parent elements are considered to have complex relationships.
[0060] Specifically, after step S300, the following are also included:
[0061] When the current material has a complex relationship, match the child materials of the current material and collect relevant information of the current material for data aggregation;
[0062] If the sub-level material is used as the current material, proceed to step S200. If the traversal identifier is the first identifier, determine whether the current material is a leaf component material.
[0063] It should be noted that if the current material is not a leaf component material, its traversal identifier remains the first identifier, and the traversal continues to the next step. Whether the current material is a complex relationship material can be determined by whether it exists in the broadcast variables of complex relationship materials. If it exists, the current material is determined to be a complex relationship material; otherwise, it is not. Complex relationship materials have multiple child materials. When traversing to a complex relationship material, it is necessary to further traverse to its child materials based on their parent-child relationships, and use these child materials as the current material to determine if it is a leaf component material. After identifying a complex relationship material, its relevant information is collected for subsequent data aggregation and BOM generation.
[0064] Step S400: If the current material is not a complex relationship material, perform a breadth-first traversal based on the simple relationship material table to match the child materials of the current material. The simple relationship material table includes all simple relationship materials, and the number of parents of the simple relationship materials is less than or equal to the preset sampling partition threshold.
[0065] It should be noted that when the current material is not a complex relational material, its traversal identifier remains the first identifier. In this case, the current material continues traversal to the next step. Relevant information about the current material is collected for data aggregation and matching of its child materials. Breadth-First Search (BFS) is one of the most common graph search methods. BFS starts from a source node, visits all unvisited adjacent nodes at once, and then proceeds layer by layer from these visited adjacent nodes. In this embodiment, BFS is used to match the child materials of the current material based on a simple relational material table.
[0066] Step S500: Take the child material as the current material and execute the step of determining whether the current material is a leaf component material. Until the current material is a leaf component material, modify the traversal identifier of the current material to the second identifier.
[0067] The process involves determining the traversal identifier of the child material as the current material. Based on the parent-child relationship of the materials, the process proceeds level by level towards the leaf component material until it is determined that the current material is a leaf component material. At this point, the traversal identifier of the current material is changed to the second identifier, meaning that the current material will no longer be traversed.
[0068] Step S600: Determine all target materials in the relationship chain from the root component material corresponding to the current material to the current material;
[0069] Step S700: Determine the change label for each target material;
[0070] Step S800: Summarize the data based on the target material and change labels to construct the BOM.
[0071] The root component material corresponding to the current material is identified, and all materials in the relationship chain from the root component material to the current material are designated as target materials. In this embodiment, target materials include the root component material and the current material itself. The relationship chain includes data chains based on the relationships between materials, such as parent-child relationships and grandparent-grandchild relationships. Change tags are used for precise location when subsequent BOM information updates are needed. All target materials corresponding to the same relationship chain are tagged with change tags, and the target materials and change tags are aggregated to construct the BOM.
[0072] The above BOM construction method obtains the current material and determines its traversal identifier. Based on the traversal identifier, it determines whether the current material needs to be traversed. If the traversal identifier is the first identifier, it determines whether the current material is a leaf component material. If the current material is not a leaf component material, it determines whether the current material is a complex relationship material, where the number of parents of a complex relationship material is greater than a preset sampling threshold. If the current material is not a complex relationship material, it performs a breadth-first traversal based on a simple relationship material table to match the child materials of the current material. The simple relationship material table includes all simple relationship materials, and the number of parents of a simple relationship material is less than or equal to the preset sampling threshold. The child materials are used as the current material, and the step of determining whether the current material is a leaf component material is executed. When the current material is a leaf component material, the traversal identifier of the current material is modified to the second identifier. All target materials in the relationship chain from the root component material corresponding to the current material are determined, and the change tags of each target material are determined. Based on the target materials and change tags, the data is summarized to construct the BOM. By using breadth-first traversal, the difficulty and time of BOM construction are greatly reduced when dealing with large amounts of data. Furthermore, by determining change tags based on relationship chains during BOM construction, the change location can be quickly located when the bill of materials needs to be updated. The parent-child relationship can be used to directly update the changed materials based on the change requirements, without having to rebuild the entire BOM based on the change requirements, which greatly reduces the system load.
[0073] In this embodiment of the application, all materials are pre-divided, that is, before step S100, the following steps are also included:
[0074] The material child information and material parent information of all materials are determined based on the preset material relationship table;
[0075] The root component material and leaf component material are determined based on the material child-level information and the material parent-level information;
[0076] The preset sampling partitioning threshold is determined based on the frequent itemset algorithm.
[0077] It should be noted that the preset material relationship table includes material child information and material parent information for all materials, representing the parent material number and child material number of the material. When a material has no parent material, it is classified as a root component material; when a material has no child materials, it is classified as a leaf component material.
[0078] It should be noted that materials can be classified into complex-relationship materials and simple-relationship materials based on the number of parent and child levels. In this embodiment, a preset sampling threshold can be determined using a frequent itemset algorithm based on data such as the cluster's hardware facilities and user usage. Materials can have multiple parents or children simultaneously. In this embodiment, materials are classified into complex-relationship materials and simple-relationship materials by comparing the number of parents with the preset sampling threshold. It is understood that the preset sampling threshold can also be determined based on experience or other methods. In one embodiment, materials can also be classified by comparing the number of children with the preset sampling threshold. It is understood that the classification of leaf component materials and root component materials, as well as the classification of complex-relationship materials and simple-relationship materials, are performed before step S100.
[0079] In one embodiment, the method further includes:
[0080] Set leaf component materials and complex relationship materials as broadcast variables;
[0081] Root component materials and simple relationship materials are distributed and stored in a pre-defined cluster.
[0082] It's important to note that the material data corresponding to the BOM is extremely large and cannot be stored on a single machine or data node. Instead, it is stored in a pre-defined cluster. By default, when a function runs in parallel on multiple tasks across different nodes in the cluster, it generates a copy of certain variables involved in the function on each task; these copies are called broadcast variables. In this embodiment, leaf component materials and complex relationship materials are set as broadcast variables, meaning that all nodes in the cluster have a copy of the leaf component material broadcast variables and the complex relationship material broadcast variables. Generally, leaf component materials and complex relationship materials are queried more frequently. Setting them as broadcast variables reduces the number of cross-machine data queries, improving data processing capabilities. Distributing the relatively less frequently queried root component materials and simple relationship materials within the pre-defined cluster improves system response speed and disaster recovery capabilities.
[0083] In one embodiment, after the step of distributing the root component materials and simple relationship materials in a preset cluster, the method further includes:
[0084] Material attribute information is determined based on a pre-set bill of materials.
[0085] Obtain the basic material properties for distributed storage;
[0086] Determine whether there is data skewness in the data distribution based on material properties;
[0087] In the presence of data skew, the basis for material attributes is redefined based on material attribute information;
[0088] Based on the redefined material attributes, the root component materials and simple relationship materials are re-distributed and stored in a pre-defined cluster.
[0089] In this embodiment, it should be noted that the material list includes information such as material number, material name, material attributes, and traversal identifier. Distributed storage partitioning is based on a preset material attribute base. The material attribute base is determined based on material attribute information and may include one or more material attributes, such as "factory" or "factory, date". After obtaining the material attribute base, a judgment is made based on this base to determine whether distributed storage of root component materials and simple relationship materials based on this base would lead to data skew. If it would not lead to data skew, partitioning is performed directly according to the obtained material attribute base to achieve distributed storage. If it would lead to data skew, a new material attribute base needs to be determined based on the material attribute information, and the root component materials and simple relationship materials are then re-distributed in the preset cluster based on this newly determined material attribute base. It can be understood that for cluster systems, caching is generally distributed, meaning different nodes are responsible for a certain range of cached data. Insufficient dispersion of cached data can lead to a large amount of cached data being concentrated on one or a few service nodes, a phenomenon known as data skew.
[0090] In this embodiment, the material attribute base is adaptively set based on the presence or absence of data skew, avoiding BOM construction failure due to unbalanced load and improving the effectiveness of BOM construction.
[0091] In one embodiment, the BOM construction method further includes:
[0092] Obtain the input target change label, target change material number, target parent material number, and target child material number;
[0093] Determine the change information based on the target material number;
[0094] The material to be changed is determined based on the target change label, the target parent material number, and the target child material number;
[0095] Make changes to the materials based on the change information.
[0096] In this embodiment, it should be noted that "changed material" refers to the material that needs to be changed. The input target change label is the change label corresponding to the material that needs to be changed; the target parent material number and the target child material number can locate the specific location of the changed material. The target changed material number corresponds to the change information, which is the updated information used to replace the original material information.
[0097] Specifically, the changed materials are determined based on the target change label, the target parent material number, and the target child material number, including:
[0098] Location of change relationship chain based on target change tag;
[0099] Determine whether there exists a first material in the change relationship chain whose parent material number and child material number are the same as the target parent material number and target child material number, respectively;
[0100] If a first material exists, the first material will be treated as the changed material.
[0101] In this embodiment, it should be noted that the target change tag can be used to locate the relationship chain where the changed material is located, i.e., the change relationship chain. All materials in the change relationship chain have corresponding material numbers. Based on the target parent material number and the target child material number, the specific material position in the relationship chain can be located. By determining whether there is a first material in the change relationship chain whose parent material number and child material number are the same as the target parent material number and the target child material number, respectively, it can be determined whether there is a change material whose information can be directly modified. If so, the relevant information of the change material is modified to change information.
[0102] In one embodiment, the BOM construction method further includes:
[0103] In the absence of a first material, change whether there are grandparent and grandchild material numbers in the relationship chain that correspond to the target parent material number and the target child material number, respectively.
[0104] If there is no grandfather-level material number and grandson-level material number, continue to query whether there are two material numbers in the change relationship chain that correspond to the target parent-level material number and the target child-level material number respectively;
[0105] In the case of two material numbers, all materials between the two material numbers are treated as change materials.
[0106] In this embodiment, it should be noted that updating some material data may require replacing a large portion of a relationship chain in the bill of materials at the parent-child level. For example, replacing a material information item with a length from grandparent to grandchild with a length from parent to child. Alternatively, replacing even longer material information items with a length from parent to child. In this embodiment, the length of the material information to be replaced is limited by the target parent material number and the target child material number. If there is no first material in the relationship chain whose parent and child material numbers are the same as the target parent and target child material numbers respectively, that is, if one or both of the target parent and target child material numbers are absent, a further query is performed on the next higher or next lower level material.
[0107] The process involves determining whether a grandparent and grandchild material number exists in the change relationship chain corresponding to the target parent material number and the target child material number, respectively. If such a grandparent and grandchild material number exist, all material information between these two numbers is replaced with the change information. This means that each change information corresponds to a single changed material, and all materials between the grandparent and grandchild material numbers are replaced with this single changed material. This implies a change in the branches of the change relationship chain, such as branch length. If no grandparent or grandchild material number exists (i.e., neither the target grandparent nor the target grandchild material number exists), the process continues querying the next higher or lower level material until two material numbers corresponding to the target parent and target child material numbers are found. In this case, all materials between these two material numbers are treated as changed materials.
[0108] In one embodiment, after the step of continuing to query whether there are two material numbers corresponding to the target parent material number and the target child material number on the change relationship chain, the method further includes:
[0109] If there are no two material numbers in the change relationship chain that correspond to the target parent material number and the target child material number respectively, output a change failure message.
[0110] It should be noted that if the query is performed further up the material chain or down the material chain until the root component material or leaf component material is found, and the corresponding number for either or both of the target parent material number and the target child material number does not exist, the change operation cannot be performed and a change failure message will be output so that maintenance personnel can take relevant actions.
[0111] In this embodiment, the relationship chain of the changed material is quickly located by changing the label, and the specific changed material is located based on the target parent material number and the target child material number, thereby making the change. This realizes the partial update of material information based on the parent-child relationship, improves the material update efficiency, and effectively reduces the system operating load.
[0112] This invention provides a processor for running a program, wherein the program executes the BOM construction method during runtime.
[0113] This invention provides a machine-readable storage medium storing a program that, when executed by a processor, implements the BOM construction method.
[0114] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0118] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0119] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0120] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0121] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0122] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A BOM (Bill of Materials) construction method, characterized in that, include: Obtain the current material and determine the traversal identifier of the current material; If the traversal identifier is the first identifier, determine whether the current material is a leaf component material; If the current material is not a leaf component material, determine whether the current material is a complex relationship material, wherein the number of parents of the complex relationship material is greater than a preset sampling and partitioning threshold; If the current material is not a material with complex relationships, a breadth-first traversal is performed based on the simple relationship material table to match the child materials of the current material. The simple relationship material table includes all simple relationship materials, and the number of parents of the simple relationship materials is less than or equal to the preset sampling partitioning threshold. The child-level material is used as the current material, and the step of determining whether the current material is a leaf component material is executed. When the current material is a leaf component material, the traversal identifier of the current material is modified to the second identifier. Determine all target materials in the relationship chain from the root component material corresponding to the current material to the current material; Determine the change labels for each of the target materials; Data is aggregated based on the target material and the change label to construct the Bill of Materials (BOM); Obtain the input target change label, target change material number, target parent material number, and target child material number; The change information is determined based on the target material number; The changed material is determined based on the target change label, the target parent material number, and the target child material number; The material is modified based on the change information; The process of determining the changed material based on the target change label, the target parent material number, and the target child material number includes: Based on the target change label, locate the change relationship chain; Determine whether there exists a first material in the change relationship chain whose parent material number and child material number are the same as the target parent material number and the target child material number, respectively; If the first material exists, the first material shall be used as the changed material.
2. The BOM construction method according to claim 1, characterized in that, After determining whether the current material is a material with complex relationships, the method further includes: If the current material is a material with complex relationships, match the child materials of the current material and collect relevant information of the current material for data aggregation; The sub-level material is used as the current material, and the step of determining whether the current material is a blade component material is executed.
3. The BOM construction method according to claim 1, characterized in that, Before the step of obtaining the current material, the method further includes: The material child information and material parent information of all materials are determined based on the preset material relationship table; Based on the material child-level information and the material parent-level information, determine the root component material and leaf component material among all the materials; The preset sampling partitioning threshold is determined based on the frequent itemset algorithm.
4. The BOM construction method according to claim 3, characterized in that, BOM construction methods also include: Set the leaf component material and the complex relationship material as broadcast variables; The root component materials and the simple relationship materials are distributed and stored in a preset cluster.
5. The BOM construction method according to claim 4, characterized in that, After the step of distributing the root component material and the simple relationship material in a preset cluster, the method further includes: Material attribute information is determined based on a pre-set bill of materials. Obtain the material attribute base for performing the distributed storage; Based on the aforementioned material properties, determine whether there is data skewness in the data distribution; In the event of data skew, the basis for determining the material attributes should be redefined based on the material attribute information. Based on the redefined material attributes, the root component material and the simple relationship material are re-distributed and stored in a preset cluster.
6. The BOM construction method according to claim 1, characterized in that, The BOM construction method also includes: In the absence of the first material, does the change relationship chain contain a grandparent material number and a grandchild material number corresponding to the target parent material number and the target child material number, respectively? If the grandfather-level material number and the grandchild-level material number do not exist, continue to query whether there are two material numbers on the change relationship chain that correspond to the target parent-level material number and the target child-level material number respectively; If the two material numbers exist, all materials between the two material numbers will be treated as change materials.
7. The BOM construction method according to claim 6, characterized in that, After continuing to query whether there are two material numbers corresponding to the target parent material number and the target child material number on the change relationship chain, the process further includes: If there are no two material numbers in the change relationship chain that correspond to the target parent material number and the target child material number respectively, a change failure message will be output.
8. A processor, characterized in that, It is configured to perform the BOM construction method according to any one of claims 1 to 7.
9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the BOM construction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
EBOM-based subway vehicle maintenance BOM generation method
CN111367918A
Bill of material standardization method and device and computer readable storage medium
CN115222319A