Method for automatically generating operation instruction book based on database and automatic script

By automatically generating work instructions using databases and automated scripts, the problem of low efficiency, error-proneness, and inconsistent formats in the manufacturing industry has been solved. This has enabled efficient and accurate work instruction generation, and supports data write-back and self-evolution.

CN121580989APending Publication Date: 2026-02-27SHENZHEN NETIS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511774971.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

The current manufacturing industry suffers from inefficient and error-prone production of work instructions, inconsistent formats, difficulty in matching images with material information, and a lack of deep automated generation capabilities.

Method used

Using a database-based and automated script approach, the logic processing engine module receives key information, parses and queries the database to generate structured local data objects, and uses the document generation module to automatically populate them into document templates, thereby achieving automatic generation of work instructions, including automatic loading and formatting of bill of materials data, work images, and special process identifiers.

Benefits of technology

It has achieved fully automated generation of work instructions, improving efficiency and accuracy, ensuring uniform format, solving the problems of accurate matching of bill of materials and automation of image processing, enhancing document readability and security, and having data write-back capability to adapt to changes on site.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121580989A_ABST
    Figure CN121580989A_ABST
Patent Text Reader

Abstract

The invention discloses an operation instruction book automatic generation method based on a database and an automatic script, and relates to the technical field of manufacturing industry informatization. The method comprises the following steps: a logic processing engine module receives a product code and associatively queries product information, a template and a logic rule in a database; the process steps and the specific operation data are matched, and a structured local data object is assembled; calling the document template, and automatically filling operation flows and contents according to logic rules to generate a workbook; automatically retrieving and loading a bill of material, an operation picture and a special process identification picture according to the process name, and generating a final file after the format is adjusted. According to the method, through full-automatic closed-loop operation, the problems that manual compiling is low in efficiency, errors are prone to occurring and formats are not uniform are solved, and granulated storage of process data and standardized output of documents are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of manufacturing informatization and document automation technology. Specifically, it relates to intelligent generation technology of process documents in manufacturing execution systems, which is particularly applicable to precision manufacturing industries such as electronics and semiconductors. It is a method for automatically generating standardized work instructions based on databases and automated scripts. Background Technology

[0002] Work instructions are crucial documents in manufacturing plants that guide workers in standardized operations; their quality directly impacts product consistency and production efficiency. Currently, in most manufacturing companies, work instructions are primarily created manually by process engineers using office software such as Word or Excel.

[0003] The existing methods for preparing work instructions have the following significant technical flaws:

[0004] First, the workflow is inefficient. When faced with a production model of multiple varieties and small batches, engineers need to repeatedly perform "copy, paste, and modify" operations for each product model. For a complex product with dozens of processes, manually creating worksheets, filling in parameters, and inserting images is extremely time-consuming.

[0005] Secondly, it is prone to human error. During the process of manual copying and pasting, problems such as old model data not being cleaned up, incorrect parameter entry, and mismatch between material codes and processes are very likely to occur, which can lead to production accidents in severe cases.

[0006] Third, formatting and standards are difficult to unify. Due to the lack of systematic constraints, the format, font, and image layout of documents written by different engineers often vary greatly, resulting in low document standardization and a poor reading experience.

[0007] Fourth, the processing of images and special markings is tedious. When creating instruction manuals, adjusting the images to a uniform size and aligning them within cells, as well as manually inserting corresponding warning icons based on the text content (such as "Caution: Prevent Static Electricity"), is an extremely time-consuming and repetitive task.

[0008] While some document management systems (DMS) exist, most focus on document storage and approval processes, lacking deep automated generation capabilities for manufacturing process details (such as process-to-material mapping, automatic image filling, and deduplication logic for self-inspection and mutual inspection). Therefore, there is an urgent need for a method that can intelligently assemble data and generate standardized work instructions based on structured databases using automated scripts. Summary of the Invention

[0009] This invention aims to solve the technical problems of low efficiency, error-proneness, inconsistent formats, and difficulty in matching images and material information in the existing technology of manually compiling work instructions, and provides a method for automatically generating work instructions based on databases and automated scripts.

[0010] To solve the above problems, the technical solution adopted by the present invention is as follows:

[0011] A method for automatically generating work instructions based on a database and automation scripts, applied to a system including a database module, a logic processing engine module, and a document generation module, the method comprising:

