An automatic generation method of assembly language for reconfigurable flexible assembly lines

By extracting data from the 3D model and generating the assembly language A-code, the deficiency of automatic generation of DSL in the reconfigurable flexible assembly line is solved, and efficient and automatic assembly program generation is achieved to meet the production needs of multi-variety and small-batch products.

CN119045797BActive Publication Date: 2025-09-16TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411271810.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-09-16
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

The existing technology lacks support for domain-specific languages ​​(DSLs) and their automatic generation methods for reconfigurable flexible assembly lines, resulting in manual writing that is time-consuming and error-prone, making it difficult to meet the flexible production needs of high-variety, small-batch products.

Method used

Extract key data from the product's 3D model, build an assembly process knowledge graph, use community detection algorithms to divide sub-assemblies, generate the optimal assembly sequence, and automatically generate reconfigurable flexible assembly line language code (A-code) through SWRL rules and SPARQL query statements, integrating the control of execution equipment such as robotic arms and PLCs.

Benefits of technology

It significantly shortens the assembly line reconstruction time, improves production efficiency and market responsiveness, ensures the correctness and reliability of the assembly program, and improves the stability and automation level of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045797B_ABST
    Figure CN119045797B_ABST
Patent Text Reader

Abstract

An automated generation of an assembly language (A‑code) for a reconfigurable flexible assembly line includes: extracting geometric, topological, and material information from a three-dimensional product model; constructing an assembly process knowledge graph to define assembly objects, resources, and procedures; instantiating stored data to form a knowledge base; using a community detection algorithm to divide subassemblies and simplify assembly sequence planning; generating an optimal assembly sequence based on subassemblies and a priority relationship matrix; optimizing assembly process allocation and assembly unit layout; formulating SWRL rules and SPARQL query statements; and generating A‑code through reasoning using semantic web tools. Automated A‑code generation and verification ensure program correctness. By automatically extracting assembly information and generating assembly programs directly from the three-dimensional model of the product, the present invention eliminates the step of manually rewriting the assembly program based on product changes in traditional methods, significantly shortening the time for assembly line reconstruction, improving production line stability and product quality, and increasing production efficiency and the ability to respond to market changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automated assembly, and in particular to an automatic generation method of assembly language for a reconfigurable flexible assembly line. Background Art

[0002] In the manufacturing industry, traditional rigid assembly lines struggle to meet the flexible production demands of high-variety, small-batch product assembly. Reconfigurable Flexible Assembly Lines (RFALs), as a solution, face a major bottleneck in software reconfiguration, primarily due to the lack of comprehensive Domain-Specific Language (DSL) support and its automatic generation.

[0003] CN103538069A discloses a DSL similar to G-code. A host computer acquires the DSL, encodes it, and packages it into data frames, which are then sent to a slave controller via industrial Ethernet. The slave controller receives and decodes the data frames and generates robot control signals based on the decoded DSL to control the robot's motion. CN117193225A defines a DSL for wafer manufacturing. This DSL has powerful expressive capabilities and can flexibly define process parameters, steps, and equipment operations. By executing these scripts in real time, it ensures process accuracy and responsiveness, significantly improving the efficiency and quality of wafer manufacturing.

[0004] CN115981615A provides a G-code generation method that integrates a language model and a knowledge graph. The method generates processing feature text based on a machining drawing, inputs it into a trained language model, and generates a first operation text word. The method then searches the knowledge graph for the associated target machining operation and iteratively updates the processing feature text until the language model outputs the end character. Finally, the G-code is automatically generated based on the preset mapping between the machining operation and the G-code.

[0005] In summary, there is currently a lack of research on RFAL software refactoring, primarily due to the lack of a complete DSL for RFAL. Furthermore, DSL writing is primarily manual, which is time-consuming and error-prone, making it difficult to meet the requirements of efficient and flexible production.

[0006] It should be noted that the information disclosed in the above background technology section is only used to understand the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0007] The main purpose of the present invention is to solve the problems existing in the above-mentioned background technology and provide a method for automatically generating an assembly language for a reconfigurable flexible assembly line.

[0008] To achieve the above object, the present invention adopts the following technical solutions:

[0009] In a first aspect of the present invention, a method for automatically generating an assembly language (A-code) for a reconfigurable flexible assembly line (RFAL) comprises the following steps:

[0010] S1. Extract key data from a three-dimensional model of a product, wherein the key data includes geometric information, topological information, and material properties;

[0011] S2. Use ontology methods to construct an assembly process knowledge graph, defining assembly objects, assembly resources, assembly procedures, and their relationships;

[0012] S3. The extracted data is instantiated and stored according to the structure of the knowledge graph to form a queryable and reasonable knowledge base;

