On-off key installation method and device
By inspecting the integrity of the workpiece and the surface of the switch and judging the installation images, the amount of glue can be precisely controlled after alignment, which solves the problem of inaccurate glue usage and improves the installation accuracy and product quality of the switch.
Patent Information
- Application Number
- CN202511092109.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, it is difficult to accurately control the amount of glue used during the installation of the switch, resulting in too much or too little glue, which affects the product's appearance and reliability.
By performing integrity checks on the workpiece and switch surfaces, using installation images to determine alignment, and obtaining the amount of residual adhesive and the desired amount of adhesive, the glue dispensing machine is controlled to inject the precise amount of adhesive, ensuring that the adhesive fully fills the installation chamber.
It enables precise control of the adhesive, avoids waste, improves installation accuracy and product stability, and ensures good sealing and fixing effects.
Smart Images

Figure CN120998715A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of part installation, and particularly relates to a key switch installation method and device. BACKGROUND
[0002] In related technologies, in the process of installing a key switch into a sensor, in order to fix and seal the key switch, a glue fixing and sealing method is usually used to fix the key switch. The traditional glue pouring method cannot accurately control the amount of glue, and the amount of glue is prone to be too much or too little. Too much glue may cause glue overflow, which not only affects the appearance of the product, but also may contaminate other parts of the equipment. Too little glue may not achieve effective sealing and fixing, which reduces the reliability and stability of the product. SUMMARY
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The key switch installation method and device provided by the embodiments of the present application can improve the installation accuracy and ensure that the glue can fully fill the installation chamber, thereby achieving good sealing and fixing effects.
[0005] To achieve the above-mentioned purpose, a first aspect of the embodiments of the present application provides a key switch installation method, which detects the integrity of the surface of a workpiece and a key switch respectively; moves the key switch to the installation side of the workpiece, takes a picture of the key switch and the workpiece from the installation side to obtain an installation image, determines whether the key switch is aligned with the installation chamber of the workpiece through the installation image, and installs the key switch into the installation chamber after the key switch is aligned with the installation chamber; obtains a first residual glue amount and a preset expected glue amount, determines a real-time glue amount, removes the residual glue in the last glue pouring process, and controls the injection of glue with a volume of the real-time glue amount into the installation chamber.
[0006] In some embodiments, the glue pouring process is performed by a pre-installed glue pouring machine, the glue pouring machine includes a glue storage tank and a glue pump, the glue pump is used to inject the glue in the glue storage tank into the installation chamber through a pipeline, the end of the pipeline is provided with a spray gun, the spray gun is provided with a gravity sensor, and the obtaining of the first residual glue amount and the preset expected glue amount and the determination of the current real-time glue amount include: obtaining the real-time gravity of the spray gun before the glue pouring process, determining the first residual glue amount according to the real-time gravity and the net gravity of the spray gun; obtaining the historical glue amount of the last glue pouring process, determining the residual specific gravity according to the first residual glue amount and the historical glue amount; obtaining the expected glue amount, and determining the real-time glue amount according to the expected glue amount and the residual specific gravity.
[0007] In some embodiments, the controlling the glue pump to inject glue into the mounting chamber with a volume of the real-time glue amount comprises: starting the glue pump to continuously inject glue into the mounting chamber until the volume of the injected glue equals the real-time glue amount; obtaining a second residual glue amount on the spray gun, determining an actual glue amount according to a difference between the real-time glue amount and the second residual glue amount, and comparing the actual glue amount with the expected glue amount; determining a glue amount error between the expected glue amount and the actual glue amount, and controlling the glue pump to inject glue into the mounting chamber with a volume of a replenishment glue amount when the glue amount error is greater than a preset glue amount threshold, wherein the replenishment glue amount equals a product of a preset calibration coefficient and the glue amount error, and the calibration coefficient is greater than zero and less than one; determining the glue amount error again and controlling the glue pump to inject glue into the mounting chamber with a volume of the replenishment glue amount until the glue amount error is less than the glue amount threshold.
[0008] In some embodiments, the determining whether the opening key and the mounting chamber are aligned according to the mounting image comprises: identifying a first identification area of the opening key and a second identification area of the mounting chamber on the mounting image; determining a blocking relationship between the first identification area and the second identification area according to boundary features of the first identification area and the second identification area, and determining whether the opening key and the mounting chamber are aligned according to the blocking relationship.
[0009] In some embodiments, the identifying the first identification area of the opening key and the second identification area of the mounting chamber on the mounting image comprises: selecting an original area of the mounting chamber and boundary features thereof in a blank original image of the workpiece, determining a second identification area on the mounting image according to the boundary features of the original area; comparing the original image with the mounting image, and framing an abnormal area different from the original image in the mounting image; eliminating irrelevant elements in the abnormal area to obtain the first identification area of the opening key.
[0010] In some embodiments, the identifying the first identified area of the key and the second identified area of the mounting chamber on the mounting image comprises: performing frame identification on the mounting image, dividing the mounting image to obtain a plurality of initial areas enclosed by frames; acquiring a first image of the key and a second image of the workpiece respectively, performing grayscale processing on the first image after removing the background area to obtain a first reference area, and performing grayscale processing on the second image after removing the area outside the mounting chamber to obtain a second reference area; calling a pre-trained frame identification model to compare each of the initial areas with the first reference area to anchor the first identified area, and to compare each of the initial areas with the second reference area to anchor the second identified area.
[0011] In some embodiments, the determining whether the key and the mounting chamber are aligned through the occlusion relationship comprises: if it is determined that the boundary feature of the first identified area intersects with the identified feature of the second identified area, determining that the key and the mounting chamber are not aligned; if the boundary feature of the first identified area does not intersect with the identified feature of the second identified area, identifying the pixel points in the first identified area and the pixel points in the second identified area; and if at least part of the pixel points in the first identified area coincide with part of the pixel points in the second identified area, determining that the key and the mounting chamber are aligned.
[0012] To achieve the above object, the second aspect of the present application proposes a key installation device, comprising: an integrity detection module for detecting the integrity of the surface of a workpiece and a key respectively; an installation module for moving the key to the mounting side of the workpiece, capturing the key and the workpiece from the mounting side to obtain a mounting image, determining whether the key and the mounting chamber of the workpiece are aligned through the mounting image, and installing the key into the mounting chamber after the key and the mounting chamber are aligned; and a glue filling module for acquiring a first residual glue amount and a preset expected glue amount, determining a real-time glue amount, removing the residual glue in the last glue filling process, and controlling the injection of glue with a volume of the real-time glue amount into the mounting chamber.
[0013] To achieve the above object, the third aspect of the embodiments of the present application proposes an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the key installation method of the first aspect when executing the computer program.
[0014] To achieve the above object, a fourth aspect of the embodiment of the present application provides a storage medium, which is a computer readable storage medium, and stores a computer program. The computer program is executed by a processor to implement the key opening installation method of the first aspect.
[0015] The embodiment of the present application has at least the following beneficial effects: the integrity of the workpiece and the surface of the key opening is detected during the installation process, so that defects or flaws on the surface can be found in time, and the overall quality and stability of the product can be effectively improved; before the key opening is installed into the installation chamber, whether the key opening is aligned with the installation chamber is determined by using the installation image, so that the key opening can be accurately installed into the specified position, and the installation precision is improved; after the key opening is installed on the workpiece, the key opening needs to be filled with glue. After the last filling treatment, because the glue is viscous, glue droplets are often left on the workpiece after injecting the glue. Therefore, before the glue is injected, the real-time glue amount is determined by obtaining the first residual glue amount and the preset expected glue amount, the residual glue droplets are removed, and then a corresponding volume of glue is injected into the installation chamber, so that the precise control of the glue amount is realized. Not only the waste of glue is avoided, and the production cost is reduced, but also it is ensured that the glue can fully fill the installation chamber, and good sealing and fixing effects are achieved.
[0016] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and achieved by the structure particularly pointed out in the specification, claims and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings are included to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical solutions of the present application, and do not constitute a limitation on the technical solutions of the present application.
[0018] Figure 1 An optional flowchart of a key opening installation method provided by the embodiment of the present application is shown in the figure; Figure 2 An optional flowchart of calculating the real-time glue amount provided by the embodiment of the present application is shown in the figure; Figure 3 An optional specific flowchart of the glue injection process provided by the embodiment of the present application is shown in the figure; Figure 4 An optional flowchart of alignment identification provided by the embodiment of the present application is shown in the figure; Figure 5 An optional structural diagram of a key opening installation device provided by the embodiment of the present application is shown in the figure; Figure 6This is a schematic diagram of an optional hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0020] In the description of this application, "several" means one or more, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.
[0021] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0022] In related technologies, during the installation of the switch inside the sensor, adhesive is typically used for fixing and sealing the switch. However, traditional adhesive application methods often cannot accurately control the amount of adhesive used, easily resulting in too much or too little adhesive. Too much adhesive may cause overflow, affecting the product's appearance and potentially contaminating other components; while too little adhesive may fail to achieve effective sealing and fixing, reducing the product's reliability and stability.
[0023] Based on this, the embodiments of this application provide a switch installation method and apparatus, which can improve the installation accuracy and ensure that the adhesive can fully fill the installation chamber, achieving a good sealing and fixing effect.
[0024] The switch installation method and apparatus provided in this application are specifically described through the following embodiments. First, the switch installation method in this application is described.
[0025] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0026] like Figure 1 As shown, Figure 1 This is an optional flowchart illustrating a power switch installation method provided in an embodiment of this application. The power switch installation method can be executed by a server, a terminal, or a server in conjunction with a terminal. The power switch installation method includes, but is not limited to, the following steps S110 to S130: Step S110, respectively, the integrity of the workpiece and the surface of the key is detected; Step S120, control the key to move to the installation side of the workpiece, from the installation side of the key and the workpiece are taken, get installation image, through the installation image to determine whether the key and the installation room is aligned, after the key and the installation room is aligned to install the installation room; Step S130, get the first residual amount of glue and the expected amount of glue, determine the current real-time amount of glue, control the residual glue in the last time of the glue processing is removed, and control the volume of the real-time amount of glue is injected into the installation room.
[0027] Based on this, the integrity of the workpiece and the surface of the key is detected during installation, which can timely find the defects or flaws on the surface, effectively improve the overall quality and stability of the product; before the key is installed into the installation room, the installation image is used to determine whether the key and the installation room are aligned, so as to ensure that the key can be accurately installed to the specified position, and the installation precision is improved; after the key is installed on the workpiece, the key needs to be sealed with glue, and after the last sealing process, the glue droplet is often left on the workpiece after injecting glue, therefore, before injecting glue, the first residual amount of glue and the expected amount of glue are obtained to determine the real-time amount of glue, the residual glue droplet is removed, and then the corresponding volume of glue is injected into the installation room, so as to realize the accurate control of the amount of glue, avoid the waste of glue, reduce the production cost, and ensure that the glue can fully fill the installation room, so as to realize good sealing and fixing effect.
[0028] Optionally, the surface of the workpiece and the key is scanned by using high-precision optical detection equipment to check whether there are scratches, pits, cracks and other defects. At the same time, the size of the workpiece and the key is measured by using laser range finder to ensure that it meets the design requirements, the thickness, length and width of the key and the size of the installation room on the workpiece are measured to ensure that the sizes of the two can be adapted.
[0029] After the detection of the key and the workpiece is completed, the key is moved to the installation side of the workpiece by using the mechanical arm, the key and the workpiece are photographed from the installation side by using the industrial camera, the installation image is obtained, the workpiece is placed on the table or the tool, the installation room is located on the upper side of the workpiece, the key is moved to the upper side of the installation room by the mechanical arm, the industrial camera is arranged on the mechanical arm, the key and the workpiece are photographed from top to bottom by the industrial camera, the installation image is analyzed by the image processing software, and it is determined whether the key and the installation room are aligned. If there is deviation, the position of the key is adjusted by the mechanical arm until the two are completely aligned, and the key is installed into the installation room after alignment.
[0030] Obtain the amount of adhesive remaining after the last dispensing process, and calculate the current real-time adhesive amount based on the preset expected adhesive amount. For example, if the remaining volume of the switch chamber after the switch is installed is 10 ml, and the switch chamber needs to be completely filled with glue, then the expected glue volume for a single injection is 10 ml. The previous first residual glue volume is 2 ml. It can be expected that after this injection, there will still be 2 ml of glue remaining on the glue dispensing machine. Therefore, after the previous injection, the residual glue is wiped off to avoid residual glue droplets contaminating the workpiece and to reduce the impact on the glue volume calculation. The first residual glue volume after this injection is estimated based on the first residual glue volume after the previous injection. Generally speaking, the first residual glue volume after this injection is equal to the first residual glue volume after the previous injection. Therefore, the current real-time glue volume injected outward is calculated to be equal to the sum of the expected glue volume and the first residual glue volume, that is, the real-time glue volume is equal to 12 ml. 12 ml of glue is injected into the installation chamber by the glue dispensing machine to ensure that the glue can fully fill the installation chamber and achieve a good sealing and fixing effect.
[0031] In another specific implementation, the real-time glue amount can also be equal to half of the first residual glue amount and the desired glue amount, thereby avoiding the glue overflowing from the installation chamber due to insufficient residual glue amount in this glue filling. Since the installation chamber is not completely filled with glue at this time, the calibration and replenishment process will be implemented in subsequent embodiments.
[0032] In one embodiment of this application, reference is made to... Figure 2 As shown, Figure 1 Step S130 includes, but is not limited to, steps S210 to S230: Step S210: Before the glue dispensing process, obtain the real-time gravity of the spray gun, and determine the first residual glue amount based on the real-time gravity and the net gravity of the spray gun. Step S220: Obtain the historical glue volume of the previous glue dispensing process, and determine the residual specific gravity based on the first residual glue volume and the historical glue volume; Step S230: Obtain the desired amount of adhesive and determine the real-time amount of adhesive based on the desired amount of adhesive and the residual specific gravity.
[0033] Specifically, the glue dispensing process is carried out by a pre-installed glue dispensing machine, which includes a glue storage tank and a glue pump. The glue pump is used to inject the glue in the glue storage tank into the installation chamber through a pipeline. A spray gun is installed at the end of the pipeline, and a gravity sensor is installed on the spray gun. The gravity sensor is used to measure the sum of the gravity of the spray gun and the amount of residual glue.
[0034] Assuming the expected glue volume is the same for both the initial and subsequent glue injections, the real-time glue volume can be further determined by calculating the residual ratio between the first residual glue volume and the corresponding historical glue volume.
[0035] After the last glue injection is completed, the historical glue amount actually pushed by the glue pump during the last glue injection is obtained, and the first residual glue amount on the spray gun is obtained, a residual ratio is calculated between the first residual glue amount and the historical glue amount, an expected glue amount of this time is obtained, and a real-time glue amount is calculated, wherein the real-time glue amount is equal to the expected glue amount divided by 1 minus the residual ratio.
[0036] In a specific embodiment, as before, the first residual glue amount on the spray gun is not completely the same in each glue injection process, therefore, in this embodiment, in order to avoid the glue in the installation chamber overflowing, the calculation formula of the real-time glue amount can also be real-time glue amount = expected glue amount / (1-residual ratio+t), t is a fixed coefficient greater than 0 and less than 1.
[0037] In order to avoid the glue from overflowing from the installation chamber, some embodiments of the present application design a scheme that the real-time glue amount is less than the sum of the expected glue amount and the first residual glue amount, in order to ensure that the installation chamber is filled with glue as much as possible, as shown in the formula, the present application also proposes the following embodiments, including but not limited to the following steps S310 to S340: Figure 3 Step S310, start the glue pump and continuously inject glue into the installation chamber until the volume of the injected glue is equal to the real-time glue amount; Step S320, obtain the second residual glue amount on the spray gun, determine the actual glue amount according to the difference between the real-time glue amount and the second residual glue amount, and compare the actual glue amount with the expected glue amount; Step S330, determine the difference between the expected glue amount and the actual glue amount to obtain a glue amount error, if the glue amount error is greater than a preset glue amount threshold, control the glue pump to inject glue into the installation chamber with a volume of a supplement glue amount, wherein the supplement glue amount is equal to the product of a preset calibration coefficient and the glue amount error, and the calibration coefficient is greater than zero and less than one; Step S340, determine the glue amount error again, and control the glue pump to inject glue into the installation chamber with a volume of the supplement glue amount until the glue amount error is less than the glue amount threshold.
[0038] Specifically, when the design real-time glue amount is less than the sum of the expected glue amount and the first residual glue amount, there is a possibility that the actual amount of glue injected into the mounting chamber is less than the remaining volume of the mounting chamber, and the glue cannot completely fill the entire mounting chamber. At this time, after the glue pump advances a volume of glue equal to the real-time glue amount, the gravity of the spray gun is obtained through the gravity sensor, the second residual glue amount on the spray gun is calculated by the externally connected computer, and the difference between the real-time glue amount and the second residual glue amount is calculated to obtain the actual glue amount in the mounting chamber. At this time, the difference between the expected glue amount and the actual glue amount is continuously calculated to obtain the glue amount error, which represents the volume of the mounting chamber that is not filled with glue. When the glue amount error is greater than the preset glue amount threshold, in order to fill the mounting chamber as much as possible, it is necessary to inject glue into the mounting chamber again. At this time, by presetting a calibration coefficient greater than zero and less than one, the product of the calibration coefficient and the glue amount error is calculated to obtain the supplementary glue amount, and the glue pump is started again to inject glue into the mounting chamber, so that the mounting chamber can be filled as much as possible without glue overflow.
[0039] After one supplementary glue amount filling, the second residual glue amount is measured again and the new glue amount error is calculated. After the supplementary glue amount filling, the amount of glue newly entering the mounting chamber is equal to the supplementary glue amount plus the last second residual glue amount minus the current second residual glue amount. At this time, the new actual glue amount in the mounting chamber is equal to the actual glue amount calculated last time plus the amount of glue newly entering the mounting chamber, and the new glue amount error is equal to the expected glue amount minus the new actual glue amount. By comparing the numerical relationship between the new glue amount error and the glue amount threshold, if the new glue amount error is still greater than the glue amount threshold, the supplementary glue amount is injected again until the latest glue amount error is less than or equal to the glue amount threshold.
[0040] In addition, with reference to FIG. 6, in some embodiments of the present application, Figure 4 the step S120 in FIG. 5, Figure 1 includes but is not limited to the following steps S410 to S420: Step S410, identifying a first identification area of the key and a second identification area of the mounting chamber on the mounting image; Step S420, determining the occlusion relationship between the first identification area and the second identification area according to the boundary features of the first identification area and the second identification area, and determining whether the key and the mounting chamber are aligned through the occlusion relationship.
[0041] In a specific embodiment, before image recognition, an original image of a blank workpiece is first acquired, an original area of the mounting chamber and its boundary features are selected in the original image, then the workpiece and the key are photographed at the shooting position of the original image to obtain a mounting image with the same relative position, the same relative size and the same scale as the original image, and a second recognition area is determined on the mounting image according to the boundary features of the original area; the original image is compared with the mounting image to frame an abnormal area in the mounting image that is different from the original image; irrelevant elements in the abnormal area are eliminated, including pixel points displayed in the mounting image due to the mechanical arm used for grabbing the key, to obtain a first recognition area of the key.
[0042] In another specific embodiment, a pre-trained artificial intelligence model can also be called to perform image recognition. Specifically, a bounding box recognition is performed on the mounting image, the mounting image is divided to obtain a plurality of initial areas enclosed by bounding boxes; a first image of the key and a second image of the workpiece are acquired respectively, the first image is subjected to background area elimination and then grayscale processing to obtain a first reference area, and the mounting chamber is framed on the second image, the area outside the mounting chamber is eliminated and then subjected to grayscale processing to obtain a second reference area; a pre-trained bounding box recognition model is called to compare each initial area with the first reference area respectively to anchor a first recognition area, and to compare each initial area with the second reference area respectively to anchor a second recognition area.
[0043] After the first recognition area of the key and the second recognition area of the mounting chamber are anchored, it is necessary to determine whether the key and the mounting chamber are aligned through the boundary features of the first recognition area and the boundary features of the second recognition area. Specifically, if the boundary features of the first recognition area and the recognition features of the second recognition area intersect, it is determined that the key and the mounting chamber are not aligned; if the boundary features of the first recognition area and the recognition features of the second recognition area do not intersect, the pixel points in the first recognition area and the pixel points in the second recognition area are recognized; and if at least part of the pixel points in the first recognition area coincide with part of the pixel points in the second recognition area, it is determined that the key and the mounting chamber are aligned.
[0044] In addition, with reference to Figure 5 The application also provides a key mounting device 500, comprising: a completeness detection module 501 for detecting the completeness of the surfaces of the workpiece and the key respectively; a mounting module 502 for moving the key to the mounting side of the workpiece, photographing the key and the workpiece from the mounting side to obtain a mounting image, and determining whether the key and the mounting chamber of the workpiece are aligned through the mounting image, and mounting the key into the mounting chamber after the key and the mounting chamber are aligned; The glue filling module 503 is configured to acquire the first residual glue amount and the preset expected glue amount, determine the current real-time glue amount, remove the residual glue in the last glue filling process, and control injection of the glue with the volume of the real-time glue amount into the mounting chamber.
[0045] The key installation device and the key installation method are based on the same inventive concept, and details are not repeated here.
[0046] In addition, with reference to Figure 6 , Figure 6 a hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 601 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application. The memory 602 can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 602 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 602 and are called and executed by the processor 601 to implement the key installation method of the present application, for example, to execute the method steps S110 to S130 in the method described above, Figure 1 the method steps S210 to S230 in the method described above, Figure 2 the method steps S310 to S340 in the method described above, Figure 3 the method steps S410 to S420 in the method described above. Figure 4 The input / output interface 603 is configured to realize information input and output. The communication interface 604 is configured to realize communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.). The bus 605 transmits information between various components (for example, the processor 601, the memory 602, the input / output interface 603, and the communication interface 604) of the device. The processor 601, the memory 602, the input / output interface 603, and the communication interface 604 are connected to each other through the bus 605 for communication connection within the device.
[0047] This application embodiment also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described power switch installation method, for example, executing the above-described... Figure 1 Method steps S110 to S130, Figure 2 Method steps S210 to S230, Figure 3 Method steps S310 to S340, Figure 4 Method steps S410 to S420.
[0048] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0049] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0050] It will be understood by those skilled in the art that Figures 1 to 4 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0051] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0052] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0053] The terms "first", "second", "third", "fourth", and the like in the description and in the claims of this application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of orderly or chronological mundane operation, reverse order operation, based on circuitry availability, based on stated preference or the like, and that "default" or other orderings are thus permissible. Further, the terms "comprise", "comprising", "include", "including", and the like, are specifically intended to be open-ended. That is, references to individual steps and the like do not suhstantially exclude the presence of two or more of a given step or its integral presence in the process, method, system, article, or apparatus having been made with a wider scope. The use of notation such as "first", "second", "third", etc. does not generally limit the areas, but is used to connect like elements or to distinguish one claim from another. These terms can be used interchangeably when appropriate. Terms concerning the relative position of elements can be interpreted such that their use adheres to their normal meaning, but they can also be interpreted to mean the opposite according to specific claims.
[0054] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0055] In several embodiments provided by the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the above-mentioned units is only a logical functional division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0056] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the application.
[0057] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0058] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various other media that can store programs.
[0059] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not intended to limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A key opening installation method characterized by, The application relates to a key switch installation method and device. The method comprises the following steps: detecting the integrity of a workpiece and a key switch surface respectively; controlling the key switch to move to the mounting side of the workpiece, taking a mounting image of the key switch and the workpiece from the mounting side, judging whether the key switch is aligned with the mounting chamber of the workpiece through the mounting image, and mounting the key switch into the mounting chamber after the key switch is aligned with the mounting chamber. The method comprises the following steps: obtaining a first residual glue amount and a preset expected glue amount, determining a current real-time glue amount, controlling the residual glue in the last glue filling process to be removed, and controlling the installation chamber to be injected with glue with a volume of the real-time glue amount. The glue filling process is performed by a pre-installed glue filling machine, the glue filling machine comprises a glue storage tank and a glue pump, the glue pump is used for injecting glue in the glue storage tank into the installation chamber through a pipeline, the end of the pipeline is provided with a spray gun, the spray gun is provided with a gravity sensor, the method of obtaining the first residual glue amount and the preset expected glue amount, and determining the current real-time glue amount comprises the following steps:
2. The key-on mounting method according to claim 1, wherein Before the glue filling process, the real-time gravity of the spray gun is obtained, and the first residual glue amount is determined according to the real-time gravity and the net gravity of the spray gun; The historical glue amount of the last glue filling process is obtained, the residual specific gravity is determined according to the first residual glue amount and the historical glue amount; The expected glue amount is obtained, and the real-time glue amount is determined according to the expected glue amount and the residual specific gravity. The method of controlling the installation chamber to be injected with glue with a volume of the real-time glue amount comprises the following steps:
3. The key-on mounting method according to claim 2, wherein The glue pump is started, and glue is continuously injected into the installation chamber until the volume of the injected glue is equal to the real-time glue amount; The second residual glue amount on the spray gun is obtained, the actual glue amount is determined according to the difference between the real-time glue amount and the second residual glue amount, and the actual glue amount is compared with the expected glue amount; The difference between the expected glue amount and the actual glue amount is determined to obtain a glue amount error, if the glue amount error is greater than a preset glue amount threshold, the glue pump is controlled to inject glue with a volume of a supplement glue amount into the installation chamber, wherein the supplement glue amount is equal to the product of a preset calibration coefficient and the glue amount error, and the calibration coefficient is greater than zero and less than one; The glue amount error is determined again, and the glue pump is controlled to inject glue with a volume of the supplement glue amount into the installation chamber until the glue amount error is less than the glue amount threshold. The method of judging whether the key switch is aligned with the mounting chamber of the workpiece through the mounting image comprises the following steps:
4. The key-on mounting method according to claim 1, wherein Identifying a first identification area of the key switch and a second identification area of the mounting chamber on the mounting image; According to the boundary features of the first identification area and the second identification area, the shielding relationship between the first identification area and the second identification area is determined, and whether the key switch is aligned with the mounting chamber is determined through the shielding relationship. The method of identifying a first identification area of the key switch and a second identification area of the mounting chamber on the mounting image comprises the following steps:
5. The key-on mounting method according to claim 4, wherein In the original image of the blank workpiece, an original area of the mounting chamber and its boundary features are selected, and the second identification area is determined on the mounting image according to the boundary features of the original area. Comparing the original image with the installation image in which an abnormal area different from the original image is framed; Eliminating irrelevant elements in the abnormal area to obtain a first identification area of the key.
6. The key-on mounting method according to claim 4, wherein The first identification area of the key and the second identification area of the installation chamber on the installation image include: Performing frame identification on the installation image to divide the installation image to obtain a plurality of initial areas enclosed by frames; Respectively acquiring a first image of the key and a second image of the workpiece, performing grayscale processing on the first image after eliminating the background area to obtain a first reference area, and framing the installation chamber on the second image, performing grayscale processing on the area outside the installation chamber to obtain a second reference area; Calling a pre-trained frame identification model to respectively compare each of the initial areas with the first reference area to anchor a first identification area, and respectively compare each of the initial areas with the second reference area to anchor a second identification area.
7. The key-on mounting method according to claim 4, wherein The determination of whether the key and the installation chamber are aligned through the shielding relationship includes: If the boundary feature of the first identification area intersects with the identification feature of the second identification area, it is determined that the key and the installation chamber are not aligned; If the boundary feature of the first identification area does not intersect with the identification feature of the second identification area, the pixel points in the first identification area and the pixel points in the second identification area are identified; If at least part of the pixel points in the first identification area coincide with part of the pixel points in the second identification area, it is determined that the key and the installation chamber are aligned.
8. A key opening and installing device characterized by It includes: An integrity detection module that detects the integrity of the surface of the workpiece and the key; An installation module that moves the key to the installation side of the workpiece, captures the key and the workpiece from the installation side to obtain an installation image, determines whether the key and the installation chamber of the workpiece are aligned through the installation image, and installs the key into the installation chamber after the key and the installation chamber are aligned; A glue filling module that acquires a first residual glue amount and a preset expected glue amount, determines a real-time glue amount, removes the residual glue in the last glue filling process, and controls the injection of glue with a volume equal to the real-time glue amount into the installation chamber.
9. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the key installation method in any one of claims 1 to 7.
10. A storage medium storing a computer program, characterized by The computer program is executed by the processor to implement the key installation method in any one of claims 1 to 7.