Wire harness identification method, device, equipment, medium and program product

By extracting color rings from the wiring harness cabinet image and comparing it with the design information, the problem of low wiring harness recognition efficiency in the existing technology is solved, efficient and convenient wiring harness recognition is achieved, and dependence on hardware and equipment is reduced.

CN120635523APending Publication Date: 2025-09-12BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510500251.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing method of identifying whether the wiring harness in the wiring harness cabinet is correct is inefficient and cumbersome, requiring high-performance hardware and professional equipment, and is difficult to meet the needs of large-scale, high-efficiency production or maintenance.

Method used

By obtaining the color rings of the wire harness from the image of the wiring harness cabinet, taking advantage of the different color rings of different wire harnesses, and combining the design information of the wiring harness cabinet, it is possible to quickly identify whether there are any abnormalities in the wire harness. This includes mask extraction of the color ring, noise reduction processing, and position comparison, achieving identification without the need for high-performance hardware and professional equipment.

Benefits of technology

The efficiency and convenience of harness identification are improved, and it can directly identify whether there are missing or incorrect harnesses in the harness cabinet through images, which reduces the requirements for hardware performance and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635523A_ABST
    Figure CN120635523A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a wire harness identification method and device, equipment, a medium and a program product. The method comprises the following steps: acquiring color rings of wire harnesses included in a wire harness cabinet from an image of the wire harness cabinet, wherein the color rings of different wire harnesses are different; according to the color ring and wire harness design information of the wire harness cabinet, whether wire harness abnormity exists in the wire harness cabinet or not is determined, and the wire harness design information of the wire harness cabinet comprises a reference color ring needing to exist in the wire harness cabinet. The method is used for achieving the effect of improving the efficiency and convenience of identifying whether the wire harness in the wire harness cabinet is correct or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of energy storage technology, and in particular to a wiring harness identification method, device, equipment, medium and program product. Background Art

[0002] In modern industrial production, electronic equipment maintenance, and automated control systems, wiring harness cabinets, as core components of electrical connections, play a crucial role. Numerous wiring harnesses are arranged within these cabinets. Correct wiring of these harnesses is directly related to the stable operation and safety of the entire system. Wiring errors can lead to equipment failure, signal interference, and even safety incidents. Therefore, quickly and accurately identifying the correct wiring harnesses in the cabinet is crucial for ensuring the proper operation of the cabinet and the entire system. However, current methods for identifying the correct wiring harnesses in the cabinet suffer from low efficiency and high hardware requirements.

[0003] Therefore, how to improve the efficiency and convenience of identifying whether the wiring harness in the wiring harness cabinet is correct is an urgent problem to be solved. Summary of the Invention

[0004] The wire harness identification method, device, equipment, medium and program product provided in the embodiments of the present application are used to improve the efficiency and convenience of identifying whether the wire harness in the wire harness cabinet is correct.

[0005] In a first aspect, an embodiment of the present application provides a wiring harness identification method, comprising:

[0006] Obtaining color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet, where different wire harnesses have different color rings;

[0007] Determine whether there is a wiring harness abnormality in the wiring harness cabinet according to the color ring and wiring harness design information of the wiring harness cabinet, wherein the wiring harness design information of the wiring harness cabinet includes a reference color ring that should exist in the wiring harness cabinet.

[0008] Optionally, acquiring the color ring of the wire harness included in the wire harness cabinet from the image of the wire harness cabinet includes:

[0009] Extracting masks of all colors corresponding to the reference color circles from the image;

[0010] The color rings of the wire harnesses included in the wire harness cabinet are obtained according to the masks of the respective colors.

[0011] Optionally, extracting masks of all colors corresponding to the reference color wheels from the image includes:

[0012] Extracting initial masks of the colors corresponding to all the reference color circles from the image;

[0013] The initial mask is subjected to noise reduction processing to obtain the mask of each color.

[0014] Optionally, performing noise reduction processing on the initial mask to obtain the mask of each color includes:

[0015] Performing an erosion process on the initial mask to obtain an intermediate mask;

[0016] Dilation processing is performed on the intermediate mask to obtain the mask of each color.

[0017] Optionally, before acquiring the color ring of the wire harness included in the wire harness cabinet from the image of the wire harness cabinet, the method further includes:

[0018] Obtaining an HSV image corresponding to the image according to the image;

[0019] The step of obtaining the color ring of the wire harness included in the wire harness cabinet from the image of the wire harness cabinet includes:

[0020] The color ring of the wire harness included in the wire harness cabinet is acquired from the HSV image.

[0021] Optionally, obtaining the color ring of the wire harness included in the wire harness cabinet according to the mask of each color includes:

[0022] Grouping the masks of the respective colors according to the number of color blocks included in the color ring to obtain a color ring image corresponding to the wiring harness cabinet;

[0023] The color ring of the wire harness included in the wire harness cabinet is acquired according to the color ring image.

[0024] Optionally, the wiring harness design information further includes a reference position of the wiring harness, and after obtaining the color ring of the wiring harness included in the wiring harness cabinet from the image of the wiring harness cabinet, the following steps are further included:

[0025] Obtaining a target position of each color ring in the color ring image;

[0026] If the target position of at least one of the color rings is different from the reference position of the wiring harness corresponding to the color ring, it is determined that there is a target wiring harness with an incorrect position in the wiring harness cabinet.

[0027] Optionally, obtaining the target position of each color ring in the color ring image includes:

[0028] Acquire the subregion occupied by the color ring in the color ring image;

[0029] The target position is determined according to the sub-area.

[0030] Optionally, also include:

[0031] Determining a first relative positional relationship between the plurality of reference positions according to the plurality of reference positions of the wiring harnesses corresponding to the plurality of color rings;

[0032] determining a second relative positional relationship between the plurality of target positions according to the target positions of the plurality of wire harnesses corresponding to the plurality of color rings;

[0033] If there is a difference between the first relative position relationship and the second relative position relationship, it is determined that the target position of at least one of the color rings is different from the reference position of the wiring harness corresponding to the color ring.

[0034] In a second aspect, an embodiment of the present application provides a wiring harness identification device, the device comprising:

[0035] An acquisition module, configured to acquire color rings of the wiring harnesses included in the wiring harness cabinet from an image of the wiring harness cabinet, where different wiring harnesses have different color rings;

[0036] The processing module is used to determine whether there is a wiring harness abnormality in the wiring harness cabinet according to the color ring and the wiring harness design information of the wiring harness cabinet, wherein the wiring harness design information of the wiring harness cabinet includes a reference color ring that should exist in the wiring harness cabinet.

[0037] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the processor is communicatively connected to the memory;

[0038] The memory stores computer-executable instructions;

[0039] The processor executes the computer-executable instructions stored in the memory to implement the first aspect and / or various possible implementations of the first aspect.

[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.

[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0042] The wire harness identification method, device, equipment, medium, and program product provided by the embodiments of the present application obtain the color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet. Since the color rings of different wire harnesses are different, the reference color rings that should exist in the wire harness cabinet can be determined based on the wire harness design information of the wire harness cabinet. Then, the color rings are compared with the reference color rings that should exist in the wire harness cabinet to determine whether there are any missing wire harnesses in the wire harness cabinet. Compared with the existing technology, this method does not require complex algorithms such as feature recognition through high-performance hardware for identification, nor does it require additional professional identification equipment for identification. This method can directly identify whether there are any missing wire harnesses in the wire harness cabinet through the image of the wire harness cabinet, thereby improving the efficiency and convenience of identifying whether the wire harnesses in the wire harness cabinet are correct. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] Figure 1 A schematic diagram of a process flow of a wiring harness identification method provided in an embodiment of the present application;

[0045] Figure 2 A schematic flow chart of another wiring harness identification method provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of a color ring image provided in an embodiment of the present application;

[0047] Figure 4 A schematic flow chart of another wiring harness identification method provided in an embodiment of the present application;

[0048] Figure 5 A schematic flow chart of another wiring harness identification method provided in an embodiment of the present application;

[0049] Figure 6 A schematic structural diagram of a wiring harness identification device provided in an embodiment of the present application;

[0050] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0051] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0053] First, let’s introduce the terms used in this application:

[0054] Color ring: A ring-shaped color strip on a wiring harness or wiring harness connector that uses different colors for detection and differentiation.

[0055] RGB: A color model based on additive color reproduction, creating colors by combining the intensities of red (R), green (G), and blue (B). RGB images are additive, creating colors by combining the intensities of the three channels: red (R), green (G), and blue (B).

[0056] HSV: An intuitive color model that describes color using three components: hue (H), saturation (S), and value (V), more consistent with human perception. HSV images are based on human perception and describe color using three channels: hue, saturation, and value.

[0057] Currently, determining whether the wiring harnesses in a wiring harness cabinet are correctly connected primarily relies on identification using a wire harness identification gun or other specialized equipment. These methods typically require pre-fabricated identification tags on the wire harnesses or the use of additional equipment for auxiliary detection, a cumbersome and inefficient process. On the one hand, the production of identification tags not only increases the manufacturing cost of the wire harnesses but can also lead to identification failures due to damage or detachment of the tags. On the other hand, the use of equipment such as a wire harness identification gun often requires manual scanning of the wire harnesses one by one, which is complex and time-consuming, making it difficult to meet the needs of large-scale, high-efficiency production or maintenance.

[0058] In addition, target detection algorithms (such as the YOLOv4 network) can be used to extract regions of interest (ROIs) for harness recognition. Although this improves the degree of automation of recognition to a certain extent, it places high demands on hardware performance and increases system cost and complexity.

[0059] Alternatively, you can use test probes, diodes, and connector alignment to identify whether the wiring harness in the wiring harness cabinet is correctly connected. However, this method has problems such as cumbersome operation and is not suitable for convenient application in multiple scenarios.

[0060] In view of this, the present application provides a wire harness identification method, which obtains an image of a wire harness cabinet and identifies the color rings of the wire harnesses included in the wire harness cabinet from the image. Based on the different color rings of different wire harnesses, by comparing the color rings of the wire harnesses included in the wire harness cabinet with the reference color rings in the wire harness design information of the wire harness cabinet, it is possible to quickly identify whether there are missing wire harnesses in the wire harness cabinet, thereby improving the efficiency and convenience of identifying whether the wire harnesses in the wire harness cabinet are correct.

[0061] The execution entity of the wire harness identification method can be an electronic device with computing capabilities, such as a computer, tablet computer, server, smartphone, or other electronic device. Alternatively, the execution entity can be hardware with computing capabilities, such as a chip in one of these electronic devices. When the execution entity is an electronic device, a computer program that executes the wire harness identification method can be deployed on the electronic device. By executing this computer program, the color rings of the wire harnesses included in the wire harness cabinet are obtained from an image of the wire harness cabinet, and based on these color rings, the correct wire harnesses in the wire harness cabinet are identified.

[0062] The following describes in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems through specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0063] Figure 1 A schematic diagram of a wiring harness identification method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0064] S101 : Acquire color rings of wire harnesses included in the wire harness cabinet from an image of the wire harness cabinet.