[0013] S4. Use community detection algorithm to divide assembly parts into subassemblies to reduce the complexity of assembly sequence planning problem;

[0014] S5. Generate the optimal assembly sequence of the product based on the subassembly partitioning results and the priority relationship matrix;

[0015] S6. With assembly efficiency as the optimization goal, the assembly processes are assigned to the various assembly units, and the positions of the assembly units are adjusted to form an efficient assembly line layout;

[0016] S7. Formulate SWRL rules and SPARQL query statements based on the entity relationships in the assembly process knowledge graph and the logical rules in the assembly process;

[0017] S8. Use semantic web tools to reason about the assembly process knowledge graph and generate language code for reconfigurable flexible assembly lines based on SWRL rules and SPARQL query statements.

[0018] In a second aspect of the present invention, a computer program product includes a computer program, which, when executed by a processor, implements the method for automatically generating an assembly language for a reconfigurable flexible assembly line.

[0019] The present invention has the following beneficial effects:

[0020] The present invention proposes a method for automatically generating an assembly language for a reconfigurable flexible assembly line, which automatically generates the assembly language code (abbreviated as A-code) of the reconfigurable flexible assembly line directly from the three-dimensional model of the assembly body, thereby improving the degree of automation and shortening the time cycle from design to production. In the present invention, an assembly language A-code for a reconfigurable flexible assembly line RFAL is designed to realize the integrated control of execution equipment such as a robotic arm and a PLC. By constructing an assembly process knowledge graph, combining an algorithm to generate an assembly process plan, and formulating reasoning rules and SPARQL query statements to automatically generate A-code. The method of the present invention automatically generates a special language A-code in the field of reconfigurable flexible assembly, effectively solving the problem of multi-category product assembly tasks, and providing a higher level of flexibility and automation. Furthermore, an embodiment of the present invention constructs an IDE that integrates functions such as PLC and robotic arm control, syntax checking, and operation monitoring to realize one-stop assembly program development and management, improve development efficiency, and ensure real-time monitoring and rapid response to problems.

[0021] Compared with traditional technologies, the main advantages of this invention are:

[0022] By automatically extracting assembly information and generating assembly programs directly from the product's 3D model, the traditional method of manually rewriting assembly programs based on product changes is eliminated. This approach significantly shortens assembly line reconfiguration time, improving production efficiency and the ability to respond to market changes.

[0023] The assembly language (A-code) for reconfigurable flexible assembly is designed to be concise and intuitive, with clear grammatical rules, allowing programmers to write and understand assembly programs more quickly. At the same time, through automated generation and verification mechanisms, the correctness and reliability of assembly programs are ensured, the possibility of programming errors is reduced, and the stability of the production line and product quality are improved.

[0024] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 Flowchart of the automatic generation method of the assembly language A-code for RFAL according to an embodiment of the present invention.

[0026] Figure 2 This is a design flow chart of the RFAL-oriented assembly language A-code according to an embodiment of the present invention.

[0027] Figure 3 This is a schematic diagram of modeling of the mode layer according to an embodiment of the present invention.

[0028] Figure 4 The diagram is a schematic diagram of data layer construction according to an embodiment of the present invention.

[0029] Figure 5 This is an example diagram of a real-life scenario of a reconfigurable flexible assembly line according to an embodiment of the present invention.

[0030] Figure 6 Generate an executable A-code (shuttle valve product) example diagram for the embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope of the present invention and its application.

[0032] See Figure 1 and Figure 2 The embodiment of the present invention provides a method for automatically generating an assembly language for a reconfigurable flexible assembly line, comprising the following steps:

[0033] S1. Extract key data from a three-dimensional model of a product, wherein the key data includes geometric information, topological information, and material properties;

[0034] S2. Use ontology methods to construct an assembly process knowledge graph, defining entities such as assembly objects, assembly resources, and assembly procedures and their relationships;

[0035] S3. The extracted data is instantiated and stored according to the structure of the knowledge graph to form a queryable and reasonable knowledge base;

[0036] S4. Use community detection algorithm to divide assembly parts into subassemblies to reduce the complexity of assembly sequence planning problem;

[0037] S5. Generate the optimal assembly sequence of the product based on the subassembly partitioning results and the priority relationship matrix;

[0038] S6. With assembly efficiency as the optimization goal, the assembly processes are assigned to the various assembly units, and the positions of the assembly units are adjusted to form an efficient assembly line layout;

[0039] S7. Formulate SWRL rules and SPARQL query statements based on the entity relationships in the assembly process knowledge graph and the logical rules in the assembly process;

