Automatic assembly language generation method for reconfigurable flexible assembly line
By extracting data from three-dimensional models and building a knowledge graph, we automatically generate special language codes for reconstructible flexible assembly lines, solving the problem that traditional assembly lines are difficult to adapt to multiple varieties and small batch production, achieving efficient and automated assembly processes, and improving production lines flexibility and stability.
Patent Information
- Application Number
- CN202411271810.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-09-11
AI Technical Summary
Traditional rigid assembly lines are difficult to meet the assembly needs of multiple varieties and small batches of products. The lack of complete field-specific languages and automatic generation methods for reconfigurable flexible assembly lines, which makes assembly programs time-consuming and error-prone, making it difficult to achieve efficient and flexible production.
By extracting key data from the product's three-dimensional model, building an assembly process knowledge graph, using community detection algorithm to divide assemblies, generating the optimal assembly sequence, and using the Semantic Web tool to automatically generate reconstructible flexibility based on logical rules and SPARQL query statements Assembly line-specific language code.
It shortens the time period from design to production, improves the degree of automation and flexibility, reduces programming errors, ensures the correctness of assembly programs and the stability of production lines, and adapts to the rapid response needs of multiple categories of products.
Smart Images

Figure CN119045797A_ABST
Abstract
Description
Technical Field
[0001] The 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, facing the demand for assembly of multiple varieties and small batches of products, traditional rigid assembly lines are difficult to meet flexible production needs. As a solution, the bottleneck of software reconstruction of Reconfigurable Flexible Assembly Lines (RFAL) lies mainly in the lack of complete domain-specific language (DSL) support and its automatic generation method.
[0003] CN103538069A discloses a DSL similar to G code. The host computer obtains DSL and encodes and packages it into data frames, which are sent to the lower computer controller via industrial Ethernet. The lower computer receives and decodes the data frames, generates robot control signals based on the decoded DSL, and controls the movement of the robot. CN117193225A defines a DSL for wafer manufacturing. The DSL has powerful expressive power and can flexibly define process parameters, steps, and equipment operations. By executing these scripts in real time, the accuracy and response speed of the process flow are ensured, significantly improving the efficiency and quality of wafer manufacturing.
[0004] CN115981615A provides a G code generation method integrating language model and knowledge graph, generating processing feature text based on processing drawings, inputting into the trained language model to generate the first operation text word, then searching for the associated target processing operation in the knowledge graph, iteratively updating the processing feature text until the language model outputs the end character. Finally, the G code is automatically generated according to the mapping relationship between the preset processing operation and the G code.
[0005] In summary, there is a lack of research on RFAL software reconstruction. The reason is the lack of a complete DSL for RFAL. In addition, DSL writing mainly relies on manual work, which is time-consuming and error-prone, and it is difficult to meet the needs of efficient and flexible production.
[0006] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the 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 to provide an automatic generation method of 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 the three-dimensional model of the product, wherein the key data includes geometric information, topological information and material properties;
[0011] S2. Use the ontology method to construct the assembly process knowledge graph and define the assembly objects, assembly resources and assembly procedures and their relationships;
[0012] S3, instantiate and store the extracted data according to the structure of the knowledge graph to form a queryable and inferable knowledge base;
[0013] S4, using community detection algorithm to divide assembly parts into sub-assemblies 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. Taking assembly efficiency as the optimization goal, the assembly process is allocated to each assembly unit, and the position of the assembly unit is 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 codes 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, and when the computer program is executed by a processor, the method for automatically generating an assembly language for a reconfigurable flexible assembly line is implemented.
[0019] The present invention has the following beneficial effects:
[0020] The present invention proposes an automatic generation method of assembly language for reconfigurable flexible assembly lines, which automatically generates assembly language code (abbreviated as A-code) for reconfigurable flexible assembly lines directly from the three-dimensional model of the assembly, improves the degree of automation, and shortens the time cycle from design to production. In the present invention, an assembly language A-code for reconfigurable flexible assembly lines RFAL is designed to realize integrated control of execution devices such as robotic arms and PLCs. By constructing an assembly process knowledge graph, combining algorithms to generate assembly process plans, 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 higher flexibility and automation levels. Furthermore, an embodiment of the present invention constructs an IDE, which integrates functions such as PLC and robotic arm control, syntax checking, and operation monitoring, realizes one-stop assembly program development and management, improves development efficiency, and ensures real-time monitoring and rapid response to problems.
[0021] Compared with the traditional technology, the main advantages of the present 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 according to product changes is eliminated. This method significantly shortens the time for assembly line reconstruction, improves 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 The 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 The figure is a design flow chart of the RFAL-oriented assembly language A-code according to an embodiment of the present invention.
[0027] Figure 3 The figure is a schematic diagram of modeling of a mode layer according to an embodiment of the present invention.
[0028] Figure 4 The following 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 scene 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 and application of the present invention.
[0032] See also Figure 1 and Figure 2 The embodiment of the present invention provides an automatic generation method of assembly language for a reconfigurable flexible assembly line, comprising the following steps:
[0033] S1. Extract key data from the three-dimensional model of the product, wherein the key data includes geometric information, topological information and material properties;
[0034] S2. Use the ontology method to construct the assembly process knowledge graph and define entities such as assembly objects, assembly resources, and assembly procedures and their relationships;
[0035] S3, instantiate and store the extracted data according to the structure of the knowledge graph to form a queryable and reasonable knowledge base;
[0036] S4, using community detection algorithm to divide assembly parts into sub-assemblies 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. Taking assembly efficiency as the optimization goal, the assembly process is allocated to each assembly unit, and the position of the assembly unit is 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 codes 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., and aims 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 program;
[0043] See also 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 grammar rules;
[0044] The instruction set includes one or more of the following control instructions: robot arm control instructions, which are used to control the precise movement path of the robot arm in three-dimensional space; fixture operation instructions, which 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, which are 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 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 loosening instructions; the tool switching instructions include unlocking tool and locking tool instructions.
[0047] See also 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 also 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 that has been 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 in the assembly process in real time, such as the position of the robot arm, the status of the fixture, etc.; a user interface that includes 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 reconfigurable flexible assembly line special language code into the RFAL control system to ensure that the automatically generated reconfigurable flexible assembly line special language code program can be successfully executed on RFAL, and at the same time ensure that the 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-specific 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-specific 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 model layer modeling specifically includes modeling the assembly process ontology, defining the following classes and their relationships: assembly process, which includes process steps, 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 API of the CAD software 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 recording the material properties and quality of the parts; the topological information uses the adjacency matrix and the priority 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 types, equipment and functions of assembly units, and their roles and relationships in the assembly process; the types of assembly units include general assembly units, transfer units and special assembly units, wherein 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 to reduce 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 based on 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 balance problem RFALBP, the goal of which is to minimize 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 assembly processes; encoding the sequence of assembly processes and the allocation of assembly processes to assembly units based on a genetic algorithm, and continuously iterating and optimizing through operations such as crossover and mutation to find the optimal process allocation plan; 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 according to 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 about 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 assembly language automatic generation method for reconfigurable flexible assembly line provided by the present invention can significantly improve the automation and flexibility of reconfigurable flexible assembly line (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 cumbersome 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 and product quality of the production line. In addition, the integrated development environment IDE constructed in the embodiment of the present invention integrates the functions of PLC and robot arm control, grammar checking, operation monitoring, etc., realizes one-stop assembly program development and management, further improves development efficiency and ensures 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] The 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 the figure, the following steps are included. In the first step, key data such as geometric information, topological information and material properties are extracted from the three-dimensional model of the product, and the assembly process knowledge graph is constructed using the ontology method to define 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 to form a queryable and reasonable knowledge base; in the second step, the Louvain community detection algorithm is used to divide the assembly parts into subassemblies to reduce the complexity of the assembly sequence planning problem. Based on the subassembly division results and the priority relationship matrix, the optimal assembly sequence of the product is generated by topological sorting and other methods. Taking assembly efficiency as the optimization goal, optimization methods such as genetic algorithms are used to reasonably allocate assembly processes to various assembly units, and the positions of assembly units are adjusted to form an efficient assembly line layout; the third step is to formulate SWRL (Semantic Web Rule Language) rules and SPARQL query statements based on the entity relationships in the assembly process knowledge graph and the logical rules in the assembly process, and use semantic web tools such as Jena to infer the assembly process knowledge graph and generate A-code codes; the fourth step is to design 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 programs, and select typical products (such as shuttle valves, pressure reducing valves, etc.) for 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 according to the requirements of the assembly process, and its 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 for easy 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, providing functions such as code editor, syntax highlighting, code completion, and error prompts. Integrated debugging tools and monitoring functions 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 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] Robot arm motion control instructions: such as linear interpolation (mvs), circular interpolation (mov), etc., are used to control the movement path of the robot arm in three-dimensional space.
[0070] Fixture operation instructions: such as grasp, release, clamp clamp (cgrasp), clamp loosen (cloosen), etc., are used to realize the clamping and release of parts.
[0071] Tool switching instructions: such as unlock tool (unlockTool) and lock tool (lockTool), which 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 moves in a straight line to position p1 at a speed of 100% of the maximum speed.
[0075] Parameter definition: The type and range of the parameter must be clearly specified, such as position parameters (p1, p2, etc.) and speed parameters (50-100 represents speed percentage).
[0076] Execution order: The execution order of instructions is defined by 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. Through regular expressions or lexical analysis algorithms, it identifies 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 grammar 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 robot 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: Check the syntax errors in the code in real time and provide error prompts and correction suggestions.
[0088] Code completion: Automatically recommend available commands and parameters based on the context of input, reducing the amount of keyboard input.
[0089] Debugging tools: support breakpoint setting, single-step execution, variable monitoring and other functions, making it easier for 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 adopts an intuitive graphical interface design, including menu bar, toolbar, code editing area, debugging area, etc. Users can quickly access common functions through menu operations, quickly switch view modes through the toolbar, write and edit A-code programs through the code editing area, and monitor program execution status through the debugging area.
[0093] 4. A-codeIDE is 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 RFAL. During the system integration process, ensure that the data exchange and communication between modules are smooth and error-free.
[0096] Assembly test verification
[0097] Select typical products (such as shuttle valves, pressure reducing valves, etc.) for assembly experiments, and verify the effectiveness and performance of the A-code program by actually running it. During the experiment, record indicators such as assembly time, code length, and execution error rate, and analyze and optimize the experimental results.
[0098] 2. A-code automatic generation method
[0099] 1. Construction of assembly process knowledge graph
[0100] Mode layer modeling
[0101] First, according to the seven-step method of Stanford University, the ontology modeling of the assembly process is carried out. The ontology contains classes such as assembly process (process, step, assembly action), assembly object (assembly, subassembly, part), assembly resource (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. A quick-change male disc is installed at the end of the industrial robot, which can cooperate with the female disc on each assembly tool to realize the switching of tools. By reconfiguring these constructions, 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: The optimal assembly sequence of the product (assembly)
[0109] The Louvain community detection algorithm and other optimization algorithms are used to cluster the parts of the product to form subassemblies to reduce the complexity of assembly sequence planning. Based on the subassembly division results, the parts within each subassembly and between subassemblies are topologically sorted to determine a reasonable assembly sequence. The reference body is selected according to certain principles (such as many adjacency relationships, high stability, large mass / large volume, etc.), and the assembly sequence is further adjusted based on this to ensure the efficiency and stability of the 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 with the goal of minimizing the work cycle of the assembly line, while considering constraints such as the number of workstations, the number of parallel assembly units, and the priority rules of the assembly process. An improved genetic algorithm is used to encode the sequence of assembly processes and the allocation of assembly processes to assembly units. Through continuous iterative optimization such as crossover and mutation operations, the optimal process allocation scheme is found and the assembly process scheme of the product is generated. According to the process allocation results, the position and layout of the assembly unit are adjusted to ensure the efficient operation of the assembly line. At the same time, resources such as assembly tools and fixtures are reasonably allocated to improve the automation level 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. This 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 three-dimensional model of the product, the present invention eliminates the step of manually rewriting the assembly program according to product changes in traditional methods, significantly shortens the time for assembly line reconstruction, improves production line stability and product quality, and improves 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, wherein the processor executes a computer program and at least executes 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 ferromagnetic random access memory (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 disk memory or a 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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 present 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] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.
[0125] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function 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 can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a 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 contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope 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 the three-dimensional model of the product, wherein the key data includes geometric information, topological information and material properties; S2. Use the ontology method to construct the assembly process knowledge graph and define the assembly objects, assembly resources and assembly procedures and their relationships; S3, instantiate and store the extracted data according to the structure of the knowledge graph to form a queryable and inferable knowledge base; S4, using community detection algorithm to divide assembly parts into sub-assemblies 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. Taking assembly efficiency as the optimization goal, the assembly process is allocated to each assembly unit, and the position of the assembly unit is 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 codes for reconfigurable flexible assembly lines based on SWRL rules and SPARQL query statements.
2. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to claim 1, characterized in that: In step S8, the reconfigurable flexible assembly line-specific language code is generated according to the pre-designed instruction set and the pre-established grammar 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; The fixture operation command is 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, ensuring 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, characterized in that: 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 unlock tool and lock tool 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 achieve 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, parameter, operator through a regular expression or a lexical analysis algorithm, and pass it to a 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 syntax rules to intuitively display the syntax 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 4, 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 functions 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 to provide 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 5, characterized in that: Also includes: System integration: Integrate the interpreter and integrated development environment IDE used to interpret and execute the reconfigurable flexible assembly line special language code into the RFAL control system to ensure that the automatically generated reconfigurable flexible assembly line special language code program can be successfully executed on RFAL, and at the same time ensure that the 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-specific 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-specific 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 6, characterized in that: In step S2, the assembly process knowledge graph is constructed using the ontology method, which specifically includes pattern layer modeling and data layer construction; The modeling of the mode layer 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 API of the CAD software 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 recording the material properties and quality of the parts; the topological information uses the adjacency matrix and the priority relationship matrix to represent the assembly relationship between parts; Assembly resource information configuration describes the composition of the reconfigurable flexible assembly line, including the types, equipment and functions of assembly units, and their roles and relationships in the assembly process; the types of assembly units include general assembly units, transfer units and special assembly units, wherein 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 7, 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; Community detection algorithms are used to cluster product parts to form subassemblies, reducing the complexity of assembly sequence planning; Based on the division results of the subassemblies, topological sorting is performed on the parts within each subassembly and between subassemblies to determine the assembly order; Select the reference body according to the principle of more adjacencies, high stability, large mass or large volume, and further adjust the assembly sequence to ensure the efficiency and stability of the 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 work cycle 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. The method for automatically generating assembly language for a reconfigurable flexible assembly line according to any one of claims 1 to 8, characterized in that: 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: According to the assembly process, assembly steps and the mapping relationship between assembly objects, resources and programs defined in the assembly process ontology, a series of SWRL reasoning rules are formulated to describe the relationship between the 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, the assembly process scheme in the knowledge graph is queried and reasoned to extract assembly procedures, work steps, and related assembly objects and resource information; By traversing the assembly process, work steps, and related assembly objects and resources, the assembly actions and program segments corresponding to each process are automatically inferred, and a reconfigurable flexible assembly line-specific language code program that can be directly executed is generated; The generated reconfigurable flexible assembly line-specific language code program is output as an executable text file and provided to the integrated development environment IDE for actual operation and verification.
10. 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 as claimed in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Ontology-based assembly system knowledge base and construction method thereof
CN112800024A
Cited By
Electrical assembly process report generation method and system, and computer equipment
CN120198546A
Method and device for integrating G code in IEC 61131-3 programming system
CN121166093A
IEC 61131-3 Method and apparatus for integrating G-codes into programming systems
CN121166093B