[0012] Step S1: The logic processing engine module receives key information input by the user, and the key information includes at least the product code;

[0013] Step S2: The logic processing engine module parses the key information and performs a correlation query in the database module to determine the corresponding product information, the referenced document template, and the applicable logic rules.

[0014] Step S3: Based on the queried product information, the logic processing engine module matches the corresponding process step data from the process step table of the database module, and combines it with the specific work data extracted from the work content table and the work key point table to assemble a structured local data object.

[0015] Step S4: The document generation module calls the determined document template, reads the local data object through an automated script, and automatically fills the work process and work instruction content into the document template according to the fill position defined by the logical rules, thereby generating a work instruction workbook.

[0016] Step S5: Based on the process names in the generated work instruction workbook, the logic processing engine module retrieves and loads the corresponding bill of materials data, work images, and special process identification images from the database module through an automated script, adjusts the format, and saves the final work instruction file.

[0017] Furthermore, the database module stores the structured data required to generate the work instructions, and the structured data is stored in the following associated data tables:

[0018] The product information table is used to store the product's name, specifications, packaging code, product line, and unique product code.

[0019] The process step table uses the process code as the primary key to store atomic process step details and related product information;

[0020] The job content table uses the job content code as the primary key and stores the job content description, operation points, illustrations, tool requirements, standard working hours, and self-inspection and mutual inspection content.

[0021] The work checklist stores information on tools and fixtures, key parameters, and precautions during the work process.

[0022] The logical rules table defines the business logic for generating the instruction manual, including process code strings, content filling definitions, and foreign key definitions for multiple fields;

[0023] The standard template table stores the physical storage paths for blank template files of different types of work instructions;

[0024] The bill of materials and the image library store material information and operation images with identification codes, respectively.

[0025] Furthermore, the process code string in the logical rule table is defined as an ordered string, with processes separated by delimiters, used to specify the steps and order required when generating a specific product instruction manual; the logical rule table also contains conditional logic, used to store conditional judgment logic, dynamically determining the template file encoding or data field to be called based on the value of the product attribute field.

[0026] Furthermore, step S3 specifically includes:

[0027] The logic processing engine module queries and matches the corresponding process step data for the product from the process step table based on the information in the product information table.

[0028] Map and load the matched process step data locally, and create a local data table;

[0029] If it is confirmed to be a modification iteration, then sub-code will be created based on the original process code;

[0030] Based on logical rules, specific job descriptions, key points of operation, self-inspection and mutual inspection content are extracted from the job content table, and precautions are extracted from the job key point table, and then assembled into a structured local data object.

[0031] During the assembly process, for self-inspection and mutual inspection content, duplicate data is removed, and only the self-inspection content of the first query process and the mutual inspection content of the last query process are retained.

[0032] Furthermore, in step S3, when reading and retrieving data from the process step table, if the product information is incomplete, an approximate matching method is used to retrieve the data; after the user improves or adjusts the process step data based on the generated work instruction workbook and the actual product, the system supports writing the adjusted data back to the database module for reuse next time.

[0033] Further, step S4 specifically includes:

[0034] The document generation module calls a preset document template and instantiates it into a work instruction workbook. The document template is a Word document or Excel file with predefined format and placeholders.

[0035] Based on the process step data loaded locally in step S3, copy and create the corresponding number of worksheets in the work instruction workbook, and name each worksheet with the corresponding process name.

[0036] Entering the loop process, the definition is filled based on the process step data and the contents of the logical rule table. The corresponding value is obtained from the local data object, and the replacement or insertion operation is performed to fill the data into the corresponding worksheet.

[0037] Furthermore, the process of loading the bill of materials data in step S5 includes:

[0038] The script parses the process names in the generated work instruction workbook;

[0039] Based on the parsing results and the contents of the logical rule table, fill in the definitions and read material data from the database module or external ERP system to fill in the data.

[0040] For situations where a single process involves the input of multiple materials, precise loading and process-oriented allocation can be achieved by adding an identification suffix to the process name.

[0041] When the same material has multiple specifications, accurate matching can be achieved by adding a specification description suffix to the process name.

[0042] Furthermore, the process of loading the job image in step S5 includes:

[0043] Parse the image filenames in the image library and determine if the filenames match the worksheet names in the workbook of the assignment instructions;