[0065] Among them, different harnesses have different color rings.

[0066] For example, the color blocks included in the color rings of different wiring harnesses may have different colors. For example, assuming that a wiring harness's color ring includes only one color block (of a single color), different wiring harnesses can be distinguished by setting the color block in their color rings to different colors. For example, the color ring of wiring harness 1 includes a red color block, while the color ring of wiring harness 2 includes a green color block.

[0067] Assuming that the color ring of a wiring harness includes multiple color blocks (each color block is a color), for different wiring harnesses, the multiple color blocks in the color ring of each wiring harness can be set to different colors, and the colors and / or color block arrangement order of the multiple color blocks in the color rings of different wiring harnesses can be different. For example, the color ring of wiring harness 1 includes one red color block and one green color block, and the color ring of wiring harness 2 includes one blue color block and one yellow color block, that is, the color blocks of wiring harness 1 and the color ring of wiring harness 2 are different in color. Alternatively, the color ring of wiring harness 1 includes one red color block and one green color block, with the red color block on top and the green color block on the bottom, and the color ring of wiring harness 2 includes one green color block and one red color block, that is, the color rings of wiring harness 1 and wiring harness 2 include one green color block and one red color block, that is, the color blocks of wiring harness 2 and the color rings are different in order.

[0068] The above examples illustrate different color wheel configurations. A wiring harness color wheel can include multiple color blocks and colors, which can be customized based on actual needs. With more colors and blocks, more diverse wiring harnesses can be represented by varying the order of the colors and / or blocks.

[0069] For example, the wiring harness cabinet can be used to connect the output wiring harnesses of an energy storage cabinet. Multiple output wiring harnesses of the energy storage cabinet pass through the connected wiring harness cabinet and are then output to electrical equipment. Alternatively, the wiring harness cabinet can be used in other fields, as long as the wiring harnesses in the wiring harness cabinet have color rings. This application does not impose any restrictions on this.

[0070] The image of the wiring harness cabinet can be, for example, a real-time image acquired by a worker using an image acquisition device, or a pre-acquired image of the wiring harness cabinet obtained from a database, such as an RGB image or an HSV image of the wiring harness cabinet.

[0071] Based on the image of the wiring harness cabinet, the color rings of all the wiring harnesses in the cabinet can be extracted from the image. Each color ring represents a type of wiring harness, and different color rings represent different wiring harnesses. Specifically, color extraction can be used to extract the colors of the various color blocks included in the color ring of each wiring harness from the image of the wiring harness cabinet.

[0072] If the color ring of each wiring harness includes multiple color blocks, the arrangement order of the color blocks in the color ring of each wiring harness can be determined based on the colors of the color blocks included in the color ring of each wiring harness extracted from the image of the wiring harness cabinet.

[0073] S102: Determine whether there is any abnormal wiring harness in the wiring harness cabinet based on the color ring and wiring harness design information of the wiring harness cabinet.

[0074] The wiring harness design information for a wiring harness cabinet includes the reference color rings that should be present within the cabinet. For example, if the cabinet should contain three types of wiring harnesses, each distinguished by a different color ring, the wiring harness design information can include the three color rings corresponding to each type of wiring harness. These three color rings are the reference color rings.

[0075] The wiring harness design information is determined according to the actual function of the wiring harness cabinet and the actual needs when designing the wiring harness line. This application does not impose any restrictions on this. It can be obtained from a relevant database, storage medium, or any other data that stores the wiring harness design information.

[0076] By comparing the color rings of the wire harnesses in the wiring harness cabinet obtained from the image of the wiring harness cabinet with the reference color rings that should be present in the wiring harness cabinet, it is possible to determine whether the wiring harnesses in the wiring harness cabinet have any abnormalities. The abnormalities may include, for example, missing or incorrect wiring harnesses.

[0077] For example, assume that the color rings of the wiring harnesses included in the wiring harness cabinet obtained from an image include color ring 1, which is arranged in sequence with red, green, and blue color blocks; color ring 2, which is arranged in sequence with green, red, and blue color blocks; and color ring 3, which is arranged in sequence with blue, red, and blue color blocks. Meanwhile, the reference color ring includes color ring 1, which is arranged in sequence with red, green, and blue color blocks; color ring 2, which is arranged in sequence with green, red, and blue color blocks; and color ring 4, which is arranged in sequence with red, blue, and red color blocks. By comparison, it can be determined that the wiring harness corresponding to color ring 4 is missing from the wiring harness cabinet, and that the wiring harness corresponding to color ring 3 is present and incorrectly connected.

[0078] Alternatively, assume that the color rings of the wiring harnesses in the wiring harness cabinet, as captured from an image of the wiring harness cabinet, include color ring 1, which is arranged in sequence with red, green, and blue blocks, and color ring 2, which is arranged in sequence with green, red, and blue blocks. Meanwhile, the reference color rings include color ring 1, which is arranged in sequence with red, green, and blue blocks, color ring 2, which is arranged in sequence with green, red, and blue blocks, and color ring 4, which is arranged in sequence with red, blue, and red blocks. By comparing these, the wiring harness corresponding to color ring 4, which is missing from the wiring harness cabinet, can be determined.

[0079] Optionally, after determining whether there is a wiring harness abnormality in the wiring harness cabinet, corresponding prompt information can be output to remind the staff whether there is an abnormality in the wiring harness cabinet, which type of wiring harness abnormality exists, etc.