[0040] S8. Use semantic web tools to reason about the assembly process knowledge graph and generate language code for reconfigurable flexible assembly lines based on SWRL rules and SPARQL query statements.

[0041] The assembly language referred to in the present invention is a special control language designed for a reconfigurable flexible assembly line (RFAL), which integrates control instructions and functions for robotic arms, grippers, cylinders, etc., aiming to improve the efficiency and controllability of the assembly line.

[0042] In some embodiments, the method may further include: designing a user-friendly visual interface program (GUI) to provide a visual display of the entire process from product assembly process to automatic generation of assembly procedures;

[0043] See Figure 2 In some embodiments, in step S8, the reconfigurable flexible assembly line-specific language code is generated according to a pre-designed instruction set and pre-established grammatical rules;

[0044] The instruction set includes one or more of the following control instructions: robot arm control instructions, used to control the precise movement path of the robot arm in three-dimensional space; fixture operation instructions, used to control the operation of the fixture at the end of the robot arm to achieve accurate clamping and release of parts; tool switching instructions, used to control the robot arm to quickly change the execution tool during the assembly process.

[0045] The grammatical rules include instruction composition, parameter definition and execution order: the instruction composition includes the instruction name, parameter list and execution conditions to ensure the clarity and executableness of the instructions; the parameter definition includes the set parameter type and range to ensure the flexibility and accuracy of programming; the execution order includes the instruction execution order defined by logical operators to ensure the coordination and timing of each step in the assembly process.

[0046] In some embodiments, the robot arm control instructions include linear interpolation and circular interpolation instructions; the fixture operation instructions include grasping, releasing, fixture clamping and fixture releasing instructions; the tool switching instructions include unlocking tool and locking tool instructions.

[0047] See Figure 2 In some embodiments, the method further includes: interpreting and executing the reconfigurable flexible assembly line-specific language code through a pre-built interpreter to achieve control of the assembly line; the interpreter includes: a lexical analyzer, which is used to decompose the source code string of the special language code into a series of tokens, identify lexical units such as instruction names, parameters, operators, etc. through regular expressions or lexical analysis algorithms, and pass them to a syntax analyzer; a syntax analyzer, which is used to combine the tokens output by the lexical analyzer into an abstract syntax tree AST according to pre-defined grammatical rules to intuitively display the grammatical structure of the program; an execution engine, which is used to traverse the AST and call the corresponding underlying function or command according to the AST structure to execute each instruction to control the operation of the assembly line.

[0048] See Figure 2In some embodiments, the method further includes: using a pre-built integrated development environment IDE to write, edit, debug and execute the reconfigurable flexible assembly line-specific language code; the IDE includes: a code editor for providing syntax highlighting, code folding, and automatic indentation functions to improve code writing efficiency and readability; a syntax checker for real-time checking of syntax errors in the code and providing error prompts and correction suggestions; a code completion tool that automatically recommends available instructions and parameters based on the context entered to reduce keyboard input; a debugging tool that supports breakpoint setting, single-step execution, variable monitoring and other functions to facilitate developers to debug programs; a monitoring function that displays key parameters and execution status of the assembly process in real time, such as the position of the robotic arm, the status of the fixture, etc.; a user interface including a menu bar, a toolbar, a code editing area, a debugging area, etc., providing intuitive operation and view management.

[0049] In some embodiments, the method further comprises:

[0050] System integration: Integrate the interpreter and integrated development environment (IDE) used to interpret and execute the language code for the reconfigurable flexible assembly line into the RFAL control system to ensure that the automatically generated language code program for the reconfigurable flexible assembly line can be successfully executed on the RFAL, while ensuring that data exchange and communication between modules are smooth and error-free;

[0051] Assembly experiment verification: Select typical products for assembly experiments, and verify the effectiveness and performance of the reconfigurable flexible assembly line dedicated language code program by actually running it. During the experiment, key performance indicators such as assembly time, code length, and execution error rate are recorded. Based on the experimental results, the reconfigurable flexible assembly line dedicated language code program and its generation method are analyzed and optimized.

[0052] In some embodiments, in step S2, constructing the assembly process knowledge graph using the ontology method specifically includes pattern layer modeling and data layer construction.

[0053] The pattern layer modeling specifically includes modeling the assembly process ontology and defining the following classes and their relationships: assembly process, which includes processes, work steps, and assembly actions; assembly objects, which include assemblies, subassemblies, and parts; assembly resources, which include general assembly units, special assembly units, transfer units, and tools; program implementation, which includes programs, program segments, and functions.

[0054] The data layer construction specifically includes:

