Parts assembly methods and electronic equipment
By determining the centroid coordinates of the base component and the insert in the consumer electronics field for simulated assembly and adjusting the pose of the insert contour, the problem of uneven contour gap during the assembly of HSG and nameplate parts was solved, thus improving assembly accuracy and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONGFUJIN PRECISION ELECTRONICS ZHENGZHOU
- Filing Date
- 2026-01-19
- Publication Date
- 2026-06-02
AI Technical Summary
In the consumer electronics field, uneven contour gaps are prone to occur during the assembly process of HSG and nameplate parts, resulting in substandard product assembly accuracy, reduced production yield, increased rework and debugging time, and impact on overall production efficiency.
By determining the centroid coordinates of the base component and the insert, a simulated assembly is performed. The pose of the insert contour is adjusted based on a preset adjustment strategy so that the relative position between the base contour and the insert contour meets the preset conditions. The assembly operation is controlled to achieve uniform contour gaps.
It improved product assembly accuracy and production yield, reduced rework and debugging time, and enhanced overall production efficiency.
Smart Images

Figure CN122125451A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of manufacturing and processing technology, and in particular to a parts assembly method and an electronic device. Background Technology
[0002] In the precision manufacturing of consumer electronics (such as smartphones, tablets, and wearable devices), high-precision assembly of housings (HSGs) and nameplate parts (such as logo parts) is required. However, during the assembly of HSGs and nameplate parts, uneven contour gaps can easily occur, resulting in substandard product assembly accuracy, reduced production yield, increased rework and debugging time, and ultimately affecting overall production efficiency. Summary of the Invention
[0003] In view of this, this application provides a parts assembly method and an electronic device to solve the problem that the parts assembly method affects the overall production efficiency.
[0004] A first aspect of this application provides a part assembly method, the part assembly method comprising: determining a base contour in a base component and an insert contour of an insert component; determining, based on a preset coordinate system, the base centroid coordinates corresponding to the centroid of the base contour and the insert centroid coordinates corresponding to the centroid of the insert contour; performing simulated assembly of the insert component and the base component based on the base centroid coordinates and the insert centroid coordinates; adjusting the pose of the insert contour based on a preset adjustment strategy until the relative position between the base contour and the insert contour meets a preset condition, and determining the base pose information of the base contour and the insert pose information of the insert contour; and controlling the assembly operation of the base component and the insert component according to the base pose information and the insert pose information, so that the insert component is assembled to the base component.
[0005] In some embodiments, after simulating the assembly of the insert and the base component based on the coordinates of the base centroid and the coordinates of the insert centroid, the method further includes: calculating the standard deviation of the gap between the contour gap of the base contour and the insert contour.
[0006] In some embodiments, adjusting the pose of the insert contour based on a preset adjustment strategy until the relative position between the base contour and the insert contour meets a preset condition includes: rotating the insert contour according to a preset angle, determining a first target position of the insert contour relative to the base contour when the gap standard deviation is minimized during the rotation and an angle adjustment parameter of the insert contour; controlling the insert contour to rotate to the first target position according to the angle adjustment parameter, and translating the insert contour according to a preset distance, determining a second target position of the insert contour relative to the base contour when the gap standard deviation is minimized during the translation and a distance adjustment parameter of the insert contour; and when the insert contour is controlled to translate to the second target position according to the distance adjustment parameter, the relative position between the base contour and the insert contour meets the preset condition.
[0007] In some embodiments, the method further includes: during the process of the insert profile continuously rotating in any direction for a first preset number of times from the first target position, the standard deviation of the gap increases after each rotation operation, and each rotation of the insert profile by the preset angle is recorded as one rotation.
[0008] In some embodiments, the method further includes: during the process of the insert contour being continuously translated a second preset number of times in any translation direction from the second target position, the standard deviation of the gap increases after each translation operation, and each translation of the insert contour by the preset distance is recorded as one translation.
[0009] In some embodiments, calculating the standard deviation of the gap between the base profile and the insert profile includes: determining a plurality of feature regions from a virtual assembly model after simulated assembly, each feature region corresponding to a plurality of profile gaps; calculating a first average gap for each feature region based on the plurality of profile gaps corresponding to each feature region, and calculating a second average gap for the plurality of feature regions; and calculating the standard deviation of the gap based on the first average gap and the second average gap.
[0010] In some embodiments, determining the base contour in the base component and the insert contour of the insert component includes: acquiring a base contour image of the base contour and an insert contour image of the insert contour; and extracting the base contour from the base contour image and the insert contour from the insert contour image based on a preset extraction algorithm.
[0011] In some embodiments, the method further includes: determining a base sub-profile in the base profile and determining an insert sub-profile in the insert profile; determining the base centroid coordinates based on the sub-centroid coordinates of the centroid of the base sub-profile in the preset coordinate system; and determining the insert centroid coordinates based on the sub-centroid coordinates of the centroid of the insert sub-profile in the preset coordinate system.
[0012] In some embodiments, the method further includes: constructing the preset coordinate system based on a first relative position information between the base component and the preset assembly position and a second relative position information between the insert component and the preset assembly position.
[0013] A second aspect of this application provides an electronic device including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor executes the computer-readable instructions to implement the above-described part assembly method.
[0014] A third aspect of this application provides a computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the above-described part assembly method.
[0015] In the part assembly method provided in this application embodiment, before controlling the assembly operation of the base part and the insert part, the insert part and the base part are simulated for assembly based on the base contour of the base part and the insert contour of the insert part, and the pose adjustment (correction) of the insert contour is performed based on a preset adjustment strategy, thereby determining the base pose information of the base contour and the insert pose information of the insert contour based on the actual assembly operation. This method helps to detect and correct assembly defects (such as uneven contour gaps) that may occur during the assembly of the insert part and the base part due to gripping deviations, thereby improving product assembly accuracy and production yield, reducing rework and debugging time, and ultimately improving overall production efficiency. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a structural diagram of the equipment for the parts assembly method provided in the embodiments of this application.
[0018] Figure 2 This is a flowchart illustrating the implementation of the parts assembly method provided in the embodiments of this application.
[0019] Figure 3 This is an example diagram of the base component provided in the embodiments of this application.
[0020] Figure 4 This is an example diagram of the base contour and insert contour provided in the embodiments of this application.
[0021] Figure 5 This is an example diagram of the virtual assembly model provided in the first embodiment of this application.
[0022] Figure 6 This is a flowchart illustrating the implementation of the adjustment method provided in the embodiments of this application.
[0023] Figure 7 This is an example diagram of the virtual assembly model provided in the second embodiment of this application.
[0024] Figure 8 This is an example diagram of the virtual assembly model provided in the third embodiment of this application.
[0025] Figure 9 This is a schematic diagram of the structure of the parts assembly device provided in the embodiments of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" refers to one or more. "More than one" refers to two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c (seven cases).
[0029] Please see Figure 1 The diagram shown is a structural diagram of the device for the parts assembly method provided in this application embodiment. This method is applied to electronic device 100, and the network where electronic device 100 is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, and virtual private network (VPN).
[0030] like Figure 1 As shown, the electronic device 100 includes a communication module 101, a memory 102, a processor 103, an input / output interface 104, and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102, and the input / output interface 104 via the bus 105.
[0031] The communication module 101 can be a wireless communication module or a mobile communication module. The wireless communication module can provide solutions for wireless communication applications on the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR) technologies. The mobile communication module can provide solutions for wireless communication applications on the electronic device 100, including 2G / 3G / 4G / 5G technologies. Memory 102 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 103 and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, such as fifth-generation DDR SDRAM, generally referred to as DDR5 SDRAM), etc. Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 103. Non-volatile memory can include disk storage devices and flash memory. The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions that, when executed by the processor 103, enable a part assembly method to be performed on the electronic device 100. In other embodiments, the electronic device 100 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 100. Processor 103 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors. The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute computer programs stored in the memory 102 to implement the above-described part assembly method. The input / output interface 104 is used to provide a channel for user input or output. For example, the input / output interface 104 can be used to connect various input / output devices, such as a mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information. Bus 105 is used at least to provide a channel for communication between communication modules 101, memory 102, processor 103, and input / output interface 104 in electronic device 100. It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0032] In some embodiments, the electronic device may be one or more of a computer device, a computer, an industrial computer, a control device in a parts assembly system, etc. This application does not limit the specific type of electronic device.
[0033] Figure 1 The scenarios shown are merely illustrative examples, and the parts assembly method provided in this application can also be applied to other scenarios. For example, in some scenarios, it may include an electronic device 100, a fixture, a gripping structure (e.g., a robotic arm), an insert, and a base component; in other scenarios, it may also include other types of equipment. The embodiments of this application do not limit the specific application scenarios of the parts assembly method.
[0034] In this embodiment, the component assembly method can be applied to an electronic device, or the component assembly function provided by the method of this application can be directly integrated into the electronic device, or the component assembly method provided by this application can run in the electronic device in the form of a software development kit (SDK).
[0035] Please see Figure 2 The diagram shown is a flowchart illustrating the implementation of the part assembly method provided in this application embodiment. This method is applied to electronic devices, and this application embodiment uses this method in… Figure 1 The method will be illustrated using electronic device 100 as an example. The method includes the following steps.
[0036] S11: Determine the base profile in the base component and the insert profile in the insert component.
[0037] In some embodiments, the base component represents a part that serves as a reference and primary load-bearing structure during assembly. The base component has fitting structures or assembly features (e.g., locating grooves, mounting surfaces, or precision cavities) for assembling inserts, such as... Figure 3 As shown. The contour of the interlocking structure or assembly feature is the contour of the base component. The area enclosed by the base contour provides positioning and accommodating space for the insert.
[0038] In some embodiments, the insert profile represents the boundary profile of the insert. Inserts include, but are not limited to, irregularly shaped parts. The insert profile mates with the base profile.
[0039] As an example, the base component can be the housing (HSG) of electronic products such as tablets, smartphones, and wearable devices, and the insert can be an irregular or irregularly shaped logo part that needs to be assembled into the HSG.
[0040] In some embodiments of this application, determining the base contour of the base component and the insert contour of the insert component includes: acquiring a base contour image of the base contour and an insert contour image of the insert contour; and extracting the base contour from the base contour image and the insert contour from the insert contour image based on a preset extraction algorithm.
[0041] In some embodiments, the preset extraction algorithm includes, but is not limited to, one or more of contour edge extraction algorithms, Hough transform and deep learning algorithms.
[0042] In some embodiments, during the assembly of the insert to the base component, the base component is typically placed on a carrier or fixture as an assembly reference, while the insert is grasped and suspended in a dynamic position to be assembled by a gripping structure, such as a robotic end effector (e.g., a clamp). To ensure the simulation accuracy of the subsequent virtual assembly, thereby improving the accuracy of the actual part assembly, the electronic device can acquire images of the base component contour and the insert contour in the actual gripping state. Specifically, after the robotic arm grasps the insert but before performing the assembly action, the electronic device can acquire images of the base component contour and the insert contour using a vision device such as a camera.
[0043] In some embodiments, to further improve the simulation accuracy of virtual assembly and thus the accuracy of subsequent part assembly, after acquiring the base contour image and the insert contour image, the electronic device can perform preprocessing operations on the base contour image and the insert contour image to ensure image accuracy. The preprocessing operations include, but are not limited to, one or more of image denoising, illumination normalization, and background segmentation. In other embodiments, the preprocessing operations may also include other types of operations. This application does not limit the specific content of the preprocessing operations. The electronic device extracts the base contour from the preprocessed base contour image and the insert contour from the preprocessed insert contour image based on a preset extraction algorithm.
[0044] In the process of extracting the base contour from the base contour image and the insert contour from the insert contour image, the electronic device can use edge extraction algorithms (such as the Canny edge detection algorithm) to obtain the intensity abrupt change regions in the base contour image and insert contour image as edge detection results. The electronic device uses Hough transform to enhance the recognition of regular geometric features (such as lines and circles) in the edge detection results to complete the structured corresponding contour boundaries. At the same time, the electronic device can use a trained deep learning model (such as a semantic segmentation network) to classify and predict the contours of part regions (such as the region where the insert is located, and the region corresponding to the interlocking structure in the base part). The electronic device complementarily integrates traditional geometric methods with deep learning output to obtain complete, accurate, and semantically informative two-dimensional contour data (base contour and insert contour), providing reliable and accurate input for subsequent contour matching and precision assembly.
[0045] S12: Based on the preset coordinate system, determine the coordinates of the centroid of the base body corresponding to the centroid of the base body contour and the coordinates of the centroid of the insert corresponding to the centroid of the insert contour.
[0046] In some embodiments, the matrix centroid coordinates represent the corresponding coordinates of the centroid of the matrix profile in a preset coordinate system. The insert centroid coordinates represent the corresponding coordinates of the centroid of the insert profile in a preset coordinate system.
[0047] In some embodiments of this application, a preset coordinate system is constructed based on the first relative position information between the base component and the preset assembly position and the second relative position information between the insert component and the preset assembly position.
[0048] In some embodiments, the preset assembly position can be the position of a carrier or fixture for placing the base component.
[0049] In some embodiments, the electronic device can determine the coordinate directions of the origin, X-axis, Y-axis and Z-axis based on the first relative position information between the base component and the preset assembly position and the second relative position information between the insert component and the preset assembly position, thereby constructing a preset coordinate system.
[0050] In some embodiments of this application, a base sub-profile in the base profile and an insert sub-profile in the insert profile are determined; the base centroid coordinates are determined based on the sub-centroid coordinates of the centroid of the base sub-profile in a preset coordinate system; and the insert centroid coordinates are determined based on the sub-centroid coordinates of the centroid of the insert sub-profile in the preset coordinate system.
[0051] In some embodiments, the interlocking structure between the insert and the base component may comprise multiple substructures, such as Figure 3 The interlocking structure in the base component shown includes upper and lower substructures. Therefore, to ensure simulation accuracy during the initial simulated assembly of the insert and base component, in the process of determining the base centroid coordinates corresponding to the base contour and the insert centroid coordinates of the insert contour, the electronic device can determine the base sub-contour within the base contour and the insert sub-contour within the insert contour, and determine the sub-centroid coordinates of the centroids of the base sub-contours and the insert sub-contours in a preset coordinate system. The electronic device determines the base centroid coordinates based on the sub-centroid coordinates of the base sub-contours in the preset coordinate system, and determines the insert centroid coordinates based on the sub-centroid coordinates of the insert sub-contours in the preset coordinate system.
[0052] In some embodiments, if the matrix profile comprises two matrix sub-profiles, the electronic device can determine the center coordinates of the line connecting the corresponding two sub-centroid coordinates as the matrix centroid coordinates of the matrix profile. For example Figure 4 As shown, points a and b are the centroids of two base sub-profiles of the base profile, respectively, and c is the center of the line connecting points a and b. Based on the coordinates of points a and b, the electronic device can determine the coordinates of point c, thereby determining the coordinates of the base centroid of the base profile.
[0053] In some embodiments, if the base profile includes three or more base sub-profiles and the centroids of the three or more base sub-profiles are not collinear, the electronic device can determine the pattern enclosed by the centroids of the three or more base sub-profiles, determine the centroid of the pattern as the centroid of the base profile, and then determine the coordinates of the base centroid.
[0054] Similarly, if an insert profile contains two insert sub-profiles, the electronic device can determine the center coordinates of the line connecting the corresponding two sub-centroid coordinates as the insert centroid coordinates of the insert profile. For example... Figure 4 As shown, points a' and b' are the centroids of two sub-profiles of the insert profile, respectively, and c' is the center of the line connecting points a' and b'. Based on the coordinates of points a' and b', the electronic device can determine the coordinates of point c', thereby determining the centroid coordinates of the insert profile.
[0055] If the insert profile contains three or more insert sub-profiles, and the centroids of the three or more insert sub-profiles are not collinear, the electronic device can determine the shape enclosed by the centroids of the three or more insert sub-profiles, determine the centroid of the shape as the centroid of the insert profile, and then determine the centroid coordinates of the insert.
[0056] S13: Simulate the assembly of the insert and the base component based on the coordinates of the base centroid and the insert centroid.
[0057] In some embodiments, the electronic device simulates the assembly process of the insert and the base component by aligning and assembling the base contour in the base component with the insert contour of the insert component.
[0058] In some embodiments, the electronic device can align the centroids of the base contour and the insert contour based on the centroid coordinates of the base and the insert, thereby achieving alignment and assembly of the base contour and the insert contour. As an example, such as... Figure 4 As shown, by aligning point c with point c', the alignment and assembly of the base contour and the insert contour can be achieved. The virtual assembly model obtained after assembly is as follows. Figure 5 As shown.
[0059] This application embodiment obtains the actual grasping state of the base contour and the insert contour, and aligns and assembles the base contour in the base component with the insert contour of the insert component, simulating the assembly process of the insert component and the base component. It can adjust the pose of the base contour and the insert contour in advance during the simulated assembly process to make the contour gap between the base contour and the insert contour uniform and meet the generation requirements. This provides accurate pose adjustment parameters for subsequent control of the actual assembly of the insert component and the base component, thereby ensuring that the contour gap between the base contour and the insert contour is uniform, ensuring the matching accuracy of the base component and the insert in terms of shape contour, avoiding assembly defects that lead to reduced production yield, saving costs and rework and debugging time, improving assembly efficiency, and thus improving overall production efficiency.
[0060] S14: Based on the preset adjustment strategy, adjust the pose of the insert contour until the relative position between the base contour and the insert contour meets the preset conditions, and determine the base pose information of the base contour and the insert pose information of the insert contour.
[0061] In some embodiments, the preset adjustment strategy represents a set of rules for adjusting the pose of the insert profile so that the relative position between the base profile and the insert profile satisfies preset conditions.
[0062] In some embodiments, when the relative position between the base profile and the insert profile meets a preset condition, the profile gap between the base profile and the insert profile is uniform, which can meet the preset production requirements (e.g., the profile gap must be uniform).
[0063] In some embodiments, the substrate pose information includes, but is not limited to, the position information and angle information of the substrate contour. The insert pose information includes, but is not limited to, the angle of the insert contour and the grasping parameters during the grasping process of the corresponding insert. This application embodiment does not limit the specific content of the substrate pose information and the insert pose information.
[0064] In some embodiments, during the assembly of the insert to the base component, the gripping structure (e.g., a robotic arm) may exhibit slight angular deviations in the clamps, the insert's own orientation may have tolerances, or the gripping force may cause slight deformation of the insert. All of these factors can lead to the insert exhibiting a non-ideal orientation after being gripped (e.g., a slight rotation around its normal axis). If subsequent assembly positioning directly relies on centroid alignment or preset gripping points to assemble the base component and insert, their actual contours (base contour and insert contour) will be in a state of relative rotation. After assembly, this will result in uneven contour gaps, with one side having an excessively tight gap and the other side having an excessively loose gap, leading to defective products. For example... Figure 5 The virtual assembly model shown initially aligns and assembles the base contour and the insert contour, but uneven gaps appear between the base contour and the insert contour.
[0065] To avoid increased defect rates due to uneven contour gaps during actual assembly, this embodiment of the application, in a simulated assembly scenario, after acquiring a virtual assembly model, adjusts the pose of the insert contour based on a preset adjustment strategy until the contour gap between the base contour and the insert contour is uniform, or in other words, the relative positions between the base contour and the insert contour meet preset conditions. In this case, the electronic device acquires the base pose information of the base contour and the insert pose information of the insert contour in the current state, providing pose data reference for the subsequent actual assembly of the base component and the insert, ensuring uniform contour gaps between the assembled base component and the insert, reducing the defect rate, and thus improving production efficiency.
[0066] In some embodiments, the insert pose information may include information such as grasping parameters during the grasping process of the corresponding insert. By adjusting the pose of the insert contour based on a preset adjustment strategy, the insert pose information is optimized, and the grasping-assembly integrated data is finally determined, which helps to improve the first-time assembly success rate and thus improve assembly efficiency.
[0067] In other embodiments, when the relative position between the base contour and the insert contour meets preset conditions, the electronic device can also obtain the pose adjustment information of the insert contour, so as to provide parameter adjustment basis for the pose adjustment of the insert during the subsequent assembly of the corresponding base component and insert, which facilitates the rapid realization of the pose adjustment of the insert and thus helps to improve assembly efficiency.
[0068] In other embodiments, the base component is typically fixedly placed on a carrier or fixture. In this case, the base pose information corresponding to the base component can be predetermined. Then, if the relative position of the base contour and the insert contour meets the preset conditions, the electronic device can acquire only the insert pose information.
[0069] In some embodiments of this application, during the process of adjusting the pose of the insert profile based on a preset adjustment strategy, the electronic device can calculate the standard deviation of the gap between the base profile and the insert profile, and adjust the pose of the insert profile based on the standard deviation of the gap.
[0070] In some embodiments of this application, calculating the standard deviation of the gap between the base contour and the insert contour includes: determining multiple feature regions from the virtual assembly model after simulated assembly, each feature region corresponding to multiple contour gaps; calculating a first average gap for each feature region based on the multiple contour gaps corresponding to each feature region, and calculating a second average gap for the multiple feature regions; and calculating the standard deviation of the gap based on the first average gap and the second average gap.
[0071] In some embodiments, the feature region represents a pre-defined area for quickly matching and locating key feature points (e.g., corner points, edge centers) of parts (base components and inserts). For example, an electronic device can determine the MTD point area as the feature region based on a Modeling Template based on key points (MTD) method. In other embodiments, the feature region can also be customized, and the present application embodiments do not limit the number or determination method of the feature region.
[0072] In some embodiments, each feature region corresponds to multiple contour gaps. A contour gap represents the length of the gap between the substrate contour and the insert contour. For each feature region, the electronic device can randomly or uniformly select multiple contour gaps within that feature region. The number of contour gaps corresponding to each feature region can be customized; for example, each feature region can correspond to 40, 50, or 60 contour gaps. This application embodiment does not limit the specific method of selecting contour gaps or the number of contour gaps corresponding to each feature region.
[0073] As an example, such as Figure 5 As shown, the electronic device determines 12 feature regions (P1 to P12) from the virtual assembly model, each feature region corresponding to N contour gaps, such as... Figure 5 The enlarged view of region P10 shown corresponds to N contour gaps. N is an integer greater than 0, and its specific value can be customized; for example, N can be 50, 60, etc.
[0074] In the process of calculating the standard deviation of the gap between the substrate profile and the insert profile, the electronic device can calculate the first average gap of each feature region and the second average gap of all feature regions (or calculate the average of all profile gaps), and calculate the gap standard deviation based on the first average gap and the second average gap.
[0075] Taking the determination of e feature regions from a virtual assembly model, with each feature region corresponding to f contour gaps, as an example, electronic devices can use the formula... According to the formula Calculate the second average gap. After calculating the first average gap for each feature region and the second average gap for all feature regions, the electronic device can proceed according to the formula... Calculate the standard deviation of the gap.
[0076] In the formula, Indicates the first The first average gap of each characteristic region Take an integer greater than zero and less than or equal to e; Indicates the first The first feature region A contour gap, Take an integer greater than zero and less than or equal to f; Indicates the second average gap; This represents all the contour gaps of e feature regions; Indicates the first of all contour gaps A contour gap, Take values greater than zero and less than zero. The integer value of ; This represents the standard deviation of the gap.
[0077] In other embodiments, to ensure the accuracy of the determined insert pose information and collective pose information, the electronic device can perform multiple simulated assembly processes, and determine the base pose information of the base contour and the insert pose information of the insert contour when the relative position between the base contour and the insert contour meets preset conditions during each simulated assembly process. Based on the determined multiple base pose information and multiple insert pose information, the electronic device determines the base pose information and insert pose information used for actual assembly.
[0078] This application embodiment calculates the standard deviation of the gap between the base contour and the insert contour, and adjusts the pose of the insert contour based on the gap standard deviation, so that the relative position between the base contour and the insert contour meets the preset conditions. This helps to quickly and accurately determine the actual assembly base pose information and insert pose information, thereby improving the assembly success rate and assembly efficiency.
[0079] In some embodiments of this application, such as Figure 6 As shown, based on a preset adjustment strategy, the pose of the insert contour is adjusted until the relative position between the base contour and the insert contour meets the preset conditions, including the following steps.
[0080] S21: Rotate the insert profile according to the preset angle, and determine the first target position of the insert profile relative to the base profile and the angle adjustment parameters of the insert profile when the gap standard deviation is minimized during the rotation process.
[0081] In some embodiments, the preset angle can be customized. For example, the preset angle can be set to 0.03°, 0.04°, etc. This application does not limit the specific setting of the preset angle.
[0082] In some embodiments, the first target position can be represented or determined by the vertex coordinates, central axis, etc. of the insert contour. The present application embodiments do not limit the representation of the first target position.
[0083] In some embodiments, the angle adjustment parameters include, but are not limited to, the magnitude of the rotation angle and the direction of rotation. This application does not limit the specific settings of the angle adjustment parameters.
[0084] In some embodiments, a smaller standard deviation of the gap indicates a more uniform gap between the base profile and the insert profile. During the process of gripping the insert and assembling it onto the base component, the gripping structure (e.g., a robotic arm) may experience slight deformation of the insert due to minute angular deviations in the grippers, manufacturing tolerances of the insert's posture, or gripping force. This may result in the insert exhibiting a non-ideal posture after being gripped (e.g., a slight rotation around its normal axis). If subsequent assembly positioning directly relies on centroid alignment or preset gripping points to assemble the base component and insert, their actual profiles (base profile and insert profile) will be in a state of relative rotation. After assembly, this will result in one side having an excessively tight gap and the other side having an excessively loose gap, i.e., uneven gap. For example... Figure 7 The virtual assembly model shown has a certain angle between the central axis m of the insert contour and the central axis n of the base contour after the insert contour and the base contour are simulated and aligned. The insert contour and the base contour are in a state of relative rotation. In order to ensure that the subsequent actual assembly is qualified or meets the production requirements, the electronic device can rotate the insert contour to correct the angle during the simulated assembly process and record the angle adjustment parameters (such as the size of the rotation angle, the rotation direction, etc.) so that the base contour and the insert contour are in a state of relative parallelism.
[0085] In some embodiments of this application, during the process of the insert profile continuously rotating in any direction for a first preset number of times from the first target position, the standard deviation of the gap increases after each rotation operation, and each rotation of the insert profile by a preset angle is recorded as one rotation.
[0086] In some embodiments, the first preset number of times can be customized, for example, the first preset number of times can be set to 2 times, 3 times, etc. By setting the first target position to be determined after multiple consecutive rotations, it helps to improve the adjustment accuracy and the accuracy of the first target position, thereby helping to improve the subsequent assembly accuracy.
[0087] In some embodiments, any direction includes, but is not limited to, clockwise and counterclockwise directions.
[0088] Taking a preset rotation count of two times, a preset angle of 0.03°, and controlling the insert profile to rotate clockwise from its initial position before the rotation operation as an example, if the gap standard deviation increases after the insert profile rotates clockwise by 0.03°, the electronic device can control the insert profile to continue rotating clockwise by 0.03°. If the gap standard deviation still increases after the second rotation, the electronic device can control the insert profile to return (or rotate) to the initial position, and control the insert profile to rotate counterclockwise by 0.03°. If the gap standard deviation increases after the insert profile rotates counterclockwise by 0.03°, the electronic device can control the insert profile to continue rotating counterclockwise by 0.03°. If the gap standard deviation still increases after the second counterclockwise rotation, the electronic device can determine that the gap standard deviation is minimized when the insert profile is at its initial position, and then the electronic device determines the initial position as the first target position.
[0089] If the gap standard deviation decreases after the insert profile rotates 0.03° clockwise from its initial position, the electronic device can control the insert profile to continue rotating 0.03° clockwise. If the gap standard deviation still decreases after the second rotation, the electronic device can continue to control the insert profile to rotate clockwise until it reaches a certain position. If the gap standard deviation increases during the first preset number of consecutive clockwise rotations from that position, the electronic device can determine that position as the first target position.
[0090] S22: Control the insert profile to rotate to the first target position, and translate the insert profile according to the preset distance, determine the second target position of the insert profile relative to the base profile when the gap standard deviation is minimized during the translation process, and the distance adjustment parameters of the insert profile.
[0091] In some embodiments, the preset distance can be customized. For example, the preset distance can be set to 0.03 or 0.04 pixels. This application does not limit the specific setting of the preset distance.
[0092] In some embodiments, the second target position can be represented or determined by the vertex coordinates, central axis, etc. of the insert contour. The present application embodiments do not limit the representation of the second target position.
[0093] In some embodiments, the distance adjustment parameters include, but are not limited to, the magnitude of the translation distance and the translation direction. This application does not limit the specific settings of the distance adjustment parameters.
[0094] In some embodiments, the electronic device can translate the insert profile along any translation direction at a preset distance. Any translation direction includes, but is not limited to, the up, down, left, and right directions.
[0095] For example Figure 8In the virtual assembly model shown, after adjusting the angle of the insert contour, there may still be a distance between the central axis m of the insert contour and the central axis n of the base contour. In other words, there may still be an uneven contour gap between the insert contour and the base contour, where the gap on one side is too tight and the gap on the other side is too loose. In order to ensure that the subsequent actual assembly is qualified or meets the production requirements, the electronic device can translate the insert contour during the simulated assembly process and record the distance adjustment parameters (such as the magnitude of the translation distance, the translation direction, etc.) during the translation process, so that the contour gap between the base contour and the insert contour is uniform.
[0096] In some embodiments of this application, during the process of continuously translating the insert profile from the second target position along any translation direction for a second preset number of times, the standard deviation of the gap increases after each translation operation, and each preset distance of translation of the insert profile is recorded as one translation.
[0097] In some embodiments, the second preset number of times can be customized, for example, the second preset number of times can be set to 2 times, 3 times, etc. By setting the second target position to be determined after multiple consecutive translations, it helps to improve the adjustment accuracy and the accuracy of the second target position, thereby helping to improve the subsequent assembly accuracy.
[0098] In some embodiments, any translation direction includes, but is not limited to, the up, down, left, and right directions.
[0099] Taking a second preset number of times (twice), a preset distance of 0.03 pixels, and controlling the insert contour to first translate to the right from the first target position as an example, if the gap standard deviation increases after the insert contour translates to the right by 0.03 pixels, the electronic device can control the insert contour to continue translating to the right by 0.03 pixels. If the gap standard deviation still increases after the second translation, the electronic device can control the insert contour to return (or translate) to the first target position, and control the insert contour to translate to the left by 0.03 pixels. If the gap standard deviation increases after the insert contour translates counterclockwise by 0.03 pixels, the electronic device can control the insert contour to continue translating to the left by 0.03 pixels. If the gap standard deviation still increases after the second leftward translation, the electronic device can determine that the gap standard deviation is smallest when the insert contour is at the first target position, and then the electronic device determines the first target position as the second target position.
[0100] If the gap standard deviation decreases after the insert contour is translated 0.03 pixels to the right from the first target position, the electronic device can continue to control the insert contour to translate to the right until it is translated to a certain position. When the gap standard deviation increases during the process of the insert contour being translated to the right continuously for a second preset number of times from that position, the electronic device can determine that position as the second target position.
[0101] In some embodiments, translation in the up and down directions is similar to translation in the left and right directions, and will not be described again here.
[0102] S23: When the insert profile is translated to the second target position, the relative position between the base profile and the insert profile satisfies the preset conditions.
[0103] S15: Based on the base pose information and the insert pose information, control the assembly operation of the base part and the insert part so that the insert part is assembled into the base part.
[0104] In some embodiments, after the electronic device acquires the substrate pose information and the insert pose information, it can determine the adjustment parameters of the corresponding gripping parameters of the insert based on the insert pose information, and / or determine the pose of the substrate based on the substrate pose information, thereby adjusting the corresponding mechanical structure, such as the gripping parameters of the robot arm, during the assembly process of the substrate and the insert, so that the insert is assembled to the substrate.
[0105] In other embodiments, the insert pose information may further include angle adjustment parameters and distance adjustment parameters of the insert contour when the relative position between the base contour and the insert contour meets preset conditions. The electronic device acquires the angle adjustment parameters and distance adjustment parameters of the insert contour when the relative position between the base contour and the insert contour meets preset conditions. Based on the angle adjustment parameters and distance adjustment parameters, it adjusts the grasping parameters during the insert grasping process, thereby controlling the assembly operation of the base component and the insert. This ensures that after the insert is assembled to the base component, the contour gap between the insert contour of the insert and the base contour of the base component is uniform, meeting assembly tolerance requirements and ensuring product quality.
[0106] This application embodiment uses the base contour and insert contour under the actual grasping posture as input for simulated assembly, realizing full-process virtual verification from grasping to assembly. This helps to improve the accuracy of virtual assembly simulation, can detect assembly risks caused by grasping deviations in advance, provides data support for subsequent actual assembly, facilitates the improvement of the stability of contour gaps after assembly and the adaptability to complex working conditions, reduces equipment wear and saves assembly time and costs, improves assembly accuracy and assembly success rate, thereby reducing the rejection rate of defective products (Not Good, NG) and increasing production capacity.
[0107] In the part assembly method provided in this application embodiment, before controlling the assembly operation of the base part and the insert part, the insert part and the base part are simulated for assembly based on the base contour of the base part and the insertion contour of the insert part, and the pose of the insert contour is adjusted (to correct deviation) based on a preset adjustment strategy, thereby determining the base pose information of the base contour and the insert pose information of the insert contour based on the actual assembly operation. This method helps to detect and correct assembly defects (such as uneven contour gaps) that may occur during the assembly of the insert part and the base part due to gripping deviations, thereby improving product assembly accuracy and production yield, reducing rework and debugging time, and ultimately improving overall production efficiency.
[0108] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0109] Please see Figure 9 , Figure 9 The diagram shown is a structural diagram of a parts assembly apparatus provided in an embodiment of this application. It can realize the details of the parts assembly method described above and achieve the same effect. For example... Figure 9 As shown, the part assembly device 10 can be applied to electronic devices with data processing functions. The part assembly device 10 includes: a determination module 11, used to determine the base contour of the base component and the insert contour of the insert component; the determination module 11 is also used to determine the base centroid coordinates corresponding to the centroid of the base contour and the insert centroid coordinates corresponding to the centroid of the insert contour based on a preset coordinate system; a simulation module 12, used to simulate the assembly of the insert component and the base component based on the base centroid coordinates and the insert centroid coordinates; an adjustment module 13, used to adjust the pose of the insert contour based on a preset adjustment strategy until the relative position between the base contour and the insert contour meets the preset conditions, and to determine the base pose information of the base contour and the insert pose information of the insert contour; and a control module 14, used to control the assembly operation of the base component and the insert component according to the base pose information and the insert pose information, so that the insert component is assembled into the base component.
[0110] Specific limitations regarding the parts assembly device 10 can be found in the limitations regarding the parts assembly method described above, and will not be repeated here. Each module in the parts assembly device 10 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the electronic device, or stored in the memory of the electronic device as software, so that the processor can call and execute the operations corresponding to each module.
[0111] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to the part assembly method in the above embodiments of this application. The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device.
[0112] Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application program required for a function, etc.; and the data storage area may store data created based on the use of the electronic device, etc.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A method for assembling parts, characterized in that, The component assembly method includes: Determine the base profile in the base component and the insert profile in the insert component; Based on a preset coordinate system, determine the coordinates of the centroid of the base body corresponding to the centroid of the base body contour and the coordinates of the centroid of the insert corresponding to the centroid of the insert contour. Based on the coordinates of the centroid of the base and the centroid of the insert, the embedding and the base are simulated for assembly. Based on a preset adjustment strategy, the pose of the insert contour is adjusted until the relative position between the base contour and the insert contour meets the preset conditions, and the base pose information of the base contour and the insert pose information of the insert contour are determined. Based on the substrate pose information and the insert pose information, the assembly operation of the substrate and the insert is controlled so that the insert is assembled to the substrate.
2. The part assembly method as described in claim 1, characterized in that, After simulating the assembly of the insert and the base component based on the coordinates of the base centroid and the coordinates of the insert centroid, the method further includes: Calculate the standard deviation of the gap between the base profile and the insert profile.
3. The part assembly method as described in claim 2, characterized in that, The step of adjusting the pose of the insert contour based on a preset adjustment strategy until the relative position between the base contour and the insert contour meets a preset condition includes: The insert profile is rotated according to a preset angle to determine the first target position of the insert profile relative to the base profile when the gap standard deviation is minimized during the rotation process, as well as the angle adjustment parameters of the insert profile. The insert profile is rotated to the first target position according to the angle adjustment parameters, and the insert profile is translated according to the preset distance. The second target position of the insert profile relative to the base profile and the distance adjustment parameters of the insert profile are determined when the gap standard deviation is minimized during the translation process. When the insert contour is translated to the second target position according to the distance adjustment parameter, the relative position between the base contour and the insert contour satisfies the preset condition.
4. The part assembly method as described in claim 3, characterized in that, The method further includes: during the process of the insert contour continuously rotating in any direction for a first preset number of times from the first target position, the standard deviation of the gap increases after each rotation operation, and each rotation of the insert contour by the preset angle is recorded as one rotation.
5. The part assembly method as described in claim 3, characterized in that, The method further includes: during the process of continuously translating the insert contour from the second target position along any translation direction for a second preset number of times, the standard deviation of the gap after each translation operation increases, and each translation of the insert contour by the preset distance is recorded as one translation.
6. The part assembly method as described in claim 2, characterized in that, The calculation of the standard deviation of the gap between the base profile and the insert profile includes: Multiple feature regions are determined from the virtual assembly model after the simulated assembly, and each feature region corresponds to multiple contour gaps; Based on the plurality of contour gaps corresponding to each feature region, calculate the first average gap of each feature region and calculate the second average gap of the plurality of feature regions; The standard deviation of the gap is calculated based on the first average gap and the second average gap.
7. The part assembly method as described in claim 1, characterized in that, Determining the base contour in the base component and the insert contour in the insert component includes: Obtain the base contour image of the base contour and the insert contour image of the insert contour; Based on a preset extraction algorithm, the base contour is extracted from the base contour image and the insert contour is extracted from the insert contour image.
8. The part assembly method as described in claim 1, characterized in that, The method further includes: Determine the base sub-profile in the base profile and determine the insert sub-profile in the insert profile; The coordinates of the base centroid are determined based on the centroid coordinates of the base sub-profile in the preset coordinate system. The centroid coordinates of the insert are determined based on the centroid coordinates of the sub-centroid in the preset coordinate system.
9. The part assembly method as described in claim 1, characterized in that, The method further includes: The preset coordinate system is constructed based on the first relative position information between the base component and the preset assembly position and the second relative position information between the insert component and the preset assembly position.
10. An electronic device, characterized in that, It includes a memory, a processor, and computer-readable instructions stored in the memory, which, when executed by the processor, implement the part assembly method as described in any one of claims 1 to 9.