Bill of Materials (BOM) file conversion methods, apparatus, equipment, and storage media
By acquiring and formatting the bill of materials files in the PCBA production process, a target material station list is generated, which solves the problems of time-consuming and error-prone material station list conversion, improves conversion accuracy and efficiency, and reduces the risk of incorrect material selection.
Patent Information
- Application Number
- CN202211725890.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In existing technologies, the material station table conversion in the PCBA production process is time-consuming and prone to errors and omissions, resulting in a high risk of incorrect materials and affecting the accuracy of the production process.
By acquiring the bill of materials, material list, and silkscreen library files to be converted, and formatting them according to the preset template, a target material station table is generated, including material number mapping, data encapsulation, and data processing, reducing manual intervention.
It improves the accuracy and efficiency of file conversion, effectively avoids the risk of incorrect materials due to human error, and ensures the accuracy of the production process.
Smart Images

Figure CN116258123B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial manufacturing management technology, and in particular to a method, apparatus, equipment and storage medium for converting bill of materials files. Background Technology
[0002] In the current PCBA (Printed Circuit Board Assembly) production process, in order to better complete the material preparation, loading, and receiving work of production line operators and ensure the accuracy of their material preparation, loading, and receiving, it is necessary to compile a standardized form from multiple data sources before PCBA production and processing. This form should be given to the production line operators as the basis and standard for material loading and processing, thus ensuring the normal production and processing of PCBA.
[0003] However, existing technologies primarily rely on manual conversion, requiring the material station list corresponding to the surface mount process to be manually converted into the material station list corresponding to the entire production process. Furthermore, it necessitates manually retrieving relevant information from the bill of materials and screen printing library files and filling it into the corresponding positions in the material station list, resulting in time-consuming processes, a high risk of errors and omissions, and consequently, an increased risk of incorrect material selection in the production process. Summary of the Invention
[0004] The main objective of this invention is to provide a method for converting material list files, which aims to solve the risk of incorrect material distribution in the production process caused by the time-consuming and error-prone conversion of material station lists.
[0005] To achieve the above objectives, the present invention provides a method for converting bill of materials (BOM) files, the method comprising the following steps:
[0006] Obtain the data and files to be input, including the bill of materials to be converted, the material list, and the screen printing library file;
[0007] The first material station table is obtained by iterating through the material list to be converted according to the preset template format;
[0008] The bill of materials is preprocessed to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials;
[0009] The target material station table is obtained by encapsulating data line by line based on the first material station table, the mapping dictionary, and the silkscreen library file.
[0010] Optionally, after the step of traversing the material list to be converted according to a preset template format to obtain the first material station table, the method further includes:
[0011] Determine whether the number of data rows with data filling in the bill of materials to be converted exceeds a preset threshold;
[0012] If so, a sub-table is created in the first material station table according to the preset threshold and the number of rows.
[0013] Optionally, the step of preprocessing the bill of materials to obtain a mapping dictionary of all main materials 5 and auxiliary materials in the bill of materials includes:
[0014] Filter the bill of materials to obtain the main and auxiliary material data in the material number column and the replacement material number column;
[0015] Based on the main and auxiliary material data, a mapping relationship is constructed between the material numbers in the material number column and the replacement material numbers in the replacement material number column to obtain a mapping dictionary for all main and auxiliary materials.
[0016] Optionally, the step of encapsulating data line by line based on the first material station table, the mapping dictionary, and the silkscreen library file includes:
[0017] Fill the material station, material number, conveyor spacing and feeder model information from the material list to be converted into the designated column of the first material station table;
[0018] The material usage and remarks in the material list to be converted are processed to obtain the target usage and target remarks, and the target usage and target remarks are filled into the designated column of the first material station table; 5. Determine whether the material number has corresponding silk screen column data in the silk screen library file;
[0019] If it exists, the silkscreen column data will be filled into the specified column of the first material station table;
[0020] If the material number has a corresponding mapping relationship in the mapping dictionary, then the substitute material data corresponding to the material number is filled into the designated column of the first material station table, and a substitute material identifier is added to the row where the substitute material data is filled.
[0021] Optionally, the input data and file may further include the number of impositions and the number of reserved position numbers.
[0022] The step of processing the material usage and remarks in the material list to be converted to obtain the target usage and target remarks includes:
[0023] The target amount of material is obtained by dividing the amount of material used by the number of panels.
[0024] The remarks are sliced to obtain multiple remarks slices, and the multiple remarks slices are recorded in the remarks array;
[0025] Select the first N note slices from the note array and merge the N note slices to obtain an intermediate note, where N is the number of reserved positions, which is an integer greater than 0;
[0026] Determine whether the intermediate notes include all note slices in the note array, and obtain the target note based on the determination result and the intermediate notes.
[0027] Optionally, the step of obtaining the target annotation based on the judgment result and the intermediate annotation includes:
[0028] If the determination result is that the intermediate note does not include all the slices, then the data is concatenated at the end of the intermediate note and used as the target note;
[0029] If the determination result is that the intermediate note includes all the slices, then the intermediate note is used as the target note.
[0030] Optionally, the step of obtaining the input data and file includes:
[0031] Determine whether the input data and files to be acquired contain the bill of materials, material list, and screen printing library files to be converted;
[0032] When it is determined that the input data and file contain the material list to be converted, the bill of materials, and the screen printing library file, the input data and file are obtained.
[0033] Furthermore, to achieve the above objectives, the present invention also provides a bill of materials file conversion device, which includes:
[0034] The acquisition module is used to acquire the data and files to be input, wherein the data and files to be input include the bill of materials to be converted, the material list, and the screen printing library file;
[0035] The processing module is used to traverse the material list to be converted according to a preset template format to obtain the first material station table;
[0036] The mapping module is used to preprocess the bill of materials to obtain a mapping dictionary for all main materials and auxiliary materials in the bill of materials;
[0037] The encapsulation module is used to encapsulate data line by line based on the first material station table, the mapping dictionary, and the silkscreen library file to obtain the target material station table.
[0038] In addition, to achieve the above objectives, the present invention also provides a bill of materials (BOM) file conversion device, the device comprising: a memory, a processor, and a BOM file conversion program stored in the memory and executable on the processor, wherein the BOM file conversion program, when executed by the processor, implements the steps of the BOM file conversion method described above.
[0039] In addition, to achieve the above objectives, the present invention also provides a storage medium storing a bill of materials file conversion program, which, when executed by a processor, implements the steps of the bill of materials file conversion method described above.
[0040] Compared to the traditional method of manually converting forms, this invention obtains the material list, bill of materials, and screen printing library files to be converted, and formats these files according to a preset template to obtain the converted target material station table. This not only greatly improves the accuracy and efficiency of file conversion, but also effectively avoids the risk of incorrect materials in the production process caused by human error. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the structure of the material list file conversion device of the hardware operating environment involved in the embodiments of the present invention;
[0042] Figure 2 This is a schematic diagram of the functional modules of the first embodiment of the bill of materials file conversion method of the present invention;
[0043] Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the bill of materials conversion device of the present invention.
[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0045] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0046] like Figure 1 As shown, Figure 1 This is a schematic diagram of the hardware operating environment of the material list file conversion device involved in the embodiment of the present invention.
[0047] like Figure 1As shown, the bill of materials conversion device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the bill of materials conversion device. Based on different design needs of actual applications, the bill of materials conversion device may of course include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0049] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and a bill of materials file conversion program.
[0050] exist Figure 1 In the bill of materials file conversion device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; and the processor 1001 can call the bill of materials file conversion program stored in the memory 1005 and perform the following operations:
[0051] Obtain the data and files to be input, including the bill of materials to be converted, the material list, and the screen printing library file;
[0052] The first material station table is obtained by iterating through the material list to be converted according to the preset template format;
[0053] The bill of materials is preprocessed to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials;
[0054] The target material station table is obtained by encapsulating data line by line based on the first material station table, the mapping dictionary, and the silkscreen library file.
[0055] Furthermore, the processor 1001 can also call the bill of materials file conversion program stored in the memory 1005, and after executing the step of traversing the bill of materials to be converted according to a preset template format to obtain the first material station table, perform the following operations:
[0056] Determine whether the number of data rows with data filling in the bill of materials to be converted exceeds a preset threshold;
[0057] If so, a sub-table is created in the first material station table according to the preset threshold and the number of rows.
[0058] Furthermore, the processor 1001 can also call the bill of materials file conversion program stored in the memory 1005 and perform the following operations:
[0059] Filter the bill of materials to obtain the main and auxiliary material data in the material number column and the replacement material number column;
[0060] Based on the main and auxiliary material data, a mapping relationship is constructed between the material numbers in the material number column and the replacement material numbers in the replacement material number column to obtain a mapping dictionary for all main and auxiliary materials.
[0061] Furthermore, the processor 1001 can also call the bill of materials file conversion program stored in the memory 1005 and perform the following operations:
[0062] Fill the material station, material number, conveyor spacing and feeder model information from the material list to be converted into the designated column of the first material station table;
[0063] The material usage and remarks in the bill of materials to be converted are processed to obtain the target usage and target remarks, and the target usage and target remarks are filled into the designated column of the first material station table;
[0064] Determine whether the material number exists in the screen printing library file as a corresponding screen printing column.
[0065] If it exists, the silkscreen column data will be filled into the specified column of the first material station table;
[0066] If the material number has a corresponding mapping relationship in the mapping dictionary, then the substitute material data corresponding to the material number is filled into the designated column of the first material station table, and a substitute material identifier is added to the row where the substitute material data is filled.
[0067] Furthermore, the processor 1001 can also call the bill of materials file conversion program stored in the memory 1005 and perform the following operations:
[0068] The target amount of material is obtained by dividing the amount of material used by the number of panels.
[0069] The memos are sliced to obtain multiple memo slices, and the multiple memo slices are recorded in a memo array;
[0070] Select the first N note slices from the note array and merge the N note slices to obtain an intermediate note, where N is the number of reserved positions, which is an integer greater than 0;
[0071] Determine whether the intermediate notes include all note slices in the note array, and obtain the target note based on the determination result and the intermediate notes.
[0072] Furthermore, the processor 1001 can also call the bill of materials file conversion program stored in the memory 1005 and perform the following operations:
[0073] If the determination result is that the intermediate note does not include all the slices, then the data is concatenated at the end of the intermediate note and used as the target note;
[0074] If the determination result is that the intermediate note includes all the slices, then the intermediate note is used as the target note.
[0075] Furthermore, the processor 1001 can also call the bill of materials file conversion program stored in the memory 1005 and perform the following operations, including:
[0076] Determine whether the input data and files to be acquired contain the bill of materials, material list, and screen printing library files to be converted;
[0077] When it is determined that the input data and file contain the material list to be converted, the bill of materials, and the screen printing library file, the input data and file are obtained.
[0078] It should be noted that, in the embodiments of the present invention, in order to better complete the material preparation, loading, and receiving work of production line operators in the process of material loading to surface mounting in the current PCBA production process, and to ensure the accuracy of their material preparation, loading, and receiving, it is necessary to compile a table file of the same specification through multiple data sources before PCBA production and processing, and give it to the production line operators as the basis and standard for material loading in production and processing, so as to ensure the normal production and processing of PCBA.
[0079] However, existing technologies primarily rely on manual conversion, requiring the material station list corresponding to the surface mount process to be manually converted into the material station list corresponding to the entire production process. Furthermore, it necessitates manually retrieving relevant information from the bill of materials and screen printing library files and filling it into the corresponding positions in the material station list, resulting in time-consuming processes, a high risk of errors and omissions, and consequently, an increased risk of incorrect material selection in the production process.
[0080] To address the aforementioned problems, this invention provides a method for converting bill of materials (BOM) files. The method involves acquiring input data and files, including a BOM to be converted, a bill of materials (BOM), and a screen printing library file. The BOM to be converted is traversed according to a preset template format to obtain a first material station table. The BOM is preprocessed to obtain a mapping dictionary for all main and auxiliary materials in the BOM. Based on the first material station table, the mapping dictionary, and the screen printing library file, data is encapsulated line by line to obtain a target material station table.
[0081] Compared to the traditional method of manually converting forms, this invention obtains the material list, bill of materials, and screen printing library files to be converted, and formats these files according to a preset template to obtain the converted target material station table. This not only greatly improves the accuracy and efficiency of file conversion, but also effectively avoids the risk of incorrect materials in the production process caused by human error.
[0082] Based on the overall concept of the bill of materials file conversion method of the present invention, various embodiments of the bill of materials file conversion method of the present invention are proposed.
[0083] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the bill of materials file conversion method of the present invention.
[0084] It should be noted that although the logical order is shown in the flowchart, in some cases, the document conversion method of the present invention may of course perform the steps shown or described in a different order than that shown here.
[0085] Furthermore, the bill of materials (BOM) file conversion method of the present invention can be applied to the aforementioned BOM file conversion device or terminals such as personal computers. For ease of explanation and understanding, the following description will use the terminal device as the execution subject to illustrate the BOM file conversion method of the present invention.
[0086] like Figure 2 As shown, in this embodiment of the invention, the bill of materials file conversion method may include:
[0087] Step S10: Obtain the data and files to be input, wherein the data and files to be input include the bill of materials to be converted, the material list, and the screen printing library file;
[0088] It should be noted that, in the embodiments of the invention, the bill of materials to be converted can be a material station list used in a certain process segment of the production process. The material station list includes information such as the material station used in that process segment, its model and number, material number, conveyor belt spacing, silk screen printing, feeder model, usage, and remarks.
[0089] In addition, the Bill of Material (BOM) records information such as material numbers, material names, substitute materials, and substitute group numbers used in the entire production process.
[0090] The silkscreen library file contains information related to each electronic component in the bill of materials. Silkscreen is usually used to mark useful information on the PCB board to facilitate the assembly process and subsequent maintenance. Silkscreen is used to mark component values, part numbers, polarity and other information, and also includes information such as version and manufacturer.
[0091] In this embodiment, the terminal device can connect to the user device via, but not limited to, a network, a local area network, or a physical connection, to obtain the input data and files sent by the user device.
[0092] Terminal devices are physical entities connected to the network, such as computers and servers;
[0093] User equipment is a network-connected terminal, such as a mobile phone or a computer. User equipment and terminal devices can be connected via a network or a physical connection.
[0094] In one feasible implementation, the terminal device and the user device can be the same device. After the user selects the bill of materials, material list, and screen printing library file to be uploaded on the device, the device obtains the above-mentioned input data and files and performs subsequent bill of materials conversion operations.
[0095] In another feasible implementation, the terminal device can be a server, and the user device can be a personal computer. The terminal device and the user device are connected via a network. The user uploads the material list, bill of materials, and screen printing library files to be converted through the user device, and the network device obtains the files uploaded by the user through the network.
[0096] Step S20: Traverse the material list to be converted according to the preset template format to obtain the first material station table;
[0097] In one feasible implementation, after receiving the input data and file, the terminal device further traverses the headers of the material lists to be converted in the input data and file based on a preset template format, so as to use the headers to establish a first material station table.
[0098] For example, assuming the header of the preset target format is SMT station table, current time of station conversion, Yamaha file, BOM list, and Yamaha part list, the terminal device can traverse the list headers of the part lists to be converted and fill the headers into the header column corresponding to the Yamaha part list in the template, and save it as the first station table after filling it in.
[0099] Step S30: Preprocess the bill of materials to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials.
[0100] In one feasible implementation, before the terminal device preprocesses the bill of materials to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials, it can also perform two-level sorting on the bill of materials. For example, the main materials and auxiliary materials in the bill of materials can be sorted in ascending order first, and then sorted according to whether they are auxiliary materials, with auxiliary materials placed before main materials. After sorting, it is beneficial to improve processing efficiency.
[0101] In this embodiment, after the terminal device completes the sorting of the bill of materials as described above, it further preprocesses the sorted bill of materials to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials.
[0102] Furthermore, in one feasible implementation, step S30 described above may include:
[0103] Step S31: Filter the bill of materials to obtain the main and auxiliary material data in the material number column and the replacement material number column;
[0104] In this embodiment, after obtaining the bill of materials, the terminal device filters the list header of the bill of materials based on a preset filtering mode, and filters out the main and auxiliary material data in the material number column and the replacement material number column for subsequent use.
[0105] Step S32: Based on the main and auxiliary material data, construct a mapping relationship between the material number in the material number column and the replacement material number in the replacement material number column to obtain a mapping dictionary for all main and auxiliary materials.
[0106] It should be noted that, in this embodiment, the mapping dictionary for main materials and auxiliary materials in the bill of materials consists of a main material number column and an auxiliary material number column.
[0107] Based on this, in this embodiment, after obtaining the main and auxiliary material data in the bill of materials, the terminal device can further construct the mapping relationship between the material numbers in the material number column and the replacement material numbers in the replacement material number column. For example, the material numbers corresponding to the same replacement group number are determined, and each material number is written into the same cell to obtain the replacement material relationship of all material numbers corresponding to different replacement group numbers. The material numbers corresponding to the non-replacement materials in the same replacement group number are determined as the main material numbers, and the material numbers corresponding to the replacement materials in the replacement group number are determined as the auxiliary material numbers. Based on the main material numbers and replacement material numbers corresponding to different replacement group numbers, a corresponding mapping dictionary of main materials and auxiliary materials is established.
[0108] Step S40: Based on the first material station table, the mapping dictionary, and the silkscreen library file, data is encapsulated line by line to obtain the target material station table.
[0109] In this embodiment, after obtaining the first material station table and the mapping dictionary, the terminal device can further encapsulate the data to be converted and the file line by line based on the first material station table, the mapping dictionary and the silkscreen library file in the input data and file, thereby obtaining the converted target material station table.
[0110] Furthermore, in one feasible implementation, step S40 described above may include:
[0111] Step S41: Fill the material station, material number, conveyor spacing and feeder model information from the material list to be converted into the designated column of the first material station table;
[0112] It should be noted that in this embodiment, the material station refers to the number of the feed port of the pick and place machine, the conveyor belt spacing refers to the distance between each material, which corresponds to the internal settings of the pick and place machine, and the feeder model records the model information of the feeder used by the pick and place machine.
[0113] In one feasible implementation, the terminal device can traverse the information in each row of the bill of materials to be converted, and fill in the material station, material number, conveyor spacing and feeder model information into the corresponding data column of the first material station table row by row.
[0114] Step S42: Process the material usage and remarks in the bill of materials to be converted to obtain the target usage and target remarks, and fill the target usage and target remarks into the designated column of the first material station table;
[0115] It should be noted that in this embodiment, the material usage refers to the quantity of each material consumed during the production process of PCB manufacturing. The remarks column can record detailed silkscreen library information of the material.
[0116] In this embodiment, the terminal device iterates through the material quantity and remarks information of each row in the bill of materials to be converted, and fills them into the material quantity column and remarks column of the corresponding row in the first material station table.
[0117] Step S43: Determine whether the material number has a corresponding silkscreen column data in the silkscreen library file. If it does, fill the silkscreen column data into the specified column of the first material station table.
[0118] It should be noted that in this embodiment, the silkscreen library file contains silkscreen column data. This data index can be used to compare the silkscreen values on the physical object (electronic component) with those in the final result table during material loading, receiving, and matching to ensure the correctness of the physical object.
[0119] In this embodiment, when the terminal device fills in the data of the first material station table line by line by traversing the material list to be converted, it determines whether the material number of the current line being filled in has silk screen column data in the silk screen library file. If the corresponding silk screen column data exists, the data is filled into the corresponding column of the line.
[0120] Step S44: If the material number has a corresponding mapping relationship in the mapping dictionary, then fill the substitute material data corresponding to the material number into the specified column of the first material station table, and add a substitute material identifier to the row where the substitute material data is filled.
[0121] In this embodiment, after the terminal device fills in the silkscreen column of the data row, it determines whether there is a corresponding mapping relationship between the material number of the row and the mapping dictionary of main materials and auxiliary materials. If there is, it inserts a new data row below the row for each auxiliary material data, where the material number column is filled with the material number corresponding to the auxiliary material; the substitute material identifier is inserted before the material station column data of the main material as the material station column data, for example, the substitute material identifier can be the words "substitute material"; the remaining data is filled with the same data as the corresponding column of the main material.
[0122] In this embodiment, the bill of materials file conversion method of the present invention obtains at least the bill of materials to be converted, the bill of materials, and the screen printing library file, as well as other input data and files, through a terminal device. Then, based on a preset template format, it traverses the headers of the bill of materials to be converted in the input data and files to establish a first material station table. Next, the terminal device can perform two-level sorting on the bill of materials. For example, it can first sort the main materials and auxiliary materials in the bill of materials in ascending order, and then sort them according to whether they are auxiliary materials, placing auxiliary materials before main materials. After completing the above sorting of the bill of materials, the sorted bill of materials is preprocessed to obtain a mapping dictionary for all main materials and auxiliary materials in the bill of materials. Finally, the terminal device can further encapsulate the data and files to be converted line by line based on the first material station table, the mapping dictionary, and the screen printing library file in the input data and files, thereby obtaining the converted target material station table.
[0123] In other words, compared to the traditional method of manually converting forms, this invention obtains the material list, bill of materials, and screen printing library files to be converted, and formats these files according to a preset template to obtain the converted target material station table. This not only greatly improves the accuracy and efficiency of file conversion, but also effectively avoids the risk of incorrect materials in the production process caused by human error.
[0124] Furthermore, based on the first embodiment of the bill of materials file conversion method of the present invention described above, a second embodiment of the bill of materials file conversion method of the present invention is proposed.
[0125] In the second embodiment of the bill of materials file conversion method of the present invention, after step S20 above, in which the first material station table is obtained by traversing the bill of materials to be converted according to a preset template format, the bill of materials file conversion method of the present invention may further include:
[0126] Step S50: Determine whether the number of data rows with data filling in the material list to be converted exceeds a preset threshold;
[0127] In this embodiment, after obtaining the first material station table through the above-described traversal process of the material list to be converted, the terminal device further determines whether the number of all data rows in the material list to be converted that have been filled with data exceeds a preset threshold.
[0128] It should be noted that, in this embodiment, the aforementioned preset threshold can be set as needed, and this embodiment of the invention does not impose any restrictions on it. For example, the threshold can be set to 100 rows. After traversing the data in the bill of materials to be converted, the number of rows with data filling is found to be 350. At this time, the number of rows with data filling in the bill of materials to be converted exceeds the preset threshold.
[0129] Step S60: If yes, then create a sub-table in the first material station table according to the preset threshold and the number of rows.
[0130] In this embodiment, when the terminal device determines that the number of data rows already filled with data in the aforementioned material list to be converted exceeds a preset threshold, the terminal device determines that further processing of the first material station table is required. That is, a new sub-table is created in the first material station table to meet the data display requirements. For example, if the preset threshold is 100 rows and the number of data rows is 350, a new sub-table is created in the first material station table for every 100 rows exceeding the threshold, that is, a total of four sub-tables are created, with the number of data rows in each sub-table being 100, 100, 100, and 50, respectively.
[0131] In this embodiment, the bill of materials file conversion method of the present invention, after obtaining the first material station table according to the preset template format by the terminal device, determines whether the number of data rows filled with data in the bill of materials to be converted exceeds a preset threshold. If so, a sub-table is created in the first material station table according to the preset threshold and the number of rows. A sub-table is created every time the number of rows exceeds the preset threshold, so that the converted material station table conforms to the user's viewing habits and the bill of materials conversion is more in line with the actual situation.
[0132] Furthermore, based on the first and / or second embodiments of the bill of materials file conversion method of the present invention described above, a third embodiment of the bill of materials file conversion method of the present invention is further proposed.
[0133] In the third embodiment of the bill of materials file conversion method of the present invention, the step of "processing the material usage and remarks in the bill of materials to be converted to obtain the target usage and target remarks" in step S42 above may include:
[0134] Step S4201: Divide the material usage amount and the number of panels to obtain the target usage amount;
[0135] It should be noted that, in this embodiment, the input data and files obtained by the terminal device may also include the number of pages to be assembled and the number of digits to be retained at the end.
[0136] In this embodiment, the terminal device can obtain the target quantity by dividing the quantity of materials recorded in the quantity column of materials in the data row by the number of panels uploaded by the user.
[0137] For example, in one feasible implementation, the number of panels is not included in the input data and files. When calculating the target usage, the number of panels is regarded as 1, so the material usage is the target usage. In another feasible implementation, assuming the number of panels is 2 and the material usage is 100, the target material usage is 50.
[0138] Step S4202: Slice the remarks to obtain multiple remarks slices, and record the multiple remarks slices into a remarks array;
[0139] It should be noted that in this embodiment, the user can pre-configure the remarks in the remarks column to include special symbols, for example, the special symbols can be " / " or "|".
[0140] Based on this, in this embodiment, the terminal device can slice the notes in the notes column using special symbols to obtain multiple notes slices, and record the multiple notes slices into a notes array.
[0141] Step S4203: Select the first N note slices from the note array and merge the N note slices to obtain an intermediate note, where N is the number of reserved positions, and the number of reserved positions is an integer greater than 0;
[0142] In this embodiment, after obtaining the memo array, the terminal device can further process the memo array according to the data to be input and the number of reserved bits in the file to obtain an intermediate array.
[0143] In one feasible implementation, if there are no reserved reference numbers in the input data and file, the content of the intermediate array is determined to be all the content in the memo array; in another feasible implementation, if there are reserved reference numbers in the input data and file, for example, if there are 5 memos in the memo array and the reserved reference number is 3, then the first 3 memos are taken from the memo array and merged as the intermediate memo.
[0144] Step S4204: Determine whether the intermediate notes include all note slices in the note array, and obtain the target note based on the determination result and the intermediate notes.
[0145] In this embodiment, after obtaining the intermediate notes, the terminal device also needs to determine whether the intermediate notes include all note slices in the note array, so as to process the notes filled into the first material station table to obtain note information suitable for reading needs.
[0146] In one feasible implementation, step S4204 may include:
[0147] Step a: If the judgment result is that the intermediate note does not include all the slices, then the data is concatenated at the end of the intermediate note and used as the target note.
[0148] In this embodiment, if the intermediate notes do not include all note slices, the terminal device can append the marker data to the end of the intermediate notes to obtain the target notes.
[0149] It should be noted that in this embodiment, the marker data can be special symbols, or can be set by the user according to their needs. This embodiment does not restrict this. For example, the marker data can be an ellipsis. When the intermediate note includes the first 3 note slices in the note array and the note array contains 5 note slices, an ellipsis is appended to the end of the intermediate note to obtain the target note.
[0150] Step S4206: If the determination result is that the intermediate note includes all the slices, then the intermediate note is used as the target note.
[0151] In this embodiment, if the intermediate note includes all note slices, the terminal device can directly use the intermediate note as the target note without performing data splicing operations on it.
[0152] In this embodiment, the material list file conversion method of the present invention processes the material usage and remarks in the material station table based on the number of panels and the number of reserved position numbers through a terminal device. The target usage is calculated based on the number of panels and the material usage, and the target remarks are derived based on the number of reserved position numbers and the remarks. This makes the material station table more accurate, reduces the error rate in the production and processing process, and achieves the effect of cost reduction and efficiency improvement.
[0153] Furthermore, based on the first, second, and / or third embodiments of the bill of materials file conversion method of the present invention described above, a fourth embodiment of the bill of materials file conversion method of the present invention is proposed.
[0154] In a fourth embodiment of the bill of materials file conversion method of the present invention, the bill of materials file conversion method of the present invention may further include:
[0155] Step S70: Determine whether the input data and files to be acquired contain the bill of materials, material list, and screen printing library files to be converted.
[0156] In this embodiment, before acquiring the aforementioned input data and files, the terminal device may also determine whether there are any material lists, bills of materials, and screen printing library files in the input data and files to be acquired.
[0157] In one feasible implementation, if the terminal device determines that any of the input data and the bill of materials, material list, or screen printing library file to be converted in the file to be obtained are missing, the terminal device will first issue an error warning and then not execute the subsequent steps of the bill of materials file conversion method.
[0158] Step S80: When it is determined that the input data and file contain the material list to be converted, the bill of materials, and the screen printing library file, the input data and file are obtained.
[0159] In this embodiment, if the terminal device determines that there are bill of materials, material list and screen printing library files to be converted in the data and files to be input, it obtains the data and files to be input and determines whether the files in the data and files to be input are all normal. If there is an error, an error reminder is given and the subsequent steps of the bill of materials file conversion method are not executed.
[0160] In this embodiment, the bill of materials file conversion method of the present invention determines whether there are bills of materials, material lists and silkscreen library files in the terminal device before the terminal device obtains the data and files to be input, thereby ensuring the correctness and accuracy of the bill of materials file conversion.
[0161] Furthermore, embodiments of the present invention also propose a bill of materials file conversion device, the bill of materials file conversion device comprising:
[0162] The acquisition module 10 is used to acquire the data and files to be input, wherein the data and files to be input include the bill of materials to be converted, the material list, and the screen printing library file.
[0163] Processing module 20 is used to traverse the material list to be converted according to a preset template format to obtain the first material station table;
[0164] Mapping module 30 is used to preprocess the bill of materials to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials;
[0165] 5. Encapsulation module 40 is used to encapsulate data line by line based on the first material station table, the mapping dictionary and the silkscreen library file to obtain the target material station table.
[0166] Furthermore, the acquisition module 10 is also used for:
[0167] Determine whether the number of data rows with data filling in the bill of materials to be converted exceeds a preset threshold;
[0168] If so, a sub-table is created in the first material station table according to the preset threshold and the number of rows. Further, the mapping module 30 is also used for:
[0169] Filter the bill of materials to obtain the main and auxiliary material data in the material number column and the replacement material number column;
[0170] Based on the main and auxiliary material data, a mapping relationship is constructed between the material numbers in the material number column and the replacement material numbers in the replacement material number column to obtain a mapping dictionary for all main and auxiliary materials.
[0171] Furthermore, the packaging module 40 is also used for:
[0172] 5. Fill the material station, material number, conveyor spacing and feeder model information from the material list to be converted into the designated column of the first material station table;
[0173] The material usage and remarks in the bill of materials to be converted are processed to obtain the target usage and target remarks, and the target usage and target remarks are filled into the designated column of the first material station table;
[0174] Determine whether the material number exists in the screen printing library file; if it exists, fill the screen printing column data into the specified column of the first material station table.
[0175] If the material number has a corresponding mapping relationship in the mapping dictionary, then the substitute material data corresponding to the material number is filled into the designated column of the first material station table, and a substitute material identifier is added to the row where the substitute material data is filled.
[0176] Furthermore, the packaging module 40 is also used for:
[0177] The target amount of material is obtained by dividing the amount of material used by the number of panels.
[0178] The memos are sliced to obtain multiple memo slices, and the multiple memo slices are recorded in a memo array;
[0179] Select the first N note slices from the note array and merge the N note slices to obtain an intermediate note, where N is the number of reserved positions, which is an integer greater than 0;
[0180] Determine whether the intermediate notes include all note slices in the note array, and obtain the target note based on the determination result and the intermediate notes.
[0181] Furthermore, the packaging module 40 is also used for:
[0182] If the determination result is that the intermediate note does not include all the slices, then the data is concatenated at the end of the intermediate note and used as the target note;
[0183] If the determination result is that the intermediate note includes all the slices, then the intermediate note is used as the target note.
[0184] Furthermore, the acquisition module 10 is also used for:
[0185] Determine whether the input data and files to be acquired contain the bill of materials, material list, and screen printing library files to be converted;
[0186] When it is determined that the input data and file contain the material list to be converted, the bill of materials, and the screen printing library file, the input data and file are obtained.
[0187] The extended content of the specific implementation of the bill of materials file conversion device of the present invention is basically the same as the various embodiments of the bill of materials file conversion method described above, and will not be repeated here.
[0188] In addition, the present invention provides a bill of materials (BOM) file conversion device, the BOM file conversion device including a memory, a processor, and a BOM file conversion program stored in the memory and executable on the processor, the BOM file conversion program being configured to implement the steps of the BOM file conversion method as described in any of the above embodiments.
[0189] The specific embodiments of the bill of materials file conversion device of the present invention are basically the same as the embodiments of the bill of materials file conversion control method described above, and will not be repeated here.
[0190] In addition, the present invention provides a storage medium storing a bill of materials file conversion program, which, when executed by a processor, implements the steps of the bill of materials file conversion method as described in any of the above embodiments.
[0191] The specific embodiments of the storage medium of the present invention are basically the same as the embodiments of the bill of materials file conversion method described above, and will not be repeated here.
[0192] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. 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 system that includes that element.
[0193] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0194] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0195] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for converting bill of materials files, characterized in that, The bill of materials file conversion method includes: Obtain the data and files to be input, including the bill of materials to be converted, the material list, and the screen printing library file; The first material station table is obtained by iterating through the material list to be converted according to the preset template format; The bill of materials is preprocessed to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials; Fill the material station, material number, conveyor spacing and feeder model information from the material list to be converted into the designated column of the first material station table; The material usage and remarks in the bill of materials to be converted are processed to obtain the target usage and target remarks, and the target usage and target remarks are filled into the designated column of the first material station table; Determine whether the material number exists in the screen printing library file as a corresponding screen printing column. If it exists, the silkscreen column data will be filled into the specified column of the first material station table; If the material number has a corresponding mapping relationship in the mapping dictionary, then the substitute material data corresponding to the material number is filled into the specified column of the first material station table, and a substitute material identifier is added to the row where the substitute material data is filled. The input data and files also include the number of impositions and the number of reserved position numbers. The step of processing the material usage and remarks in the material list to be converted to obtain the target usage and target remarks includes: The target amount of material is obtained by dividing the amount of material used by the number of panels. The memos are sliced to obtain multiple memo slices, and the multiple memo slices are recorded in a memo array; Select the first N note slices from the note array and merge the N note slices to obtain an intermediate note, where N is the number of reserved positions, which is an integer greater than 0; Determine whether the intermediate notes include all note slices in the note array, and obtain the target note based on the determination result and the intermediate notes.
2. The bill of materials file conversion method as described in claim 1, characterized in that, After the step of traversing the material list to be converted according to a preset template format to obtain the first material station table, the method further includes: Determine whether the number of data rows with data filling in the bill of materials to be converted exceeds a preset threshold; If so, a sub-table is created in the first material station table according to the preset threshold and the number of rows.
3. The material list file conversion method as described in claim 1, characterized in that, The step of preprocessing the bill of materials to obtain a mapping dictionary of all main materials and auxiliary materials in the bill of materials includes: Filter the bill of materials to obtain the main and auxiliary material data in the material number column and the replacement material number column; Based on the main and auxiliary material data, a mapping relationship is constructed between the material number in the material number column and the replacement material number in the replacement material number column to obtain a mapping dictionary for all main and auxiliary materials.
4. The material list file conversion method as described in claim 1, characterized in that, The step of obtaining the target annotation based on the judgment result and the intermediate annotation includes: If the determination result is that the intermediate note does not include all the note slices, then the data is concatenated at the end of the intermediate note and used as the target note; If the determination result is that the intermediate note includes all the note slices, then the intermediate note is taken as the target note.
5. The bill of materials file conversion method as described in any one of claims 1 to 4, characterized in that, The steps for obtaining the input data and file include: Determine whether the input data and files to be acquired contain the bill of materials, material list, and screen printing library files to be converted; When it is determined that the input data and file contain the material list to be converted, the bill of materials, and the screen printing library file, the input data and file are obtained.
6. A bill of materials file conversion device, characterized in that, The device includes: The acquisition module is used to acquire the data and files to be input, including the bill of materials to be converted, the material list, and the screen printing library file. The processing module is used to traverse the material list to be converted according to a preset template format to obtain the first material station table; The mapping module is used to preprocess the bill of materials to obtain a mapping dictionary for all main materials and auxiliary materials in the bill of materials; The encapsulation module is used to encapsulate data line by line based on the first material station table, the mapping dictionary, and the silkscreen library file to obtain a target material station table. The encapsulation module is also used to fill the material station, material number, conveyor spacing, and feeder model information from the material list to be converted into a designated column of the first material station table; process the material usage and remarks in the material list to be converted to obtain target usage and target remarks, and fill the target usage and target remarks into a designated column of the first material station table; determine whether the material number has corresponding silkscreen column data in the silkscreen library file; if it does, fill the silkscreen column data into a designated column of the first material station table; if the material number has a corresponding mapping relationship in the mapping dictionary, fill the substitute material data corresponding to the material number into a designated column of the first material station table, and add a substitute material identifier to the row where the substitute material data is entered. The input data and files also include the number of panels and the number of reserved reference numbers. The packaging module is further used to divide the material usage and the number of panels to obtain the target usage; to slice the notes to obtain multiple note slices, and to record the multiple note slices into a note array; to select the first N note slices from the note array, and to merge the N note slices to obtain an intermediate note, where N is the number of reserved reference numbers, which is an integer greater than 0; to determine whether the intermediate note includes all note slices in the note array, and to obtain the target note based on the determination result and the intermediate note.
7. A bill of materials document conversion device, characterized in that, The device includes: a memory, a processor, and a bill of materials (BOM) file conversion program stored in the memory and executable on the processor, the BOM file conversion program being configured to implement the steps of the BOM file conversion method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a bill of materials file conversion program, which, when executed by a processor, implements the steps of the bill of materials file conversion method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Material station table synthesis method, system and equipment and storage medium
CN114565355A