[0055] Assembly object information extraction: obtain the assembly information of parts in the assembly through the CAD software API and store it in the assembly process body. The information includes the geometric information, physical information and topological information of the parts. The geometric information includes the size, position and posture of the parts in the assembly model; the physical information includes the material properties and quality of the parts; the topological information uses the adjacency matrix and the precedence relationship matrix to represent the assembly relationship between parts.

[0056] Assembly resource information configuration describes the composition of the reconfigurable flexible assembly line, including the type, equipment and function of the assembly units, as well as their roles and relationships in the assembly process; the types of assembly units include general assembly units, transfer units and special assembly units, among which the general assembly units are responsible for performing routine assembly tasks, the transfer units are used to transfer parts between different assembly units to ensure the continuity of the assembly process, and the special assembly units are used to complete complex or special assembly tasks that the general assembly units cannot complete.

[0057] In some embodiments, in step S5, assembly sequence planning is performed, including: inputting a priority relationship matrix and a weighted adjacency matrix of parts in a product; clustering the parts of the product using a community detection algorithm to form subassemblies, thereby reducing the complexity of assembly sequence planning; based on the division results of the subassemblies, topologically sorting the parts within each subassembly and between subassemblies to determine the assembly order; selecting a reference body according to the principles of many adjacency relationships, high stability, large mass or large volume, and further adjusting the assembly order to ensure the efficiency and stability of the assembly process.

[0058] In step S6, an assembly line balance layout is performed, including: inputting the assembly sequence of the assembly body; constructing a mathematical model for the reconfigurable assembly line balancing problem RFALBP, with the goal of minimizing the assembly line work cycle while considering constraints such as the number of workstations, the number of parallel assembly units, and the priority rules of the assembly process; encoding the sequence of the assembly processes and the allocation of the assembly processes to the assembly units based on a genetic algorithm, and finding the optimal process allocation plan through continuous iterative optimization through operations such as crossover and mutation; and adjusting the position and layout of the assembly units according to the process allocation results.

[0059] In some embodiments, the method also includes further automatically generating an assembly program that can be executed on the assembly line based on the reconfigurable flexible assembly line-specific language code generated in step S8, specifically including: formulating a series of SWRL reasoning rules based on the assembly process, assembly steps, and mapping relationships between assembly objects, resources, and programs defined in the assembly process ontology to describe the relationship between elements in the assembly process, the order of assembly actions, and the selection of tools; instantiating a specific assembly process plan into a knowledge graph, including assembly sequence, process allocation, and assembly unit layout, to form a data basis for reasoning; using SPARQL query statements and SWRL rules to query and reason on the assembly process plan in the knowledge graph to extract assembly processes, steps, and related assembly objects and resource information; by traversing the assembly processes, steps, and related assembly objects and resources, automatically inferring the assembly actions and program segments corresponding to each process, and generating a directly executable reconfigurable flexible assembly line-specific language code program; outputting the generated reconfigurable flexible assembly line-specific language code program as an executable text file, and providing it to the integrated development environment IDE for actual operation and verification.

[0060] The automatic generation method of assembly language for reconfigurable flexible assembly lines provided by the present invention can significantly improve the automation and flexibility of reconfigurable flexible assembly lines (RFAL) to meet the production needs of multi-variety and small-batch products. By automatically extracting key data directly from the three-dimensional model of the product and generating the assembly language A-code, the present invention eliminates the tedious steps of manually writing assembly programs and greatly shortens the cycle from design to production. The design of A-code is intuitive and concise, and the grammatical rules are clear, which is convenient for programmers to quickly write and understand. At the same time, the automated generation and verification mechanism ensures the correctness and reliability of the program, reduces errors and improves the stability of the production line and product quality. In addition, the integrated development environment IDE constructed in the embodiment of the present invention integrates functions such as PLC and robot arm control, grammar checking, and operation monitoring, realizing one-stop assembly program development and management, further improving development efficiency and ensuring real-time monitoring and rapid response to problems, thereby effectively improving the software reconstruction capability of the assembly line and the flexibility of the production process.

[0061] Specific embodiments of the present invention are further described below.