[0080] The method provided in the embodiment of the present application obtains the color rings of the wire harnesses included in the wiring harness cabinet from an image of the wiring harness cabinet. Since the color rings of different wire harnesses are different, the reference color rings that should exist in the wiring harness cabinet can be determined based on the wiring harness design information of the wiring harness cabinet. The color rings are then compared with the reference color rings that should exist in the wiring harness cabinet to determine whether there are any missing wire harnesses in the wiring harness cabinet. Compared to the existing technology, this method does not require complex algorithms such as feature recognition through high-performance hardware, nor does it require additional professional recognition equipment for recognition. This method can directly identify whether there are any missing wire harnesses in the wiring harness cabinet through the image of the wiring harness cabinet, thereby improving the efficiency and convenience of identifying whether the wire harnesses in the wiring harness cabinet are correct.

[0081] Optionally, before obtaining the color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet, the image of the wire harness cabinet can be subjected to image enhancement and noise reduction processing. For example, image enhancement processing can be performed by histogram equalization, non-local mean filtering enhancement and other methods, and noise reduction processing can be performed by Gaussian noise reduction to improve image quality, thereby improving the accuracy and efficiency of subsequent identification of wire harnesses based on the image.

[0082] Next, a detailed description will be given of how to obtain the color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet in the aforementioned step S101. Figure 2 A flow chart of another wiring harness identification method provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the aforementioned step S101 may specifically include:

[0083] S201: Extracting masks of all colors corresponding to all reference color rings from an image.

[0084] The colors corresponding to all reference color wheels refer to all colors corresponding to all color blocks included in all reference color wheels. For example, the reference color wheels include the following three color wheels: color wheel 1, which has red, green, and blue blocks arranged in sequence; color wheel 2, which has green, red, and blue blocks arranged in sequence; and color wheel 4, which has red, blue, and red blocks arranged in sequence. Therefore, the colors corresponding to all reference color wheels include red, green, and blue.

[0085] Then, each color is used as the color to be extracted as the mask, and the color in the image is identified. During the identification process, the color in the image that is the same as the color currently being extracted as the mask is considered the target color; the color in the image that is different from the color currently being extracted as the non-target color.

[0086] Specifically, whether a pixel is the target color can be determined by checking whether the color value of each pixel is within the color value threshold of the color currently to be masked. For example, if the target color is red, its RGB range is (200, 0, 0) to (255, 50, 50), that is, this range is the color value threshold. If the color value of the pixel is within this range, the pixel is determined to be the target color; otherwise, it is a non-target color. Alternatively, a pre-trained classification model (such as an SVM model, a neural network model, etc.) can be used to determine whether the color value of each pixel is the target color.

[0087] After determining all target colors in the image, a binary image of the same size as the original image can be created, in which the position of each pixel corresponds one-to-one with the original image. In this binary image, the color values ​​of the pixels in the target color area can be set to a first target value (e.g., 1 or 255), and the color values ​​of the pixels in the non-target color area can be set to a second target value (e.g., 0), thereby obtaining a mask of the color to be extracted.

[0088] Through the same process, the masks of each color corresponding to all reference color rings can be extracted from the image.

[0089] Optionally, if the image is a non-HSV image, the image can be converted to a corresponding HSV image first. This is because the hue (H) in the HSV space is independent of the brightness (V), making it more suitable for color-based segmentation. That is, the efficiency and effect of extracting masks corresponding to all colors of the reference color ring from the HSV image are better. For example, if the color space of the image is RGB space, the image can be converted from RGB space to HSV space first, thereby generating the HSV image corresponding to the image. For specific methods of converting images in other color spaces into HSV images, reference can be made to existing technologies and will not be elaborated here.

[0090] Then, based on the HSV image, the masks of the colors corresponding to all reference color wheels are extracted from the HSV image by the above method to improve the efficiency and effect of mask extraction.

[0091] S202 : Obtain the color rings of the wire harnesses included in the wire harness cabinet according to the masks of the respective colors.

[0092] In this step, after obtaining the masks corresponding to the colors extracted from the image of the wiring harness cabinet, the color blocks of different colors can be grouped according to these masks, and each group corresponds to a color ring, thereby obtaining the color ring of the wiring harness included in the wiring harness cabinet.

[0093] Specifically, this step can be implemented through the following sub-steps:

[0094] S2021. Group the masks of each color according to the number of color blocks included in the color ring to obtain a color ring image corresponding to the wiring harness cabinet.

[0095] The number of color blocks included in a color ring refers to the number of color blocks included in a color ring. The number of color blocks included in a color ring is predetermined based on actual needs. For example, if a wiring harness includes 3 color blocks, the number of color blocks included in the color ring is 3.

[0096] In this step, based on each target color in a mask, other target colors in all masks that are located near the target color can be determined. For example, the mask corresponding to green includes two target colors, namely green 1 and green 2. Taking green 1 as an example, other target colors located near green 1 can be determined based on the distance between the area where the target colors in all masks are located and the area where green 1 is located. For example, all other target colors can be sorted, and the first preset number of other target colors can be taken as other target colors located near green 1; or, a distance threshold can be set, and other target colors whose distance to the area where green 1 is located is less than the distance threshold can be taken as other target colors located near green 1, etc. Specifically, for example, the center point of the area where each target color is located can be used as a reference point for measuring distance.

[0097] After determining the other target colors near each target color, the reference point (e.g., the center point) in the region containing the target color can be connected to the reference points (e.g., the center points) in the regions containing the other target colors near the target color based on the number of color blocks included in the color wheel. For example, if the color wheel includes three color blocks, the reference point in the region containing the target color can be connected to the reference points in the regions containing the other two other target colors near the target color.

