Motor controller detection method and system, computer device and storage medium
By utilizing historical fault data and similarity matching technology, the motor controller detection method can detect subtle defects in the motor controller, solving the problem of unreliable detection in existing technologies and improving product reliability.
Patent Information
- Application Number
- CN202211646214.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-12-20
AI Technical Summary
The detection method of the motor controller in the existing technology cannot effectively detect minor defects, and the circuit detection cannot guarantee reliability, which is prone to failure during use.
Key inspection areas are identified through historical fault data, motor controller image groups are collected for basic defect detection, and similarity matching technology is used to identify subtle defects in the defect library, especially in plug connection and circuit welding areas.
The reliability of motor controller detection is improved, and subtle problems such as improper plug connection or improper circuit welding can be detected, thus ensuring product quality.
Smart Images

Figure CN115861268B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of visual inspection, in particular to a motor controller detection method and system, computer equipment and storage medium. BACKGROUND
[0002] The motor controller on the electric bicycle is used to control the start, operation, advance and retreat, speed and stop of the electric motor and the core control device of other electronic devices of the electric bicycle. It is like the brain of the electric bicycle and is an important part of the electric bicycle. Therefore, it is very important to detect the motor controller before leaving the factory. The detection of the motor controller is divided into two aspects. One is artificial inspection of external defects, which is often checked one by one through artificial experience. Artificial inspection is difficult to check when facing some small defects. The other is to detect whether the motor controller can operate normally through the circuit. The circuit detection cannot guarantee the reliability of the motor controller. For example, the plug is not plugged in place or the line is not welded in place. Although it can operate normally during circuit detection, it is easy to malfunction after a period of use by the user. The reliability of detection is not high enough. Therefore, it is necessary to provide a motor controller detection method and system, computer equipment and storage medium to solve the above problems. SUMMARY
[0003] In view of the defects in the prior art, the purpose of the present application is to provide a motor controller detection method and system, computer equipment and storage medium to solve the problems in the background art.
[0004] The present application is implemented as follows. A motor controller detection method, the method comprising the following steps:
[0005] Determine the key detection parts according to historical fault data;
[0006] Receive the key part position information uploaded by the staff, the key part position information comprising a plurality of image numbers, each image number corresponding to key area position information;
[0007] Obtain a motor controller image group, the motor controller image group comprising a plurality of motor controller images, each motor controller image being marked with a number, perform basic defect detection to obtain first detection information;
[0008] Determine key area images according to the motor controller image group and the key part position information, input the key area images into the corresponding defect library for similarity matching to obtain second detection information.
[0009] As a further scheme of the present application, the step of determining the key detection parts according to historical fault data specifically comprises:
[0010] According to the fault reason part, the historical fault data is classified to obtain several fault categories, and the historical fault data includes fault problems and corresponding fault reason parts;
[0011] The historical fault data in each fault category is counted, and when the count reaches a set value, the historical fault data is determined as key fault data;
[0012] The fault reason part corresponding to the key fault data is marked as a key detection part.
[0013] As a further scheme of the application, the step of determining the key area image according to the motor controller image group and the key part position information specifically comprises:
[0014] According to the image number in the key part position information, the motor controller image with the same number is called from the motor controller image group;
[0015] According to the number on the motor controller image, the corresponding key area position information is determined for each motor controller image;
[0016] According to the key area position information, the key area image is determined.
[0017] As a further scheme of the application, the step of inputting the key area image into the corresponding defect library for similarity matching to obtain the second detection information specifically comprises:
[0018] The key area image is input into the corresponding defect library, and each key area image corresponds to a respective defect library, and the defect library contains several normal sample images and several defect sample images;
[0019] The key area image and all sample images in the defect library are sequentially matched for similarity, and the sample image with the highest similarity is output;
[0020] The second detection information is obtained according to the output sample image.
[0021] As a further scheme of the application, the step of matching the key area image with the sample image in the defect library for similarity specifically comprises:
[0022] The hash value of the key area image and the sample image is calculated respectively using the hash method based on DCT to obtain h_1 and h_2;
[0023] The Hamming distance dis_h between h_1 and h_2 is calculated;
[0024] The similarity between the key area image and the sample image is calculated according to the Hamming distance dis_h.
[0025] Another object of the present application is to provide a detection system of a motor controller, which comprises:
[0026] A key position determining module is configured to determine key detection positions according to historical fault data;
[0027] A position information receiving module is configured to receive key position information uploaded by a worker, wherein the key position information comprises a plurality of image numbers, and each image number corresponds to key region position information;
[0028] A first detection module is configured to collect a motor controller image group, wherein the motor controller image group comprises a plurality of motor controller images, each of which is marked with a number, and to perform basic defect detection to obtain first detection information;
[0029] A second detection module is configured to determine key region images according to the motor controller image group and the key position information, and to input the key region images into a corresponding defect library for similarity matching to obtain second detection information.
[0030] As a further scheme of the present application, the key position determining module comprises:
[0031] A fault data classification unit is configured to classify historical fault data according to fault cause positions to obtain a plurality of fault categories, wherein the historical fault data comprises fault problems and corresponding fault cause positions;
[0032] A key data determining unit is configured to count the historical fault data in each fault category, and to determine the historical fault data as key fault data when the count reaches a set value;
[0033] A key detection position unit is configured to mark the fault cause positions corresponding to the key fault data as key detection positions.
[0034] As a further scheme of the present application, the second detection module comprises:
[0035] A controller image calling unit is configured to call motor controller images with corresponding numbers from the motor controller image group according to the image numbers in the key position information;
[0036] A region information determining unit is configured to determine corresponding key region position information for each motor controller image according to the numbers on the motor controller images;
[0037] A region image determining unit is configured to determine key region images according to the key region position information.
[0038] The application further provides a computer device, comprising a display screen, a memory, a processor and a computer program, wherein the memory stores the computer program, and the computer program is executed by the processor to make the processor execute the steps in the detection method of the motor controller.
[0039] The application further provides a storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute the steps in the detection method of the motor controller.
[0040] Compared with the prior art, the application has the following beneficial effects:
[0041] The application can determine the key area image according to the motor controller image group and the key position information, input the key area image into the corresponding defect library for similarity matching, so that the key area can be detected more finely, for example, the key area includes the plug connection area and the circuit welding area, and the plug connection or the circuit welding can be detected if not in place, thereby ensuring the reliability of the product. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 It is a flowchart of the detection method of the motor controller.
[0043] Figure 2 It is a flowchart of determining the key detection position according to the historical fault data in the detection method of the motor controller.
[0044] Figure 3 It is a flowchart of determining the key area image according to the motor controller image group and the key position information in the detection method of the motor controller.
[0045] Figure 4 It is a flowchart of inputting the key area image into the corresponding defect library for similarity matching to obtain the second detection information in the detection method of the motor controller.
[0046] Figure 5 It is a flowchart of similarity matching the key area image with the sample image in the defect library in the detection method of the motor controller.
[0047] Figure 6 It is a structural schematic diagram of the detection system of the motor controller.
[0048] Figure 7 It is a structural schematic diagram of the key position determination module in the detection system of the motor controller.
[0049] Figure 8 It is a structural schematic diagram of the second detection module in the detection system of the motor controller. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] The specific implementation of the present invention is described in detail below with reference to specific embodiments.
[0052] like Figure 1 As shown, an embodiment of the present invention provides a detection method for a motor controller, the method comprising the following steps:
[0053] S100, determining key inspection locations based on historical fault data;
[0054] S200, receiving key area location information uploaded by a staff member, wherein the key area location information includes a plurality of image numbers, each image number corresponding to key area location information;
[0055] S300, acquiring a motor controller image group, wherein the motor controller image group includes a plurality of motor controller images, each motor controller image is marked with a number, performing basic defect detection, and obtaining first detection information;
[0056] S400 , determining a key area image based on the motor controller image group and key part position information, inputting the key area image into a corresponding defect library for similarity matching, and obtaining second detection information.
[0057] It should be noted that the current inspection of motor controllers is divided into two aspects. On the one hand, manual inspection for external defects is often carried out one by one based on manual experience. Manual inspection is difficult to detect when faced with some minor defects; on the other hand, circuit inspection is used to detect whether the motor controller can operate normally. Circuit inspection cannot guarantee the reliability of the motor controller. For example, if the plug is not properly connected or the line is not properly welded, although it can operate normally during circuit inspection, it is easy to malfunction after the user uses it for a period of time. The reliability of the inspection is not high enough. The embodiments of the present invention aim to solve the above problems.
[0058] The embodiment of the application is external defect detection after conventional circuit detection to ensure product reliability, and the embodiment of the application determines key detection parts according to historical fault data, and a worker needs to formulate key part position information according to the key detection parts and upload the key part position information, the key part position information includes a plurality of image numbers, and each image number corresponds to key area position information; then the motor controller can be detected, a group of motor controller images are acquired through a group of cameras, the motor controller image group includes a plurality of motor controller images, each motor controller image is marked with a number, each camera is fixedly installed, and the camera and the number are one-to-one correspondence, so that the contents of the motor controller images with the same number are the same, then basic defect detection is performed according to the motor controller images, the basic defect detection includes obvious defects on the surface of the controller, and the basic defect detection can be achieved through ordinary computer vision detection, to obtain first detection information, the first detection information is that the basic defect detection is qualified or unqualified; then the embodiment of the application also determines key area images according to the motor controller image group and the key part position information, and inputs the key area images into a corresponding defect library for similarity matching, so that the key areas can be detected more finely, for example, the key areas include plug connection areas, circuit welding areas and the like, and the plug connection areas or the circuit welding areas that are not in place can be detected, to ensure the reliability of the product.
[0059] As shown in Figure 2 As a preferred embodiment of the application, the step of determining the key detection parts according to the historical fault data specifically includes:
[0060] S101, classifying historical fault data according to fault cause parts to obtain a plurality of fault categories, the historical fault data including fault problems and corresponding fault cause parts;
[0061] S102, counting the historical fault data in each fault category, and when the count reaches a set value, determining that the historical fault data is key fault data;
[0062] S103, marking the fault cause parts corresponding to the key fault data as key detection parts.
[0063] In the embodiment of the present application, the key detection part can be determined according to the work experience of the staff, and can also be obtained according to historical fault data analysis. Specifically, first, the historical fault data is classified according to the fault cause part to obtain a plurality of fault categories, the fault cause parts in each fault category are the same, and then the historical fault data in each fault category is counted. When the count reaches a set value, it indicates that the part causes more faults, the corresponding historical fault data is determined as key fault data, and the fault cause part corresponding to the key fault data is marked as a key detection part.
[0064] As shown in Figure 3 , as a preferred embodiment of the present application, the step of determining the key area image according to the motor controller image group and the key part position information specifically comprises:
[0065] S401, according to the image number in the key part position information, the motor controller image with the same number is called from the motor controller image group;
[0066] S402, according to the number on the motor controller image, the corresponding key area position information is determined for each motor controller image;
[0067] S403, according to the key area position information, the key area image is determined.
[0068] In the embodiment of the present application, in order to determine the key area image, first, the motor controller image with the same number is called from the motor controller image group according to the image number in the key part position information, and the corresponding key area position information is determined for each motor controller image according to the number on the motor controller image. The key area position information indicates the local position of the key area on the motor controller image. In this way, the key area image can be determined according to the key area position information.
[0069] As shown in Figure 4 , as a preferred embodiment of the present application, the step of inputting the key area image into the corresponding defect library for similarity matching to obtain the second detection information specifically comprises:
[0070] S404, the key area image is input into the corresponding defect library, each key area image corresponds to a respective defect library, and the defect library contains a plurality of normal sample images and a plurality of defect sample images;
[0071] S405, the key area image and all sample images in the defect library are sequentially matched for similarity, and the sample image with the highest similarity is output;
[0072] S406, the second detection information is obtained according to the output sample image.
[0073] In the embodiment of the present application, in order to detect the key area more finely, a corresponding defect library needs to be established for each kind of key area image in advance, the defect library contains a plurality of normal sample images and a plurality of defective sample images, then the key area image is input into the corresponding defect library, the key area image and all sample images in the corresponding defect library are sequentially matched in similarity, and the sample image with the highest similarity is output, if the output sample image is a defective sample image, the second detection information is unqualified. It should be noted that each key area image detects only one defect point, for example, only detects whether the circuit welding of a certain area is in place, and the corresponding defect library contains a plurality of sample images with good circuit welding and a plurality of sample images with problems in circuit welding.
[0074] As shown in Figure 5 , as a preferred embodiment of the present application, the step of matching the key area image with the sample image in the defect library in similarity includes:
[0075] S4051, the hash values of the key area image and the sample image are calculated respectively by using the hash method based on DCT, and h_1 and h_2 are obtained;
[0076] S4052, the Hamming distance dis_h between h_1 and h_2 is calculated;
[0077] S4053, the similarity between the key area image and the sample image is calculated according to the Hamming distance dis_h.
[0078] In the embodiment of the present application, the hash method based on DCT is an AI picture recognition method in the prior art, which uses discrete cosine transform to extract the low-frequency components of the picture, converts the picture into a standard size gray image first, then performs DCT transform on the gray image, and extracts a 64-bit hash value from the coefficient matrix as a fingerprint. This method for calculating the similarity between two pictures is prior art, which will not be described in detail here.
[0079] As shown in Figure 6 , the embodiment of the present application further provides a detection system of a motor controller, the system comprises:
[0080] The key position determination module 100 is used for determining key detection positions according to historical fault data;
[0081] The position information receiving module 200 is used for receiving the key position position information uploaded by the staff, the key position position information includes a plurality of image numbers, and each image number corresponds to key area position information;
[0082] The first detection module 300 is used for collecting motor controller image groups, the motor controller image groups contain a plurality of motor controller images, each motor controller image is marked with a number, basic defect detection is performed, and first detection information is obtained;
[0083] The second detection module 400 is used for determining key area images according to the motor controller image groups and the key position information, inputting the key area images into corresponding defect libraries for similarity matching, and obtaining second detection information.
[0084] The embodiment of the application performs external defect detection after conventional circuit detection to ensure the reliability of the product. The embodiment of the application determines key detection positions according to historical fault data, and a worker needs to formulate key position information according to the key detection positions and upload the key position information. The key position information includes a plurality of image numbers, and each image number corresponds to key area position information. Then, the motor controller can be detected. A group of cameras are used to collect motor controller image groups, the motor controller image groups contain a plurality of motor controller images, each motor controller image is marked with a number, and each camera is fixedly installed. The camera corresponds to the number one by one. In this way, the contents of the motor controller images with the same number are the same. Then, basic defect detection is performed according to the motor controller images. The basic defect detection includes obvious defects on the surface of the controller, which can be detected by ordinary computer vision detection. First detection information is obtained. The first detection information is basic defect detection qualified or basic defect detection unqualified. Then, the embodiment of the application further determines key area images according to the motor controller image groups and the key position information, and inputs the key area images into corresponding defect libraries for similarity matching. In this way, the key areas can be detected more finely. For example, the key areas include plug connection areas and circuit welding areas. The plug connection areas or the circuit welding areas can be detected to ensure the reliability of the product.
[0085] As shown in Figure 7 As a preferred embodiment of the application, the key position determination module 100 includes:
[0086] The fault data classification unit 101 is used for classifying historical fault data according to fault cause positions, obtaining a plurality of fault categories, and the historical fault data includes fault problems and corresponding fault cause positions.
[0087] The key data determination unit 102 is used for counting the historical fault data in each fault category. When the number of counts reaches a set value, the historical fault data is determined as key fault data.
[0088] The key detection part unit 103 is configured to mark the fault cause part corresponding to the key fault data as a key detection part.
[0089] As shown in the figure, as a preferred embodiment of the present application, the second detection module 400 comprises: Figure 8 The controller image calling unit 401 is configured to call a motor controller image with a number consistent with the number in the key part position information from a motor controller image group according to the number in the key part position information.
[0090] The region information determining unit 402 is configured to determine corresponding key region position information for each motor controller image according to the number on the motor controller image.
[0091] The region image determining unit 403 is configured to determine a key region image according to the key region position information.
[0092] The embodiment of the present application further provides a computer device, comprising a display screen, a memory, a processor and a computer program, wherein the memory stores the computer program, and the computer program is executed by the processor to make the processor execute the steps in the detection method of the motor controller.
[0093] The embodiment of the present application further provides a storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to make the processor execute the steps in the detection method of the motor controller.
[0094] The above only describes the preferred embodiment of the present application in detail, and does not limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
[0095] It should be understood that, although each step in the flowchart of each embodiment of the present application is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified in this article, the execution of these steps has no strict sequence limitation, and these steps can be executed in other sequences. Moreover, at least part of the steps in each embodiment can comprise multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0096]
[0097] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, databases, or other media in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0098] Other embodiments of the present disclosure will be apparent to those skilled in the art with the disclosure herein. The present application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known equivalents or other adaptations as are generally known in the art to which the present disclosure belongs. The present application is to be limited only by the claims and equivalents thereof.
Claims
1. A detection method for a motor controller, characterized in that: The method comprises the following steps: Determine key inspection locations based on historical fault data; Receive key area location information uploaded by staff, where the key area location information includes a number of image numbers, each image number corresponding to key area location information; Acquire a motor controller image group, wherein the motor controller image group includes a plurality of motor controller images, each motor controller image is marked with a number, perform basic defect detection, and obtain first detection information; Determine the key area image based on the motor controller image group and the key part position information, input the key area image into the corresponding defect library for similarity matching, and obtain the second detection information; The step of determining the key area image based on the motor controller image group and the key part position information specifically includes: According to the image number in the key part position information, a motor controller image with a matching number is retrieved from the motor controller image group; Determine corresponding key area position information for each motor controller image according to the number on the motor controller image; The key area image is determined according to the key area position information.
2. The detection method of the motor controller according to claim 1, characterized in that: The step of determining the key detection locations based on historical fault data specifically includes: Classifying historical fault data according to fault cause locations to obtain several fault categories, wherein the historical fault data includes fault problems and corresponding fault cause locations; Count the historical fault data in each fault category. When the count reaches the set value, the historical fault data is determined as key fault data. The fault cause location corresponding to the key fault data is marked as a key detection location.
3. The detection method of the motor controller according to claim 1, characterized in that: The step of inputting the key area image into the corresponding defect library for similarity matching to obtain the second detection information specifically includes: Input the key area image into the corresponding defect library. Each key area image corresponds to its own defect library, which contains several normal sample images and several defective sample images. Performing similarity matching between the key area image and all sample images in the defect library in sequence, and outputting the sample image with the highest similarity; Second detection information is obtained according to the output sample image.
4. The detection method of the motor controller according to claim 3, characterized in that: The steps of performing similarity matching between the key area image and the sample images in the defect library specifically include: Use the DCT-based hash method to calculate the hash values of the key area image and the sample image respectively to obtain h_1 and h_2; Calculate the Hamming distance dis_h between h_1 and h_2; The similarity between the key area image and the sample image is calculated based on the Hamming distance dis_h.
5. The detection system of the motor controller is characterized in that, The system comprises: Key location determination module, used to determine key detection locations based on historical fault data; A position information receiving module is used to receive the key part position information uploaded by the staff, wherein the key part position information includes a plurality of image numbers, and each image number corresponds to the key area position information; A first detection module is configured to acquire a motor controller image group, wherein the motor controller image group includes a plurality of motor controller images, each motor controller image is marked with a number, perform basic defect detection, and obtain first detection information; The second detection module is used to determine the key area image based on the motor controller image group and the key part position information, input the key area image into the corresponding defect library for similarity matching, and obtain second detection information; The second detection module includes: A controller image retrieving unit, configured to retrieve a motor controller image with a matching number from the motor controller image group according to the image number in the key part position information; a region information determining unit, configured to determine corresponding key region position information for each motor controller image according to the number on the motor controller image; The area image determining unit is used to determine the key area image according to the key area position information.
6. The detection system for a motor controller according to claim 5, characterized in that: The key part determination module includes: A fault data classification unit is used to classify historical fault data according to the fault cause location to obtain a number of fault categories, wherein the historical fault data includes the fault problem and the corresponding fault cause location; A key data determination unit is used to count the historical fault data in each fault category, and when the counted number reaches a set value, determine the historical fault data as key fault data; The key detection location unit is used to mark the fault cause location corresponding to the key fault data as the key detection location.
7. A computer device, characterized in that: The invention comprises a display screen, a memory, a processor and a computer program, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps in the detection method of the motor controller according to any one of claims 1 to 4.
8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the detection method of the motor controller according to any one of claims 1 to 4.
Citation Information
Patent Citations
Product defect detection method, device and equipment and storage medium
CN112330583A
Touch panel defect detection system and touch panel defect detection method
CN112465775A