[0062] The present invention proposes a method for automatically generating A-code to solve the problems of frequent replacement of multi-variety and small batch products and low efficiency of traditional manual assembly program writing. Figure 1As shown in Figure 1, the proposed method includes the following steps. First, key data such as geometry, topology, and material properties are extracted from the product's 3D model. An ontological approach is used to construct an assembly process knowledge graph, defining entities such as assembly objects, assembly resources, and assembly procedures, and their relationships. The extracted data is instantiated and stored according to the structure of the knowledge graph, forming a queryable and inferential knowledge base. Second, the Louvain community detection algorithm is used to partition the assembly parts into subassemblies, reducing the complexity of the assembly sequence planning problem. Based on the subassembly partitioning results and the priority relationship matrix, the optimal assembly sequence for the product is generated using methods such as topological sorting. Taking assembly efficiency as the optimization goal, optimization methods such as genetic algorithms are used to rationally allocate assembly processes to various assembly units, and the positions of assembly units are adjusted to form an efficient assembly line layout; thirdly, based on the entity relationships in the assembly process knowledge graph and the logical rules in the assembly process, SWRL (Semantic Web Rule Language) rules and SPARQL query statements are formulated, and semantic web tools such as Jena are used to reason about the assembly process knowledge graph and generate A-code code; fourthly, a user-friendly visual interface program (GUI) is designed to provide a visual display of the entire process from product assembly process to automatic generation of assembly program, and typical products (such as shuttle valves, pressure reducing valves, etc.) are selected to verify the effectiveness of automatic A-code generation.

[0063] Design the assembly language (A-code) for RFAL, the process is as follows Figure 2 As shown, it includes the following steps. The first step is to design a modular instruction set based on the needs of the assembly process. The instruction set covers multiple aspects such as robot arm motion control, fixture operation, and tool switching. Formulate the grammatical rules of A-code to ensure that each instruction has a clear format and structure to facilitate parsing and execution; the second step is to develop the core functions of the A-code interpreter, including lexical analyzer, syntax analyzer, execution engine, etc. The third step is to develop the integrated development environment (IDE) of A-code, which provides functions such as code editor, syntax highlighting, code completion, and error prompts. Integrate debugging tools and monitoring functions to allow developers to view the execution status and results of the program in real time during the writing and testing process. The fourth step is to deploy the A-code interpreter and IDE on RFAL to verify the effectiveness and performance of A-code through actual assembly tasks.

[0064] The specific implementation process is as follows:

[0065] 1. Design process of RFAL's assembly language A-code

[0066] 1. A-code instruction set and grammar rule design

[0067] Instruction set design

[0068] Specific instructions include but are not limited to:

[0069] Robotic arm motion control instructions: such as linear interpolation (mvs) and circular interpolation (mov), are used to control the movement path of the robotic arm in three-dimensional space.

[0070] Fixture operation instructions: such as grasp, release, clamp clamp, clamp release, etc., are used to realize the clamping and release of parts.

[0071] Tool switching instructions: such as unlock tool (unlockTool) and lock tool (lockTool), are used to quickly replace the end-of-arm execution tool during the assembly process.

[0072] Grammatical rule formulation

[0073] The grammar rules include:

[0074] Instruction composition: Each instruction consists of an instruction name, a parameter list, and optional execution conditions. For example, mvs p1 100 means that the robot arm moves in a straight line to position p1 at a speed of 100% of the maximum speed.

[0075] Parameter definition: The parameter type and range must be clearly specified, such as position parameters (p1, p2, etc.) and speed parameters (50-100 represents speed percentage).

[0076] Execution order: Define the execution order of instructions through logical operators (such as semicolon;).

[0077] 2. A-code interpreter development

[0078] Lexical Analyzer

[0079] The lexical analyzer is responsible for breaking down the A-code source code string into a series of tokens. It uses regular expressions or lexical analysis algorithms to identify lexical units such as instruction names, parameters, and operators, and passes them to the syntax analyzer.

[0080] Syntax analyzer

[0081] The parser combines the tokens output by the lexical analyzer into an abstract syntax tree (AST) according to predefined grammatical rules. The AST intuitively displays the grammatical structure of the program, facilitating subsequent interpretation and execution.

[0082] Execution Engine

[0083] The execution engine traverses the AST and calls the corresponding underlying function or command to execute each instruction. For example, when encountering the mvs p1 50 instruction, the execution engine will control the robotic arm to move in a straight line to position p1 at 50% speed.

[0084] 3. A-code Integrated Development Environment (IDE) Development

[0085] IDE core function development

[0086] Code Editor: Provides syntax highlighting, code folding, automatic indentation and other functions to improve code writing efficiency and readability.

[0087] Syntax Check: Checks for syntax errors in the code in real time and provides error prompts and correction suggestions.

[0088] Code completion: Automatically recommends available commands and parameters based on the context of input, reducing the amount of keyboard input.

[0089] Debugging tools: Supports breakpoint setting, single-step execution, variable monitoring and other functions to facilitate developers to debug programs.

[0090] Monitoring function: Real-time display of key parameters and execution status of the assembly process, such as robot arm position, fixture status, etc.

[0091] User interface design

[0092] The IDE user interface uses an intuitive graphical interface design, including a menu bar, toolbar, code editing area, and debugging area. Users can quickly access common functions through the menu, quickly switch view modes through the toolbar, write and edit A-code programs in the code editing area, and monitor program execution status in the debugging area.