[0098] Then, a preset angle threshold is used to determine whether the angle between every two connecting lines is greater than or equal to the preset angle threshold. If the angle between every two connecting lines is greater than the preset angle threshold, the multiple target colors corresponding to the number of color blocks are divided into a group; if there is at least one group of two connecting lines with an angle less than the preset angle threshold, the other target colors corresponding to the connecting line are switched, and the new other target colors are used to connect the lines until the angle between every two connecting lines is greater than the preset angle threshold, and the other target colors selected at this time are divided into a group with the target color.

[0099] After completing the grouping of all target colors, the corresponding color wheel image is generated according to the grouping results. Figure 3 This is a schematic diagram of a color ring image provided in an embodiment of the present application. Figure 3 As shown, each column is a group, corresponding to a color ring, and each color ring includes 3 color blocks.

[0100] S2022: Acquire the color rings of the wire harnesses included in the wire harness cabinet according to the color ring image.

[0101] According to the color ring image, each group can be used as a color ring corresponding to a wire harness included in the wire harness cabinet. Figure 3 For example, we can use Figure 3 It is determined that the wiring harness cabinet includes 3 wiring harnesses. The color rings corresponding to the 3 wiring harnesses are: color ring A composed of three color blocks in the order of green, red and blue, corresponding to wiring harness A, color ring B composed of three color blocks in the order of red, green and blue, corresponding to wiring harness B, and color ring C composed of three color blocks in the order of blue, red and blue, corresponding to wiring harness C.

[0102] The method provided in an embodiment of the present application extracts the color masks corresponding to all reference color rings from an image, groups them according to the color masks, and obtains the color rings of the wire harnesses included in the wiring harness cabinet corresponding to each group. This provides a data basis for subsequent comparison and matching of the color rings of the wire harnesses included in the wiring harness cabinet obtained from the image with the reference color rings. Furthermore, this method of extracting the color rings of the wire harnesses included in the wiring harness cabinet from an image does not require identification through complex models, has low hardware performance requirements, and does not require the use of other specialized identification equipment to identify the wire harnesses included in the wiring harness cabinet, thereby improving the convenience and applicability of identifying the wire harnesses included in the wiring harness cabinet.

[0103] Figure 4 A flow chart of another wiring harness identification method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the aforementioned step S201 may specifically include:

[0104] S401: extracting initial masks of all colors corresponding to all reference color rings from the image.

[0105] In this step, the specific method for extracting the initial mask for each color corresponding to all reference color rings from the image can be referred to as the aforementioned step S201, and the implementation method is consistent. The mask for each color corresponding to all reference color rings directly extracted from the image is referred to as the initial mask here simply because it is necessary to perform subsequent noise reduction processing on this initial mask to generate a mask with lower noise, thereby improving the quality of the extracted mask and the efficiency and quality of subsequent identification of the color rings of the wire harnesses in the wiring harness cabinet based on this mask.

[0106] S402: Perform noise reduction processing on the initial mask to obtain masks of various colors.

[0107] Since this image is of a wiring harness cabinet, if there are other objects in the cabinet that share the same color as the color block in the color ring, such as stains on the cabinet or other equipment with the same color as the color block, the initial mask obtained will contain other target color areas outside the color block (i.e., noise in the initial mask). Therefore, it is necessary to perform noise reduction on the initial mask to remove or reduce the impact of this noise on the subsequent determination of the color ring from the mask.

[0108] In this step, the initial mask may be subjected to noise reduction processing by methods such as median filtering, Gaussian filtering, bilateral filtering, and erosion processing to remove noise from the initial mask. The specific methods for performing noise reduction processing on the initial mask by methods such as median filtering, Gaussian filtering, and bilateral filtering can be referred to in the prior art and will not be described in detail here.

[0109] For example, this application provides a detailed introduction on how to perform noise reduction on the initial mask by means of corrosion processing. The implementation method may include the following sub-steps:

[0110] S4021: Perform corrosion processing on the initial mask to obtain an intermediate mask.

[0111] The core of the erosion operation in this step is to define a structuring element (such as a 3×3 rectangular, circular, or cross-shaped template). This structuring element determines the range of the pixel neighborhood examined during the erosion. For example, when a 3×3 rectangular structuring element is selected, the algorithm scans the mask pixel by pixel, replacing the current pixel's value with the minimum value of all pixels in its neighborhood and the corresponding position of the structuring element. If the intersection of any position within the structuring element and the mask is empty (i.e., there is a background pixel in the neighborhood), the current pixel is set to the background value.

[0112] Using a sliding window, the structural element is applied pixel by pixel to the mask, and the minimum value of the neighborhood of each pixel in the mask is calculated. For example, if the current pixel value in the mask is 1 (foreground) and all pixels in its 3×3 neighborhood are 1, the pixel remains 1 after erosion. If any 0 (background) exists in the neighborhood, the pixel is set to 0 after erosion. This process can reduce the foreground area and eliminate isolated noise points.

[0113] For example, it is assumed that the initial mask is a 5×5 binary image, which is shown in the following Table 1:

[0114] Table 1

[0115] 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1

[0116] The 3×3 array of 1s in the upper left corner of Table 1 represents the target color block, and the 1s in the lower right corner represent noise, such as a stain on the wiring harness cabinet in the image that is the same color as the target color. After performing corrosion using a 3×3 rectangular structuring element, the intermediate mask shown in Table 2 is obtained:

[0117] Table 2

[0118] 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

[0119] In this process, the noise 1 in the lower right corner is removed by erosion, but the edge of the target color block is also eroded, reducing the size of the target color block. Therefore, it is necessary to process the intermediate mask through dilation processing in S4022 to restore the size of the target color block.

[0120] S4022: Dilate the intermediate mask to obtain masks of various colors.