[0044] If the names match, further parse the suffix number in the file name; if there are multiple consecutive numbers, insert multiple corresponding job images into the corresponding worksheet.

[0045] After the matched job images are loaded into the worksheet, the format is sorted out by an automated script. The format sorting includes scaling and aligning according to the defined size ratio and adding comments according to the naming suffix.

[0046] If the filename does not match the worksheet name, skip the currently matched job image and iterate through all job images in the image library until all worksheet images are matched.

[0047] Furthermore, when loading images for a task, the system supports reusing images from the database or using real-life photos:

[0048] Based on the packaging code in the product information, download the corresponding work images from the image library in the database module to the local machine for reuse;

[0049] Alternatively, select locally taken product operation photos and name and encode the operation photos according to the process code for automated scripts to parse and call.

[0050] Furthermore, the process of loading the special process identifier image in step S5 includes:

[0051] The automated scripts parse the descriptions and characters of the work content in the work instruction workbook to extract keywords and tags;

[0052] The extracted tag content is then fuzzily matched with the name of the special process identifier image library;

[0053] If a match is successful, a corresponding special symbol image is inserted at the specified position. The special symbol image includes at least a key process identifier, an ESD protection identifier, or a skill position identifier.

[0054] If a match is unsuccessful, skip to the next step until all worksheets in the work instruction workbook have been matched.

[0055] Compared with the prior art, the beneficial effects of the present invention are:

[0056] (1) The fully automated generation of work instructions has been achieved, significantly improving efficiency and accuracy. This invention, through a logic processing engine and automated scripts, streamlines the entire process from inputting product codes to outputting the final document. Through the closed-loop operation of S1-S5, the manual editing work that originally required several hours is shortened to minutes of automatic generation by the system, completely eliminating data omissions and parameter errors caused by manual copying and pasting, and ensuring the uniformity of the work instructions format and the accuracy of the data.

[0057] (2) It decouples data from documents, facilitating maintenance and reuse. This invention stores process data in a granular manner by constructing structured databases such as product information tables, process step tables, and work content tables. When process standards change, only the atomic data in the database needs to be updated to automatically update all work instructions that reference that data, greatly reducing maintenance costs.

[0058] (3) Intelligent deduplication logic optimizes document readability. This invention innovatively introduces deduplication logic for self-inspection and mutual inspection content in the data assembly stage (self-inspection is retained in the first process and mutual inspection is retained in the last process). This design avoids redundant inspection requirements appearing repeatedly on each page of the work instruction, allowing operators to focus on the core content of the current process, while also conforming to the logic of the actual production process.

[0059] (4) It solves the problem of accurate matching between complex processes and bill of materials. By adding identification suffixes (such as distinguishing different specifications or multiple inputs) to the process name, this invention cleverly solves the complex allocation problem of one process corresponding to multiple materials or one material corresponding to multiple processes, and realizes the accurate placement of bill of materials data in the work instructions without the need for manual secondary verification.

[0060] (5) It realizes the automation and standardization of image processing. This invention realizes the automatic search, insertion, multi-image layout and size scaling of job images through the mapping mechanism between file name and worksheet name and the parsing of suffix numbers. This not only solves the pain point of manually adjusting images in Excel, but also supports the reuse of database images and local real-shot images, which greatly improves the efficiency of mixed text and image layout.

[0061] (6) Intelligent recognition and visualization of special process identifiers have been achieved. This invention extracts keywords (such as ESD, key processes) through text mining technology, automatically matches and inserts corresponding warning symbols. This not only reduces the risk of engineers missing identifiers, but also strengthens the control of key control points in the production process through intuitive visual symbols, and enhances the safety guidance value of process documents.

[0062] (7) It has the ability to write back data and self-evolve. This invention supports writing back the corrections made by the user based on the generated file to the database. This mechanism enables the system to continuously improve the process database as it is used in practice, thereby improving the system's flexibility and scalability and solving the problem that dead data cannot adapt to the dynamic situation on site.

[0063] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, embodiments of the present invention are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0064] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 This is a system overall architecture block diagram provided in the embodiments of the present invention;

[0066] Figure 2 This is a flowchart of the automatic generation method for work instructions provided in an embodiment of the present invention;