[0093] 4. A-codeIDE deployed on RFAL

[0094] System Integration

[0095] Integrate the A-code interpreter and IDE into the RFAL control system to ensure that the A-code program can run smoothly on the RFAL. During the system integration process, ensure that data exchange and communication between modules are smooth and error-free.

[0096] Assembly test verification

[0097] We selected typical products (such as shuttle valves and pressure reducing valves) for assembly experiments, verifying the effectiveness and performance of the A-code program by actually running it. During the experiment, we recorded metrics such as assembly time, code length, and execution error rate, and analyzed and optimized the results.

[0098] 2. A-code automatic generation method

[0099] 1. Construction of assembly process knowledge graph

[0100] Pattern layer modeling

[0101] First, based on the seven-step method of Stanford University, the ontology of the assembly process is modeled. The ontology includes classes such as assembly process (process, step, assembly action), assembly objects (assembly, subassembly, parts), assembly resources (general assembly unit, special assembly unit, transfer unit, tool, etc.) and program implementation (program, program segment, function) and their relationships. For example, Figure 3 shown.

[0102] Data layer construction

[0103] Assembly object information: The assembly information of the parts in the assembly is extracted through the API of the CAD software and stored in the assembly process body for use in subsequent steps. The geometric information includes the size of the parts, as well as the position and posture of the parts in the assembly model. The physical information includes the material properties and mass of the parts. The topological information is represented as the adjacency matrix and the priority relationship matrix of the parts. For example, Figure 4 shown.

[0104] Assembly resource information: The reconfigurable flexible assembly line consists of general assembly units, transfer units and special assembly units. Each general assembly unit is equipped with industrial robots, tools and fixtures, etc. The end of the industrial robot is equipped with a quick-change male disc, which can cooperate with the female disc on each assembly tool to realize the switching of tools. By reconfiguring these structures, the assembly requirements of different products can be met. The transfer unit is used to transfer parts between different general assembly units, while the special assembly unit is responsible for performing some complex assembly tasks that cannot be achieved by general assembly units. For example Figure 5 shown.

[0105] 2. Assembly process generation

[0106] Assembly sequence planning

[0107] Input: precedence relationship matrix and weighted adjacency matrix of parts in the product (assembly).

[0108] Output: Optimal assembly sequence of product (assembly)

[0109] Optimization algorithms such as the Louvain community detection algorithm are used to cluster product parts into subassemblies, reducing the complexity of assembly sequence planning. Based on the resulting subassembly partitioning, parts are topologically sorted within each subassembly and between subassemblies to determine a reasonable assembly sequence. Reference bodies are selected based on specific criteria (such as high adjacency, high stability, and high mass / volume). Based on these criteria, the assembly sequence is further adjusted to ensure an efficient and stable assembly process.

[0110] Assembly line balance layout

[0111] Input: Assembly sequence of product (assembly)

[0112] Output: Product assembly process plan

[0113] A mathematical model for the reconfigurable assembly line balancing problem (RFALBP) is constructed, aiming to minimize the assembly line takt time while taking into account constraints such as the number of workstations, the number of parallel assembly units, and the priority rules for assembly processes. An improved genetic algorithm is used to encode the sequence of assembly processes and their allocation to assembly units. Through iterative optimization using operations such as crossover and mutation, the optimal process allocation is found and the product assembly process plan is generated. Based on the resulting process allocation, the position and layout of the assembly units are adjusted to ensure efficient assembly line operation. Furthermore, resources such as assembly tools and fixtures are rationally allocated to enhance the automation and flexibility of the assembly process.

[0114] 3. Automatic generation of assembly program

[0115] Automatic generation of assembly programs refers to the process of converting the generated assembly process plan into a directly executable A-code. According to the mapping relationship between the assembly process, assembly steps, and assembly objects, resources, and programs defined in the assembly process ontology, a series of SWRL (Semantic Web Rule Language) reasoning rules are formulated. These rules are used to describe the relationship between the elements in the assembly process, the order of assembly actions, the selection of tools, and other logic. The specific assembly process plan is instantiated into the knowledge graph, including information such as assembly sequence, process allocation, and assembly unit layout. These instantiation information serves as the basis for reasoning. The assembly process plan in the knowledge graph is queried and reasoned using SPARQL (Simple Protocol and RDF Query Language) query statements and SWRL rules. By traversing the assembly processes, steps, and related assembly objects and resources, the assembly actions and program segments corresponding to each process are automatically inferred. The generated assembly program is output as an executable text file and provided to the IDE for actual operation and verification. For example, Figure 6 shown.