[0121] The dilation operation also relies on a structuring element, whose shape and size are the same as those of the erosion operation. During dilation, the algorithm scans the intermediate mask pixel by pixel, replacing the current pixel's value within the intermediate mask with the maximum of all pixel values ​​within its neighborhood and the corresponding position within the structuring element. If the intersection of any position within the structuring element and the mask is non-empty (i.e., there is a foreground pixel in the neighborhood), the current pixel is set to the foreground value.

[0122] Specifically, a sliding window is used to overlay the structural element onto the intermediate mask pixel by pixel, and the maximum value of each pixel's neighborhood is calculated. For example, if the current pixel value is 0 (background) and there is any 1 (foreground) in its 3×3 neighborhood, then the pixel is set to 1 after dilation. This process can expand the foreground area, fill small holes, and connect broken edges.

[0123] Continuing with the intermediate mask shown in Table 2 as an example, through dilation processing, masks of various colors can be obtained. The masks obtained after dilation processing can be shown in the following Table 3:

[0124] Table 3

[0125] 1 1 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0

[0126] The method provided in the embodiment of the present application extracts initial masks of each color corresponding to all reference color rings from an image, performs noise reduction processing on the initial masks, and obtains masks of each color, so as to denoise the noise and noise points in the image that are the same color as each color, reduce or eliminate the noise in the mask extracted from the image, and achieve the effect of removing or reducing the influence of these noises on the subsequent determination of the color ring from the mask, thereby obtaining a high-quality mask, and performing subsequent wire harness recognition based on the high-quality mask, thereby improving the efficiency and accuracy of wire harness recognition.

[0127] In a possible implementation, the wire harness design information may further include a reference position of the wire harness. Figure 5 A flow chart of another wiring harness identification method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, after acquiring the color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet, the method may further include:

[0128] S501: Obtain the target position of each color ring in the color ring image.

[0129] The target position of each color ring may be, for example, the area where the color ring is located, or may be the position of a reference point in the color ring, such as the position of the center point of the color ring.

[0130] The target position of each color ring can be based on the position of each color ring in the color ring image. For example, if the target position of each color ring is the area where the color ring is located, the target position of the corresponding color ring can be determined based on the position of the area in the color ring image (for example, if the color ring is a rectangle, the target position can be represented by the coordinates of the four vertices of the rectangle in the color ring image). If the target position of each color ring is the position of a reference point in the color ring, taking the center point as an example, the target position of the corresponding color ring can be determined based on the position of the center point in the color ring image (that is, the target position of the color ring is represented by the coordinates of its center point in the color ring image).

[0131] Exemplarily, obtaining the target position of each color ring in the color ring image can be achieved by the following sub-steps:

[0132] S5011. Obtain the sub-region occupied by the color ring in the color ring image.

[0133] The subregion occupied by the color ring in the color ring image is the region in the color ring image where the color ring is located. The location and range of the subregion can be determined by obtaining the coordinates of points on the edge of the region in the color ring image.

[0134] S5011. Determine the target location based on the sub-area.

[0135] One possible implementation method is to directly use the sub-region as the target location.

[0136] Another possible implementation method is to use the sub-region to obtain any position within the sub-region as the target position. For example, based on the range of the sub-region, such as the coordinate range corresponding to the range in the color ring image, the coordinates of a specific position within the sub-region can be calculated, and the coordinates can be used as the target position of the color ring. For example, if the sub-region is a rectangle and the coordinates of the center point of the sub-region are calculated, the coordinates of the four vertices of the sub-region can be obtained, and then the coordinates of the center point can be calculated based on the coordinates of the four vertices to obtain the target position.

[0137] S502: If the target position of at least one color ring is different from the reference position of the wiring harness corresponding to the color ring, it is determined that there is a target wiring harness in an incorrect position in the wiring harness cabinet.

[0138] One possible implementation involves numbering the target position of each color ring. Based on the corresponding harness reference position, the system then determines whether the number corresponding to the harness reference position is the same as the number at the target position. If the number at the target position of at least one color ring differs from the number at the harness reference position, this indicates that the harness corresponding to that color ring is incorrectly positioned within the harness cabinet. For example, the harness may be incorrectly wired (e.g., connected in the wrong location, or correctly positioned but with the positive and negative polarity reversed).

[0139] The numbering can be determined based on the colors of the color blocks included in the color wheel and / or the order in which the color blocks are arranged. For example, assuming a color wheel consists of three color blocks, the numbering of the color wheel can be determined at the target location based on the colors of the three color blocks and / or the order in which the color blocks are arranged. For example, the numbering can be one of nine non-repeating numbers: [red, green, blue, green, red, blue, red, blue, green, green, red, green, blue, red, green, red, blue, blue, red, green, blue, green].

[0140] In this case, the number of the target position of each color ring is directly compared with the number of the reference position of the wiring harness. If the number of the target position of at least one color ring is different from the number of the reference position of the wiring harness corresponding to the color ring, it is determined that there is an incorrectly positioned target wiring harness in the wiring harness cabinet.

[0141] Another possible implementation method is to compare the relative positional relationships between multiple reference positions and the relative positional relationships between multiple target positions to determine whether there is a difference between the two. If there is a difference, it is determined that there is an incorrectly positioned target harness in the harness cabinet. Specifically, this implementation method can be achieved through the following steps:

[0142] S5021. Determine a first relative position relationship between the multiple reference positions according to the multiple reference positions of the wiring harnesses corresponding to the multiple color rings.