[0067] Figure 3 This is an example diagram of a work instruction generated according to an embodiment of the present invention. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0069] like Figure 1 As shown, this invention provides a method for automatically generating work instructions based on a database and automated scripts. This method is applied to an integrated system, which mainly includes a database module, a logic processing engine module, and a document generation module. The database module serves as the data source, storing granular process data, logical rules, and resource files. The logic processing engine module, acting as the system's "brain," is typically implemented using VBA, Python, or other automated scripts, responsible for receiving user input, coordinating subsequent operations, and performing logical judgments and data assembly. The document generation module is responsible for calling office software automation components (such as Word Applications), opening predefined document templates, and rendering the content.

[0070] Combination Figure 2 The flowchart shown illustrates the main steps involved in automatically generating this work instruction:

[0071] Step S1: Receiving Key Information

[0072] The logic processing engine module first receives key information input by the user through the human-computer interaction interface. This key information serves as a trigger signal to initiate the automated process and includes at least a product code that uniquely identifies the product. In some implementation scenarios, the user can also input specific conditions (such as file code, specific version number, etc.) as auxiliary information to specify constraints when generating a specific product instruction manual.

[0073] Step S2: Information parsing and related queries

[0074] The logic processing engine module parses the key information input by the user, extracts the core search terms, and performs related queries in the database module.

[0075] Specifically, the engine determines the corresponding product information (such as name, specifications, etc.) in the product information table of the database module based on the product code; and determines the referenced document template and applicable logical rules in the logical rules table and standard template table based on the product attributes or file codes. In this step, the logical rules table also contains conditional logic, which is used to dynamically determine the referenced template file code or the data field to be called based on the value of the product attribute field (for example, judging the product line field, and calling a specific template if it is a specific value).

[0076] Step S3: Data Assembly and Localization

[0077] Based on the retrieved product information, the logic processing engine module performs core data matching and assembly to generate structured local data objects. This step includes the following detailed processes:

[0078] 1. Process Step Matching: The logic processing engine module queries and matches the required process step data for the corresponding product from the process step table in the database module based on the product information. If the product information is incomplete, the system uses an approximate matching method to retrieve the process data of the most similar product to ensure that the process is not interrupted.

[0079] 2. Local Mapping and Sub-code Creation: The matched process step data is mapped and loaded into local memory or a temporary table, creating a local data table. If the current operation is confirmed to be a modification or iteration of an old process, the system will automatically create sub-code based on the original process code to preserve version traceability.

[0080] 3. Detailed Content Assembly: Based on logical rules, extract specific job descriptions, key operational points, self-inspection, and mutual inspection content from the job content table; extract precautions (including tool and fixture information and key parameters) from the job point table. Assemble these scattered data fragments into a complete, structured local data object.

[0081] 4. Intelligent Deduplication: During assembly, the system executes special deduplication logic for self-inspection and mutual inspection content: removing duplicate data and retaining only the self-inspection content of the first queried process and the mutual inspection content of the last queried process. This process greatly optimizes document redundancy, avoids the recurrence of the same inspection requirements in intermediate processes, and conforms to the actual production practice of self-inspection at the beginning and mutual inspection at the end.

[0082] 5. Data Write-back Mechanism: Notably, users can refine or adjust process step data based on the generated work instruction workbook and the actual product conditions. The system supports writing the adjusted data back to the database module for reuse, achieving data self-evolution and accumulation.

[0083] Step S4: Fill in the document template

[0084] The document generation module calls the document template determined in step S2. The document template is usually a Word document or Excel file with predefined formatting and placeholders (such as a path file defined in a standard template table).

[0085] The specific execution process for this step is as follows:

[0086] 1. Initialize workbook: The system opens the preset document template, copies and creates the corresponding number of worksheets based on the process step data loaded locally in step S3, and names each worksheet in the work instruction workbook with the corresponding process name.

[0087] 2. Loop Fill: Entering the loop process, the system traverses each worksheet, fills the definition based on the process step data and the contents of the logical rule table, obtains the corresponding values ​​(such as text descriptions and parameter indicators) from the local data object, performs the operation of replacing placeholders or inserting cells, and automatically fills the work process and work instruction content into the document template to generate a preliminary work instruction workbook.

[0088] Step S5: Resource Loading and Final Generation

[0089] Based on the process names in the generated work instruction workbook, the logic processing engine module retrieves and loads the corresponding bill of materials data, work images, and special process identification images from the database module through an automated script, adjusts the format, and saves the final work instruction file.