[0116] By automatically extracting assembly information and generating assembly programs directly from the product's three-dimensional model, the present invention eliminates the step of manually rewriting assembly programs based on product changes in traditional methods, significantly shortening the time for assembly line reconstruction, improving production line stability and product quality, and increasing production efficiency and the ability to respond to market changes.

[0117] An embodiment of the present invention further provides a storage medium for storing a computer program, which at least performs the above method when executed.

[0118] An embodiment of the present invention further provides a control device, comprising a processor and a storage medium for storing a computer program; wherein the processor is configured to execute at least the method described above when executing the computer program.

[0119] An embodiment of the present invention further provides a processor, which executes a computer program and at least performs the method described above.

[0120] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a magnetic disk memory or a magnetic tape memory. The storage medium described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0121] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0122] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0123] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0124] Those skilled in the art will appreciate that all or part of the steps of the above-mentioned method embodiments may be implemented by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium. When the program is executed, the program executes the steps of the above-mentioned method embodiments. The aforementioned storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0125] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0126] The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0127] The features disclosed in several product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.

[0128] The features disclosed in several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0129] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. Those skilled in the art will recognize that, without departing from the scope of the present invention, several equivalent substitutions or obvious variations can be made, and the performance or use of the same should be considered to fall within the scope of protection of the present invention.

Claims

1. A method for automatically generating assembly language for a reconfigurable flexible assembly line, characterized in that: The steps include: S1. Extract key data from a three-dimensional model of a product, wherein the key data includes geometric information, topological information, and material properties; S2. Use ontology methods to construct an assembly process knowledge graph, defining assembly objects, assembly resources, assembly procedures, and their relationships; S3. The extracted data is instantiated and stored according to the structure of the knowledge graph to form a queryable and reasonable knowledge base; S4. Use community detection algorithm to divide assembly parts into subassemblies to reduce the complexity of assembly sequence planning problem; S5. Generate the optimal assembly sequence of the product based on the subassembly partitioning results and the priority relationship matrix; S6. With assembly efficiency as the optimization goal, the assembly processes are assigned to the various assembly units, and the positions of the assembly units are adjusted to form an efficient assembly line layout; S7. Formulate SWRL rules and SPARQL query statements based on the entity relationships in the assembly process knowledge graph and the logical rules in the assembly process; S8. Use semantic web tools to reason about the assembly process knowledge graph and generate language code for reconfigurable flexible assembly lines based on SWRL rules and SPARQL query statements; The method further includes automatically generating an assembly program executable on the assembly line based on the reconfigurable flexible assembly line-specific language code generated in step S8, specifically including: Based on the assembly process, assembly steps, and the mapping relationships between assembly objects, resources, and programs defined in the assembly process ontology, a series of SWRL reasoning rules are formulated to describe the relationships between elements in the assembly process, the sequence of assembly actions, and the selection of tools. Instantiate specific assembly process plans into the knowledge graph, including assembly sequence, process allocation, and assembly unit layout, to form a data foundation for reasoning; Using SPARQL query statements and SWRL rules, we query and reason about the assembly process solutions in the knowledge graph to extract assembly procedures, work steps, and related assembly objects and resource information. By traversing the assembly processes, steps, and related assembly objects and resources, the system automatically infers the assembly actions and program segments corresponding to each process, and generates a directly executable language-specific code program for a reconfigurable flexible assembly line. The generated reconfigurable flexible assembly line dedicated language code program is output as an executable text file and provided to the integrated development environment IDE for actual operation and verification.

2. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to claim 1, wherein: In step S8, the reconfigurable flexible assembly line-specific language code is generated according to the pre-designed instruction set and pre-established grammatical rules; The instruction set includes one or more of the following control instructions: Robotic arm control instructions, used to control the precise movement path of the robotic arm in three-dimensional space; Fixture operation instructions are used to control the operation of the fixture at the end of the robot arm to achieve accurate clamping and release of parts; Tool switching instructions are used to control the robot arm to quickly change the execution tool during the assembly process; The syntax rules include instruction composition, parameter definition and execution order: The command composition includes the command name, parameter list and execution conditions to ensure the clarity and executability of the command; The parameter definition includes the set parameter type and range to ensure programming flexibility and accuracy; The execution sequence includes the instruction execution sequence defined by logical operators, ensuring the coordination and timing of each step in the assembly process.

3. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to claim 2, wherein: The robot arm control instructions include linear interpolation and circular interpolation instructions; The clamp operation instructions include grasping, releasing, clamp clamping and clamp releasing instructions; The tool switching instructions include tool unlocking and tool locking instructions.

4. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 3, characterized in that: Also includes: The reconfigurable flexible assembly line-specific language code is interpreted and executed by a pre-built interpreter to realize control of the assembly line; The interpreter includes: A lexical analyzer is used to decompose the source code string of the special language code into a series of tokens, identify the instruction name, parameters, and operators through regular expressions or lexical analysis algorithms, and pass them to the syntax analyzer; The syntax analyzer is used to combine the tokens output by the lexical analyzer into an abstract syntax tree (AST) according to pre-defined grammatical rules to intuitively display the grammatical structure of the program; The execution engine is used to traverse the AST and call the corresponding underlying function or command according to the AST structure to execute each instruction to control the operation of the assembly line.

5. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 3, characterized in that: Also includes: Using a pre-built integrated development environment (IDE) to write, edit, debug and execute the language code for the reconfigurable flexible assembly line; The IDE includes: Code editor, which provides syntax highlighting, code folding, and automatic indentation to improve code writing efficiency and readability; Syntax checker, which is used to check syntax errors in the code in real time and provide error prompts and correction suggestions; Code completion tool, which automatically recommends available commands and parameters based on the input context, reducing the amount of keyboard input; Debugging tools, used by developers to debug programs; Monitoring function, used to display key parameters and execution status of the assembly process in real time; User interface that provides intuitive operation and view management.

6. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 3, characterized in that: Also includes: System integration: Integrate the interpreter and integrated development environment (IDE) used to interpret and execute the language code for the reconfigurable flexible assembly line into the RFAL control system to ensure that the automatically generated language code program for the reconfigurable flexible assembly line can be successfully executed on the RFAL, while ensuring that data exchange and communication between modules are smooth and error-free; Assembly experiment verification: Select typical products for assembly experiments, and verify the effectiveness and performance of the reconfigurable flexible assembly line dedicated language code program by actually running it. During the experiment, key performance indicators such as assembly time, code length, and execution error rate are recorded. Based on the experimental results, the reconfigurable flexible assembly line dedicated language code program and its generation method are analyzed and optimized.

7. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 3, characterized in that: In step S2, the ontology method is used to construct the assembly process knowledge graph, which specifically includes pattern layer modeling and data layer construction; The model layer modeling includes modeling the assembly process ontology and defining the following classes and their relationships: Assembly process, including process, steps and assembly actions; Assembly objects, including assemblies, subassemblies, and parts; Assembly resources, including general assembly units, special assembly units, transfer units, and tools; Program implementation, including programs, program segments, and functions; The data layer construction includes: Assembly object information extraction: obtain the assembly information of parts in the assembly through the CAD software API and store it in the assembly process body. The information includes the geometric information, physical information and topological information of the parts. The geometric information includes the size, position and posture of the parts in the assembly model; the physical information includes the material properties and quality of the parts; the topological information uses the adjacency matrix and the precedence relationship matrix to represent the assembly relationship between parts. Assembly resource information configuration describes the composition of the reconfigurable flexible assembly line, including the type, equipment and function of the assembly units, as well as their roles and relationships in the assembly process; the types of assembly units include general assembly units, transfer units and special assembly units, among which the general assembly units are responsible for performing routine assembly tasks, the transfer units are used to transfer parts between different assembly units to ensure the continuity of the assembly process, and the special assembly units are used to complete complex or special assembly tasks that the general assembly units cannot complete.

8. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 3, characterized in that: In step S5, assembly sequence planning is performed, including: Input the priority relationship matrix and weighted adjacency matrix of parts in the product; Use community detection algorithms to cluster product parts to form subassemblies, reducing the complexity of assembly sequence planning; Based on the subassembly division results, topological sorting is performed on the parts within each subassembly and between subassemblies to determine the assembly order; Select reference bodies based on the principles of multiple adjacencies, high stability, large mass or large volume, and further adjust the assembly sequence to ensure an efficient and stable assembly process; In step S6, the assembly line balance layout is performed, including: Enter the assembly sequence of the assembly; A mathematical model for the reconfigurable assembly line balancing problem (RFALBP) is constructed. The goal is to minimize the assembly line takt time while considering constraints such as the number of workstations, the number of parallel assembly units, and the priority rules of assembly processes. Based on the genetic algorithm, the sequence of assembly processes and the allocation of assembly processes to assembly units are encoded and processed, and the optimal process allocation scheme is found through iterative optimization. Adjust the position and layout of the assembly unit based on the process allocation results.

9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for automatically generating an assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Robot control method, control device and control system

    CN103538069A

  • G code generation method fusing language model and knowledge graph and related equipment

    CN115981615A

  • Wafer manufacturing process flow control method and system

    CN117193225A

  • Ontology-based assembly system knowledge base and construction method thereof

    CN112800024A