[0143] The reference positions of a wiring harness are the positions of each wiring harness as specified in the wiring harness design information of the wiring harness cabinet. To determine the first relative positional relationship between multiple reference positions, the reference positions of the wiring harnesses corresponding to multiple color rings are first extracted from the wiring harness design information of the wiring harness cabinet. These reference positions can be expressed as coordinates or relative position parameters within a specific coordinate system.

[0144] The extracted reference positions are then analyzed. By calculating geometric relationships such as distances and angles between different reference positions, their positional relationships are clarified. For example, the horizontal and vertical distances between any two reference positions can be calculated to determine whether they are adjacent left and right, vertically, or have a certain diagonal relationship. The angle between the lines connecting the reference positions can also be calculated to further accurately describe their relative positions. These geometric relationships such as distances and angles are integrated to obtain the first relative position relationship between the multiple reference positions.

[0145] S5022: Determine a second relative position relationship between the multiple target positions according to the target positions of the multiple wire harnesses corresponding to the multiple color rings.

[0146] The target position refers to the actual position of the color ring in the color ring image after the color ring is obtained from the wiring harness cabinet image. First, the target positions of the multiple wiring harnesses corresponding to the multiple color rings in the color ring image need to be obtained. The target positions can be obtained by any of the methods described in step S501 above.

[0147] In this step, the acquired multiple target positions are analyzed, similar to the first relative position relationship determination. Geometric relationships, such as distances and angles, between the different target positions are calculated. For example, the horizontal and vertical distances between any two target positions, as well as the angle between their connecting lines, are calculated. By integrating these geometric relationships, a second relative position relationship between the multiple target positions is obtained.

[0148] S5023: If there is a difference between the first relative position relationship and the second relative position relationship, determine that the target position of at least one color ring is different from the reference position of the wiring harness corresponding to the color ring.

[0149] Since the wiring harnesses in the wiring harness cabinet should be deployed according to the reference position set in the wiring harness design information of the wiring harness cabinet, it is possible to determine whether there are color rings with incorrect relative position relationships based on comparing the first relative position relationship and the second relative position relationship, and then determine the wiring harnesses with incorrect relative position relationships.

[0150] After obtaining the first relative position relationship and the second relative position relationship, the two relative position relationships are compared, wherein the comparison process may compare at least one of geometric relationships such as distance and angle included in the first relative position relationship and the second relative position relationship.

[0151] If the comparison process reveals that the geometric relationships, such as distances and angles, between certain target positions are inconsistent with the corresponding geometric relationships between the corresponding reference positions, a difference between the first relative position relationship and the second relative position relationship can be determined. This means that the target position of at least one color ring does not correspond to the reference position of the corresponding wiring harness, meaning that the target position of at least one wiring harness differs from its corresponding reference position.

[0152] In addition, the specific color rings involved in the inconsistent geometric relationships can be further compared to determine which color rings correspond to which harness positions have deviated.

[0153] The method provided in the embodiment of the present application obtains the target position of each color ring in the color ring image, and compares the target position of the color ring with the reference position of the wiring harness corresponding to the color ring. If the comparison result shows that the target position of at least one color ring is different from the reference position of the wiring harness corresponding to the color ring, it is determined that there is a target wiring harness with an incorrect position in the wiring harness cabinet, thereby improving the efficiency and convenience of identifying whether the wiring harness in the wiring harness cabinet is correct.

[0154] Figure 6 This is a schematic diagram of the structure of a wiring harness identification device provided in an embodiment of the present application. Figure 6 As shown, the wire harness identification device may include: an acquisition module 11 and a processing module 12 .

[0155] The acquisition module 11 is used to acquire the color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet, and different wire harnesses have different color rings.

[0156] The processing module 12 is used to determine whether there is any abnormal wiring harness in the wiring harness cabinet according to the color ring and the wiring harness design information of the wiring harness cabinet, wherein the wiring harness design information of the wiring harness cabinet includes the reference color ring that should exist in the wiring harness cabinet.

[0157] Optionally, the acquisition module 11 is specifically configured to extract the masks of each color corresponding to all reference color rings from the image, and acquire the color rings of the wiring harnesses included in the wiring harness cabinet according to the masks of each color.

[0158] Optionally, the acquisition module 11 is specifically configured to extract the initial masks of each color corresponding to all reference color wheels from the image. The processing module 12 is specifically configured to perform noise reduction processing on the initial masks to obtain masks of each color.

[0159] Optionally, the processing module 12 is specifically configured to perform an erosion process on the initial mask to obtain an intermediate mask, and perform an expansion process on the intermediate mask to obtain masks of various colors.

[0160] Optionally, the acquisition module 11 is further configured to acquire an HSV image corresponding to the image before acquiring the color rings of the wire harnesses in the wire harness cabinet from the image of the wire harness cabinet. The color rings of the wire harnesses in the wire harness cabinet are acquired from the HSV image.

[0161] Optionally, the acquisition module 11 is specifically configured to group the masks of each color according to the number of color blocks included in the color ring, obtain a color ring image corresponding to the wiring harness cabinet, and obtain the color ring of the wiring harness included in the wiring harness cabinet according to the color ring image.

[0162] Optionally, when the wiring harness design information also includes a reference position of the wiring harness, the acquisition module 11 is further configured to obtain the target position of each color ring in the color ring image after acquiring the color rings of the wiring harnesses included in the wiring harness cabinet from the image of the wiring harness cabinet. The processing module 12 is further configured to determine that a target wiring harness is incorrectly positioned in the wiring harness cabinet if the target position of at least one color ring is different from the reference position of the wiring harness corresponding to the color ring.

[0163] Optionally, the acquisition module 11 is specifically configured to acquire a subregion occupied by the color ring in the color ring image, and determine the target position based on the subregion.