[0090] This step involves three key parallel or serial processing procedures:

[0091] 1. Accurate loading of bill of materials data:

[0092] The script parses the process names in the generated work instruction workbook.

[0093] Based on the parsing results and the contents of the logical rule table, fill in the definitions and read material data from the database module (bill of materials table) or external ERP system to fill in the data.

[0094] Multi-material / Multi-specification matching logic: For situations where a single process involves multiple material inputs, the system achieves accurate loading and process-oriented allocation by recognizing an identification suffix added to the process name; for situations where the same material has multiple specifications, accurate matching is achieved by adding a specification description suffix to the process name. This naming convention-based logic cleverly solves the problem of allocating complex bills of materials.

[0095] 2. Intelligent processing of assignment images:

[0096] Filename matching logic: Parse the image filenames in the image library and determine if the filenames match the worksheet names under the workbook of the assignment instructions. If the names match, further parse the suffix number in the filename. If multiple consecutive numbers exist, insert multiple corresponding assignment images into the corresponding worksheet. If no match is found, skip to the next step, and continue until the traversal is complete.

[0097] Formatting: After loading the matched assignment images into the worksheet, the automated script performs formatting, including scaling according to the defined size ratio, aligning cells, and adding comments according to the naming suffix, without the need for manual formatting.

[0098] Image source selection: When loading images, the system supports two modes: one is to download the corresponding work images from the image library of the database module based on the packaging code in the product information and reuse them locally; the other is to select local real-shot product work images and name and encode the work images according to the process code for automated script parsing and calling.

[0099] 3. Automated insertion of special process identifier images:

[0100] Automated scripts are used to perform text mining and parsing on the descriptions and characters of the assignment content in the assignment instruction workbook, extracting keywords and tags.

[0101] The extracted tag content is then fuzzily matched with the name of the special process identifier image library.

[0102] If a match is successful (e.g., a match with keywords such as "static electricity" or "welding"), a corresponding special symbol image is inserted at the designated location. This special symbol image includes at least key process identifiers, ESD protection identifiers, or skill level identifiers. This enables automatic alerts for critical safety and quality points.

[0103] To support the operation of the above method, this invention constructs a highly structured database module. The database module stores the structured data required to generate the work instructions, specifically stored in the following associated data tables:

[0104] Product Information Table: This table stores the product's name, specifications, packaging code, product line, and unique product code. This is the starting point for queries.

[0105] Process step table: Using the process code as the primary key, it stores atomic process step details and related product information.

[0106] Job Content Table: Using the job content code as the primary key, this table stores detailed descriptions of job content, key operational points, diagrams, tool requirements, standard working hours, and self-inspection and mutual inspection content. Example: The job content code defines each job content, such as "S01, S205.0, S205.1". Here, S205.0 and S205.1 indicate that there are two similar job contents for this process, requiring further data matching based on brand and product type.

[0107] Work Points Table: Stores tool and fixture information, key parameters, and precautions during the work process.

[0108] Logical Rule Table: This is the "brain" of the system, defining the business logic for generating the instruction manual. This table includes:

[0109] 1) Process code string, defined as an ordered string (e.g., "S101|S2050|S308", where S1-S3 is the order of operations), with operations separated by delimiters, used to specify the steps and order required to generate a specific product instruction manual.

[0110] 2) Content Fill Definition: Specifies the specific location where data is filled into the template.

[0111] 3) Foreign key definition: Foreign key definition with multiple fields (such as brand and product type) is used for complex associations to achieve precise data matching.

[0112] 4) Conditional Logic: Used to store conditional judgment logic, dynamically determining the template file encoding or data field to be called based on the value of the product attribute field. For example, defining template parsing rules: taking the file encoding "NC-PWI-2504" as an example, the system configuration logic extracts its 4th character "P" as the judgment key value, and uses this to determine to call the "Group Test Packaging Configuration Template"; or defining attribute association rules, such as "IF Product_Line ='POE'THEN..." to perform specific data validation or default value filling based on product line attributes.

[0113] Standard Template Table: The physical storage path for storing blank template files of different types of work instructions.

[0114] Bill of Materials (BOM) and Image Library: These store material information and images of work processes with identification codes, respectively.