[0164] Optionally, the processing module 12 is specifically configured to determine a first relative positional relationship between the plurality of reference positions based on the reference positions of the plurality of wire bundles corresponding to the plurality of color rings. Determine a second relative positional relationship between the plurality of target positions based on the target positions of the plurality of wire bundles corresponding to the plurality of color rings. If there is a difference between the first relative positional relationship and the second relative positional relationship, it is determined that the target position of at least one color ring is different from the reference position of the wire bundle corresponding to the color ring.

[0165] The wiring harness identification device provided in the embodiment of the present application can execute the wiring harness identification method in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.

[0166] Figure 7 The following is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device is used to execute the aforementioned wiring harness identification method, for example, it can be the aforementioned electronic device. Figure 7 As shown, the electronic device 700 may include: at least one processor 701 , a memory 702 , and a communication interface 703 .

[0167] The memory 702 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.

[0168] The memory 702 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0169] The processor 701 is configured to execute computer-executable instructions stored in the memory 702 to implement the method described in the aforementioned method embodiment. The processor 701 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0170] The processor 701 can communicate and interact with external devices via the communication interface 703. The external devices may be, for example, the aforementioned database. In a specific implementation, if the communication interface 703, memory 702, and processor 701 are implemented independently, the communication interface 703, memory 702, and processor 701 may be interconnected via a bus to enable communication between them. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, control buses, etc., but this does not mean that there is only one bus or only one type of bus.

[0171] Optionally, in a specific implementation, if the communication interface 703, the memory 702 and the processor 701 are integrated on a chip, the communication interface 703, the memory 702 and the processor 701 can complete communication through an internal interface.

[0172] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0173] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0174] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0175] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in a device as discrete components.

[0176] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.

[0177] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0178] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0179] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0180] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0181] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.

Claims

1. A wire harness identification method, characterized in that: The method comprises: Obtaining color rings of the wire harnesses included in the wire harness cabinet from the image of the wire harness cabinet, where different wire harnesses have different color rings; Determine whether there is a wiring harness abnormality in the wiring harness cabinet according to the color ring and wiring harness design information of the wiring harness cabinet, wherein the wiring harness design information of the wiring harness cabinet includes a reference color ring that should exist in the wiring harness cabinet.

2. The method according to claim 1, characterized in that The step of obtaining the color ring of the wire harness included in the wire harness cabinet from the image of the wire harness cabinet includes: Extracting masks of all colors corresponding to the reference color rings from the image; The color rings of the wire harnesses included in the wire harness cabinet are obtained according to the masks of the respective colors.

3. The method according to claim 2, characterized in that Extracting masks of all colors corresponding to the reference color rings from the image includes: Extracting initial masks of the colors corresponding to all the reference color circles from the image; Noise reduction processing is performed on the initial mask to obtain the mask of each color.

4. The method according to claim 3, characterized in that The performing noise reduction processing on the initial mask to obtain the mask of each color includes: Performing an erosion process on the initial mask to obtain an intermediate mask; Dilation processing is performed on the intermediate mask to obtain the mask of each color.

5. The method according to any one of claims 1 to 4, characterized in that Before acquiring the color rings of the wire harnesses in the wire harness cabinet from the image of the wire harness cabinet, the method further includes: Obtaining an HSV image corresponding to the image according to the image; The step of obtaining the color ring of the wire harness included in the wire harness cabinet from the image of the wire harness cabinet includes: The color ring of the wire harness included in the wire harness cabinet is acquired from the HSV image.

6. The method according to claim 2, characterized in that The step of obtaining the color ring of the wire harness in the wire harness cabinet according to the mask of each color includes: Grouping the masks of the respective colors according to the number of color blocks included in the color ring to obtain a color ring image corresponding to the wiring harness cabinet; The color ring of the wire harness included in the wire harness cabinet is acquired according to the color ring image.

7. The method according to claim 6, characterized in that The wiring harness design information also includes a reference position of the wiring harness. After obtaining the color ring of the wiring harness included in the wiring harness cabinet from the image of the wiring harness cabinet, the method further includes: Obtaining a target position of each color ring in the color ring image; If the target position of at least one of the color rings is different from the reference position of the wiring harness corresponding to the color ring, it is determined that there is a target wiring harness with an incorrect position in the wiring harness cabinet.

8. The method according to claim 7, characterized in that The obtaining of the target position of each color ring in the color ring image includes: Acquire the subregion occupied by the color ring in the color ring image; The target position is determined according to the sub-area.

9. The method according to claim 8, characterized in that Also includes: Determining a first relative positional relationship between the plurality of reference positions according to the plurality of reference positions of the wiring harnesses corresponding to the plurality of color rings; determining a second relative positional relationship between the plurality of target positions according to the target positions of the plurality of wire harnesses corresponding to the plurality of color rings; If there is a difference between the first relative position relationship and the second relative position relationship, it is determined that the target position of at least one of the color rings is different from the reference position of the wiring harness corresponding to the color ring.

10. A wire harness identification device, characterized in that: The device comprises: An acquisition module, configured to acquire color rings of the wiring harnesses included in the wiring harness cabinet from an image of the wiring harness cabinet, where different wiring harnesses have different color rings; The processing module is used to determine whether there is a wiring harness abnormality in the wiring harness cabinet according to the color ring and the wiring harness design information of the wiring harness cabinet, wherein the wiring harness design information of the wiring harness cabinet includes a reference color ring that should exist in the wiring harness cabinet.

11. An electronic device, characterized in that: include: A processor and a memory; the processor is communicatively connected to the memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.

13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when the computer program is executed by a processor.