[0115] Combination Figure 3 Taking the generation of a work instruction manual for a switch product with model number "30007830 GS9" as an example, the specific implementation process of this invention is explained as follows:

[0116] User input: The user enters the product code "30007830" and the file code "NC-PWI-5951" on the input interface.

[0117] Logic startup and query: The logic processing engine (such as a VBA program) starts and queries the database. First, it finds the model in the product information table as "switch, assembly structure code is M18, hardware code is 2132, packaging code is P13044".

[0118] Rule matching: Next, the logical rule table is queried, and the rule shows: For "This file encoding", "Group test package configuration template.xlsx" must be used.

[0119] Data Reading and Adjustment: Based on the input materials and the results of product information parsing, the database is queried, and data is read and retrieved from the process step table. If the product information is incomplete, approximate matching is used to retrieve data. Users refine or adjust the process steps according to the actual product and write them back to the database for future reuse.

[0120] Detailed Data Extraction: Next, the system reads data from the work content table according to the process description and process number, as defined in the process step table. The engine then extracts detailed descriptions, key points and contents, tooling information, and critical parameters for each step from the process step table. If a process has multiple matching items (as in S205.0 / S205.1 mentioned above), further precise matching is achieved through multi-condition fields (such as brand and product line).

[0121] Logical processing and deduplication: Simultaneously, the logical processing engine performs further data processing based on the process number logic. At the same time, according to the process logic relationship, it formats the job content and precautions (e.g., adding job step characters and combining data based on the order of process numbers). For self-inspection and mutual inspection content, duplicate data is removed, retaining only the self-inspection content from the first query of the process and the job completion mutual inspection content from the last query of the process.

[0122] Template generation: The engine opens the template (e.g., "Group Test Package Configuration Template.xlsx"), defines the filling logic according to the filling definition table, and completes the data filling and workbook creation in sequence (including the worksheet loaded locally in step S4).

[0123] Image and symbol filling: Next, complete the work diagram (if there is an image in the historical image library (based on packaging code P13044), the image can be reused for loading), and fill in the bill of materials, work hours, and special symbols. For example, if the system recognizes the words "anti-static" in the text, it will automatically fill in... Figure 3 An ESD protection icon has been inserted at the location shown.

[0124] File saving: After all content is filled in, extract part of the product information specification file and name it as follows: "20010276_30007830 GS9 2025-11-8 NC-PWI-5951 V0.0.xlsx", and save it in the specified location.

[0125] In summary, this invention, by constructing a sophisticated database and flexible logical rules, combined with automated scripts, achieves fully automated generation of work instructions from the data source to the final document, solving the problems of low efficiency, error-proneness, and low standardization of traditional manual compilation.

[0126] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for automatically generating work instructions based on a database and automated scripts, characterized in that, The method is applied to a system including a database module, a logic processing engine module, and a document generation module, and the method includes: Step S1: The logic processing engine module receives key information input by the user, and the key information includes at least the product code; Step S2: The logic processing engine module parses the key information and performs a correlation query in the database module to determine the corresponding product information, the referenced document template, and the applicable logic rules. Step S3: Based on the queried product information, the logic processing engine module matches the corresponding process step data from the process step table of the database module, and combines it with the specific work data extracted from the work content table and the work key point table to assemble a structured local data object. Step S4: The document generation module calls the determined document template, reads the local data object through an automated script, and automatically fills the work process and work instruction content into the document template according to the fill position defined by the logical rules, thereby generating a work instruction workbook. Step S5: Based on the process names in the generated work instruction workbook, the logic processing engine module retrieves and loads the corresponding bill of materials data, work images, and special process identification images from the database module through an automated script, adjusts the format, and saves the final work instruction file.

2. The method for automatically generating work instructions based on a database and automated scripts according to claim 1, characterized in that, The database module stores the structured data required to generate the work instructions, and the structured data is stored in the following associated data tables: The product information table is used to store the product's name, specifications, packaging code, product line, and unique product code. The process step table uses the process code as the primary key to store atomic process step details and related product information; The job content table uses the job content code as the primary key and stores the job content description, operation points, illustrations, tool requirements, standard working hours, and self-inspection and mutual inspection content. The work checklist stores information on tools and fixtures, key parameters, and precautions during the work process. The logical rules table defines the business logic for generating the instruction manual, including process code strings, content filling definitions, and foreign key definitions for multiple fields; The standard template table stores the physical storage paths for blank template files of different types of work instructions; The bill of materials and the image library store material information and operation images with identification codes, respectively.

3. The method for automatically generating work instructions based on a database and automated scripts according to claim 2, characterized in that, The process code string in the logical rule table is defined as an ordered string, with processes separated by delimiters, used to specify the steps and order required to generate a specific product instruction manual; the logical rule table also contains conditional logic, used to store conditional judgment logic, dynamically determining the template file encoding or data field to be called based on the value of the product attribute field.

4. The method for automatically generating work instructions based on a database and automated scripts according to claim 1, characterized in that, Step S3 specifically includes: The logic processing engine module queries and matches the corresponding process step data for the product from the process step table based on the information in the product information table. Map and load the matched process step data locally, and create a local data table; If it is confirmed to be a modification iteration, then sub-code will be created based on the original process code; Based on logical rules, specific job descriptions, key points of operation, self-inspection and mutual inspection content are extracted from the job content table, and precautions are extracted from the job key point table, and then assembled into a structured local data object. During the assembly process, for self-inspection and mutual inspection content, duplicate data is removed, and only the self-inspection content of the first query process and the mutual inspection content of the last query process are retained.

5. The method for automatically generating work instructions based on a database and automated scripts according to claim 4, characterized in that, In step S3, when reading and retrieving data from the process step table, if the product information is incomplete, the data is retrieved using an approximate matching method. After the user improves or adjusts the process step data based on the generated work instruction workbook and the actual product, the system supports writing the adjusted data back to the database module for reuse next time.

6. The method for automatically generating work instructions based on a database and automated scripts according to claim 4, characterized in that, Step S4 specifically includes: The document generation module calls a preset document template and instantiates it into a work instruction workbook. The document template is a Word document or Excel file with predefined format and placeholders. Based on the process step data loaded locally in step S3, copy and create the corresponding number of worksheets in the work instruction workbook, and name each worksheet with the corresponding process name. Entering the loop process, the definition is filled based on the process step data and the contents of the logical rule table. The corresponding value is obtained from the local data object, and the replacement or insertion operation is performed to fill the data into the corresponding worksheet.

7. The method for automatically generating work instructions based on a database and automated scripts according to claim 1, characterized in that, The process of loading the bill of materials data in step S5 includes: The script parses the process names in the generated work instruction workbook; Based on the parsing results and the contents of the logical rule table, fill in the definitions and read material data from the database module or external ERP system to fill in the data. For situations where a single process involves the input of multiple materials, precise loading and process-oriented allocation can be achieved by adding an identification suffix to the process name. When the same material has multiple specifications, accurate matching can be achieved by adding a specification description suffix to the process name.

8. The method for automatically generating work instructions based on a database and automated scripts according to claim 1, characterized in that, The process of loading the job image in step S5 includes: Parse the image filenames in the image library and determine if the filenames match the worksheet names in the workbook of the assignment instructions; If the names match, further parse the suffix number in the file name; if there are multiple consecutive numbers, insert multiple corresponding job images into the corresponding worksheet. After the matched job images are loaded into the worksheet, the format is sorted out by an automated script. The format sorting includes scaling and aligning according to the defined size ratio and adding comments according to the naming suffix. If the filename does not match the worksheet name, skip the currently matched job image and iterate through all job images in the image library until all worksheet images are matched.

9. The method for automatically generating work instructions based on a database and automated scripts according to claim 8, characterized in that, When loading images for a task, the system supports reusing images from the database or using real-life photos: Based on the packaging code in the product information, download the corresponding work images from the image library in the database module to the local machine for reuse; Alternatively, select locally taken product operation photos and name and encode the operation photos according to the process code for automated scripts to parse and call.

10. The method for automatically generating work instructions based on a database and automated scripts according to claim 1, characterized in that, The process of loading the special process identifier image in step S5 includes: The automated scripts parse the descriptions and characters of the work content in the work instruction workbook to extract keywords and tags; The extracted tag content is then fuzzily matched with the name of the special process identifier image library; If a match is successful, a corresponding special symbol image is inserted at the specified position. The special symbol image includes at least a key process identifier, an ESD protection identifier, or a skill position identifier. If a match is unsuccessful, skip to the next step until all worksheets in the work instruction workbook have been matched.