Method, system, device and medium for identifying circuit connection relationship

By using the object detection model in electrical experiments to identify the devices and wires in the experimental circuit image, and compute the cross-over to screen the wiring posts, the misjudgment problem of wire connection relationship recognition is solved and the accuracy of the circuit connection relationship is improved.

CN118135294BActive Publication Date: 2024-11-22SHANGHAI XIDING IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410206019.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-26
Publication Date
2024-11-22
Estimated Expiration
2044-02-26

AI Technical Summary

Technical Problem

In electrical experiments, due to the random arrangement of experimental devices and the length of conductors, it is more difficult to judge the connection relationship between experimental devices connected to both ends of conductors. The existing methods are prone to misjudgment, especially when the experimental devices are placed close to each other, the wrong wiring is The post may be misidentified as a terminal connecting to the wire.

Method used

By obtaining the experimental circuit image and inputting it to the target detection model (such as the YOLO series model), the experimental devices, wires and terminals are identified, the intersection ratio between the conductors and terminals are calculated, the terminals connected to the conductors are screened, and the terminals connected to the conductors are selected according to the wiring The positional relationship between the column and the wire determines the connection relationship and forms a circuit loop.

Benefits of technology

Significantly improve the accuracy of circuit connection relationship identification, and can accurately infer the correct combination of terminals at both ends of the wire in conventional or unconventional experimental device layout, break traditional constraints, realize the connection between any terminal and two wires, and restore the circuit connection. Multiple possibilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135294B_ABST
    Figure CN118135294B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device and medium for identifying circuit connection relations, the method comprising: obtaining an experimental circuit image; inputting the experimental circuit image into a target detection model, identifying various experimental devices, wires and terminals connected to the wires appearing in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wires, and the target detection model is a YOLO series model; for each wire: calculating the intersection-and-joint ratio of the wire and each terminal, and filtering out the terminals connected to the wire according to the calculated intersection-and-joint ratio; determining the experimental device connected to the terminal based on the filtered terminals; connecting the identified terminals, experimental devices and wires according to their respective connection relations to form a circuit loop. The accuracy of circuit connection relationship identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of circuit detection, and in particular to a method, system, device and medium for identifying circuit connection relations. Background Art

[0002] In electrical experiments, the arrangement of experimental devices is often relatively random, and sometimes these experimental devices are placed very close to each other. In addition, the wires may be relatively long, which causes the long wires to visually pass through multiple experimental devices, increasing the difficulty of judging the experimental devices connected to the two ends of the wires, that is, it becomes more difficult to determine the connection relationship between the experimental devices. The current solution to this problem is to select the farthest pair of terminals from the multiple terminals identified in the wire identification frame, and determine them as the terminals actually connected to the wire. However, this method has limitations: when two experimental devices are placed very close, the wrong terminal may intersect with the wire identification frame, causing it to be mistakenly identified as the terminal connected to the other end of the wire, resulting in a misjudgment. Therefore, it is necessary to provide a method, system, device and medium for identifying circuit connection relationships. Summary of the invention

[0003] The present invention provides a method for identifying circuit connection relationships, so as to solve the problem of inaccurate connection identification of various experimental devices in an experimental circuit image in the prior art.

[0004] The present invention provides a method for identifying circuit connection relationships, comprising: acquiring an experimental circuit image; inputting the experimental circuit image into a target detection model to identify various experimental devices, wires, and terminals connected to the wires that appear in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wires, and the target detection model is a YOLO series model; for each wire: calculating the intersection-and-joint ratio of the wire and each terminal, and screening out the terminals connected to the wire based on the calculated intersection-and-joint ratio; based on the screened terminals, determining the experimental device connected to the terminal; and connecting the identified terminals, experimental devices, and wires according to their respective connection relationships to form a circuit loop.

[0005] In one embodiment of the present invention, the method of calculating the intersection-and-parallel ratio of the wire and each terminal, and screening out the terminals connected to the wire based on the calculated intersection-and-parallel ratio, includes: calculating the intersection-and-parallel ratio of the wire and each terminal, screening out the terminals corresponding to the intersection-and-parallel ratio greater than a preset intersection-and-parallel ratio threshold, and judging the number of the screened terminals: if the number of the terminals is equal to 2, all the screened terminals are used as the terminals connected to the wire; if the number of the terminals is greater than 2, based on the position of each screened terminal relative to the identified wire, the terminals connected to the wire are screened out.

[0006] In one embodiment of the present invention, the filtering out of the terminals connected to the wire based on the position of each filtered terminal relative to the identified wire includes: traversing all the filtered terminals, and filtering out one or more terminal combinations that are symmetrical about the center of the wire according to the position of the wire; judging the number of terminal combinations: if the number of terminal combinations is one, then using two terminals in the terminal combination as terminals connected to the wire; if the number of terminal combinations is not one, then for each terminal combination: calculating the weight of the terminal combination according to the intersection of the two terminals and the wire, and the distance between the terminals; and selecting two terminals in the terminal combination with the largest weight as terminals connected to the wire.

[0007] In one embodiment of the present invention, the weight of the terminal combination is calculated based on the intersection of each terminal and the wire, and the distance between the terminals, including: calculating the intersection of two terminals and the wires respectively; calculating the ratio of the intersection to the corresponding terminal as the first ratio and the second ratio of the terminal combination; calculating the distance between the two terminals; and taking the product of the first ratio, the second ratio and the distance as the weight of the terminal combination.

[0008] In one embodiment of the present invention, the method of determining the experimental device connected to the terminal based on the screened terminal includes: traversing all identified experimental devices, and for each experimental device: calculating the intersection and conjunction ratios of the experimental device and each screened terminal, determining whether each calculated intersection and conjunction ratio is greater than a preset threshold, and analyzing the number of intersection and conjunction ratios greater than the threshold: if there is one intersection and conjunction ratio greater than the preset threshold, determining that the experimental device is connected to the corresponding terminal; if there are multiple intersection and conjunction ratios greater than the preset threshold, determining that the experimental device is connected to the two terminals with the largest intersection and conjunction ratios.

[0009] In one embodiment of the present invention, the target detection model is a YOLOv5 model.

[0010] In an embodiment of the present invention, after forming the circuit loop, the method further includes: marking the circuit loop in the experimental circuit image.

[0011] In one embodiment of the present invention, a circuit connection relationship recognition system is also provided, the system comprising: an image acquisition module for acquiring an experimental circuit image; a device recognition module for inputting the experimental circuit image into a target detection model to identify each experimental device, wire, and terminal connected to the wire appearing in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wire, and the target detection model is a YOLO series model; a terminal screening module for calculating the intersection-and-joint ratio of the wire and each terminal for each wire, and screening out the terminals connected to the wire based on the calculated intersection-and-joint ratio; an experimental device screening module for determining the experimental device connected to the terminal based on the screened terminals; and a circuit connection module for connecting the identified terminals, experimental devices, and wires according to their respective connection relationships to form a circuit loop.

[0012] In one embodiment of the present invention, an electronic device is also provided, comprising: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements any of the above-mentioned methods for identifying circuit connection relationships.

[0013] In one embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes any of the above-mentioned methods for identifying a circuit connection relationship.

[0014] The present invention proposes a method, system, device and medium for identifying circuit connection relationships. By inputting an experimental circuit image into a target detection model, all terminals, experimental equipment and wires appearing in the image can be accurately identified. By calculating the intersection-and-union ratio between the wires and the terminals, the terminals that are actually connected to the wires can be effectively screened out, and by analyzing the connection relationship between these terminals and the corresponding experimental devices, the connection mode of the circuit can be further determined. According to the connection relationship between each terminal, experimental device and wire, the construction of the connection relationship of each experimental device is realized, thereby significantly improving the accuracy of circuit connection relationship recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A schematic flow chart of a method for identifying a circuit connection relationship provided by an embodiment of the present invention;

[0016] Figure 2 A schematic diagram showing an experimental circuit image provided by an embodiment of the present invention;

[0017] Figure 3 A schematic diagram showing various experimental devices marked in an experimental circuit image provided by an embodiment of the present invention;

[0018] Figure 4 Shown is a structural block diagram of a circuit connection relationship recognition system provided by an embodiment of the present invention;

[0019] Figure 5 Shown is a structural schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0021] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0022] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0023] In electrical experiments, there are often multiple wires and various experimental devices. In order to determine the connection relationship of the circuit, the core is to accurately determine the connection relationship and direction of the wires between the experimental devices. However, in real scenarios, due to the different lengths of the wires, longer wires are more likely to overlap, which greatly increases the difficulty of distinguishing the connection relationship between the wires of various experimental devices. The inventor found that usually only the terminal on the voltmeter can be used as a parallel point to achieve the connection of two wires on one terminal. In addition to the voltmeter, the terminals on other experimental devices can usually only be connected to a single wire. The existing circuit analysis method can only verify whether the voltmeter is connected in parallel, and it is impossible to distinguish a variety of wrong connection methods. Furthermore, when a wire intersects with more than two terminals, the current circuit analysis method often tends to select the terminal combination with the farthest distance as the terminal connected to the wire. However, if the ratio of the intersection area to the terminal area is small, it means that the terminal is not actually connected to the wire, and this judgment method is prone to misjudgment.

[0024] In order to solve the above problems, the present invention provides a method for identifying circuit connection relationships. The experimental circuit image is input into the target detection model, and all the terminals, experimental equipment and wires appearing in the image can be accurately identified. By using the intersection-and-union ratio between the wires and the terminals, a variety of possible terminal combinations are obtained, and the terminal combinations that are actually connected to the wires are screened out. By analyzing the connection relationship between these terminals and the corresponding experimental devices, the connection mode of the circuit can be further determined. According to the connection relationship between each terminal, experimental device and wire, the construction of the connection relationship of each experimental device is realized, which greatly improves the accuracy of circuit connection relationship recognition. Whether in conventional or unconventional experimental device layouts, the inference mechanism of the present invention can accurately infer the correct terminal combination at both ends of the wire, breaking the traditional constraint that only the voltmeter terminal can be connected to two wires, and realizing that any terminal can be connected to two wires, and can restore multiple possibilities of circuit connection.

[0025] See also Figure 1 , the identification of circuit connection relationship includes the following steps:

[0026] S1. Obtain the experimental circuit image.

[0027] The experimental circuit image refers to a real circuit image formed by the interconnection between the terminals and wires on the experimental device. Figure 2As shown, the circuit image can include a power supply, a sliding rheostat, an ammeter, a light bulb, a voltmeter and a switch connected in sequence. The experimental circuit image can be obtained by an image capture device (such as a high-resolution camera) or a video capture device (such as a camera), which is not limited here. Preferably, in order to realize real-time analysis of the image, in the present invention, a video capture device is used to obtain the experimental circuit image, and a target detection model is used to perform real-time analysis on the video stream, so as to identify the connection relationship of each experimental device in real time. When using an image capture device, a high-definition picture of the circuit can be directly captured to obtain the experimental circuit image. When using a video capture device, it is necessary to extract the required video frames from the captured video to obtain the experimental circuit image. Among them, the video frame can be obtained by extracting it frame by frame from the video, or by extracting key frames, sampling at specific time intervals, etc., which is not limited here.

[0028] S2. Input the experimental circuit image into the target detection model to identify each experimental device, wire, and terminal connected to the wire that appear in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wire, and the target detection model is a YOLO series model.

[0029] The experimental circuit image is input into the trained target detection model. By analyzing the entire experimental circuit image, various pre-defined experimental devices, terminals connected to the wires, and wires presented in the experimental circuit image can be identified. The identified objects are represented by identification frames and corresponding category labels. Among them, the identification frame is used to define the specific position and range of the identified object in the image, and the identification frame often circles each identified object in the form of a rectangular frame. Further, the category labels of the experimental devices in the present invention include but are not limited to voltmeters, ammeters, power supplies, sliding rheostats, resistors, capacitors, etc. The terminal refers to an electrical connection point on the experimental device, and its category label includes but is not limited to red terminals, black terminals, large-range and small-range terminals of the meter, upper and lower connection terminals of the sliding rheostat, etc. In the present invention, it is assumed that each experimental device has at most two terminals connected to the wires. It should be noted that in the present invention, all the terminals mentioned are terminals that have been connected to the wires. The wire is an electrical conductor used to connect different terminals. In the present invention, the target detection model is adapted to all models trained under the YOLO framework, including but not limited to YOLOv5, YOLOv8, YOLOX, etc. Preferably, in order to improve the efficiency and accuracy of circuit image analysis and adapt to the recognition requirements of various specific circuit experimental devices and configurations, in one embodiment of the present invention, the target detection model is a YOLOv5 model.

[0030] For example, Figure 2 Input to the target detection model and get Figure 3The results of various recognition objects are shown. Specifically, the target detection model recognizes Figure 2 The experimental devices include power supply, sliding rheostat, light bulb, switch, ammeter and voltmeter. The wires are L1, L2, L3, L4, L5, L6, L7, and the terminals connected to the wires are a, b, c, d, e, f, g, h, i, j, k, m.

[0031] S3. For each conductor: calculate the intersection-and-parallel ratio between the conductor and each terminal, and select the terminal connected to the conductor based on the calculated intersection-and-parallel ratio.

[0032] Through the target detection model, each wire and each terminal are identified from the experimental circuit image. For each wire identification frame identified: the intersection over union (IoU) of the current wire identification frame and the identification frame of each terminal is calculated. This IoU is used to indicate the degree of overlap between the wire and the terminal in space. Then, based on the calculated IoU, the terminals that may have a connection relationship with the wire are screened out, where the IoU of the wire identification frame and the terminal identification frame refers to the ratio of the intersection area of ​​the wire identification frame and the terminal identification frame to the union area of ​​the wire identification frame and the terminal identification frame. It should be noted that after the screening is completed, if multiple wires are connected to the same terminal at the same time, it means that the terminal is a parallel point. In this way, not only the accuracy of circuit connection relationship identification is improved, but also the parallel and series configuration relationship in the circuit can be more clearly understood.

[0033] For example, for the wire identification frame A, let its area be S A , the identification box B of the terminal, let its area be S B , then the intersection area of ​​the two is S 交集面积 is the area of ​​the overlapping area of ​​the two recognition boxes. The union area of ​​the two is the difference between the area of ​​each recognition box and the intersection area, that is, S A +S B -S 交集面积 . Calculate the ratio of the intersection area to the union area, which is the intersection-to-union ratio of the wire's identification box and the terminal's identification box. Obviously, if the two do not overlap, the intersection area is 0, indicating that there is no direct connection between the wire and the terminal. On the contrary, if the intersection area is large, the intersection-to-union ratio will increase accordingly, indicating that the wire and the terminal have a high spatial overlap, indicating that there may be a connection between them. By calculating the intersection-to-union ratio, it is possible to preliminarily screen out the terminals that may have a connection with the wire.

[0034] In one embodiment of the present invention, the calculating of the intersection-and-parallel ratios of the wires and the respective terminals, and selecting the terminals connected to the wires according to the calculated intersection-and-parallel ratios, includes:

[0035] Calculate the I / O ratio of the wire and each terminal, select the terminals whose I / O ratio is greater than the preset I / O ratio threshold, and determine the number of selected terminals:

[0036] If the number of terminals is equal to 2, all the selected terminals are used as terminals connected to the wires;

[0037] If the number of the terminals is greater than 2, the terminals connected to the wires are screened out based on the position of each screened terminal relative to the identified wires.

[0038] For each wire, by calculating the intersection-and-division ratio of the wire's identification frame and the identification frame of each terminal, several terminals whose intersection-and-division ratio is greater than the intersection-and-division ratio threshold (such as 0) are analyzed and screened out, so that among all the identified terminals, several terminals that may be actually connected to the wire are selected. The number of screened terminals is determined. If the number of screened terminals is 1, it means that the wire is only connected to one terminal, or although the wire is connected to two terminals, only one terminal is identified. This situation is not considered as a valid wire connection combination. If two terminals are screened out, it is considered that the two terminals are directly connected to the wire. If the number of screened terminals exceeds two, it means that the experimental devices are placed close to each other, causing a wire to pass through several relatively closely arranged terminals. In this case, it is necessary to determine which terminals are actually connected to the wire based on the position of each terminal relative to the wire.

[0039] In one embodiment of the present invention, the step of selecting the binding posts connected to the wires based on the positions of each of the selected binding posts relative to the identified wires includes:

[0040] Traversing all the selected binding posts, and selecting all one or more binding post combinations that are symmetrical about the center of the wire according to the position of the wire;

[0041] Determine the number of terminal combinations:

[0042] If the number of the terminal combination is one, two terminals in the terminal combination are used as terminals connected to the wires;

[0043] If the number of terminal combinations is not one, for each terminal combination: calculate the weight of the terminal combination based on the intersection of two terminals and the wires, and the distance between the terminals; and select the two terminals in the terminal combination with the largest weight as the terminals connected to the wires.

[0044] When the number of the selected binding posts (i.e., the binding posts whose intersection-and-parallel ratio is greater than the intersection-and-parallel ratio threshold) exceeds two, in this case, first traverse all the selected binding posts, and divide the binding posts into four different areas: located at the upper left of the wire, located at the lower left of the wire, located at the upper right of the wire, and located at the lower right of the wire according to the relative position of the identification frame of each binding post and the identification frame of the wire. Among them, the relative position of the identification frame of the binding post and the identification frame of the wire is determined by calculating the center coordinates of the identification frame of the binding post and the center coordinates of the identification frame of the wire. Select two binding posts located in the diagonal area (i.e., the upper left and lower right or the upper right and lower left) to form a binding post combination. Determine the number of binding post combinations: If there is only one binding post combination, it means that only one pair of binding posts meets the condition of direct connection with the wire, and this pair of binding posts can be used as the binding posts connected to the wire. On the contrary, if there are multiple binding post combinations, further analysis is required to determine which combination is actually connected to the wire. Specifically, for each binding post combination: a weight is calculated based on the intersection of the two binding posts and the wire and the distance between the binding posts. This weight is intended to evaluate the possibility of a terminal combination being connected to a wire, wherein the intersection of a terminal and a wire reflects the spatial relationship between the terminal and the wire, and the distance between the terminals can accurately evaluate the rationality of the combination. Finally, the terminal combination with the largest weight is selected, and the two terminals in the combination are determined to be the terminals directly connected to the wire. In the present invention, considering that the terminals that are actually connected to the wire are often not adjacent to each other in space, but are distributed in different areas on both sides of the wire, the selection of diagonally distributed terminals can effectively reduce the misjudgment caused by the close proximity of the wire to multiple terminals, thereby improving the accuracy of connection identification.

[0045] In one embodiment of the present invention, the weight of the binding post combination is calculated based on the intersection of each binding post and the wire, and the distance between the binding posts, including:

[0046] Calculate the intersection of the two terminals and the wire separately;

[0047] Calculate the ratio of the intersection to the corresponding terminal as the first ratio and the second ratio of the terminal combination;

[0048] Calculate the distance between two binding posts;

[0049] The product of the first ratio, the second ratio and the distance is used as the weight of the terminal combination.

[0050] Analyze each terminal combination: calculate the intersection of each terminal and wire in the combination, where the intersection refers to the area of ​​the overlapping area of ​​the identification frame of the terminal and the identification frame of the wire. Then calculate the ratio of the intersection of each terminal and its own identification frame to generate two ratios: a first ratio and a second ratio, which correspond to the two terminals in the combination. Calculate the straight-line distance between the center points of the two terminal identification frames to determine the physical distance between the two. Multiply the first ratio, the second ratio and the distance between the terminals, and the product obtained is used as the weight of the entire terminal combination. In the present invention, it is considered that the terminals at both ends of the wire are generally located on the diagonal of the wire identification frame, and these terminals have a large overlap area relative to the wire identification frame. In this case, the terminal combination screened according to the weight is basically consistent with the actual situation. In this way, the calculated weight combines the degree of interaction between the terminal and the wire and the distance between the terminals, thereby providing a comprehensive evaluation index for each terminal combination to determine which terminal combination is most likely to be actually connected to the wire.

[0051] For example, the two terminals in the terminal combination are A and B. total is the total area of ​​terminal A, B total is the total area of ​​terminal B, D AB is the distance between terminal A and terminal B, and the intersection area of ​​terminal A and the wire is recorded as S' A , the intersection area of ​​terminal B and the wire is recorded as S' B . Then the first ratio of the terminal combination is Ratio A For S' A / A total , the second ratio Ratio B For S' B / B total , the weight W of the terminal combination is Ratio A *Ratio B *D AB .

[0052] As a specific example, Figure 3As shown, taking the wire L6 as an example, the terminals j and k are located in the upper left area of ​​the wire L6, the terminal h is located in the lower right area of ​​the wire L6, and the intersection-and-parallel ratio of the wire L6 and the three terminals j, k, and h is greater than the intersection-and-parallel ratio threshold. Therefore, the terminal combinations constituting the wire L6 are (j, h) and (k, h). Analysis (j, h): Calculate the intersection S1 of the identification box area of ​​the terminal j and the identification box area of ​​the wire L6, as well as the intersection S2 of the identification box area of ​​the terminal h and the identification box area of ​​the wire L6, and the distance D1 between the two terminals j and h. Further, based on the above calculation results, the ratio of the intersection area S1 to the identification box area of ​​the terminal j is calculated as Rj, and the ratio of the intersection area S1 to the identification box area of ​​the terminal h is calculated as Rh, then the weight of the combination is Rj*Rh*D1. Similarly, the weight of the terminal combination (k, h) is Rk*Rh*D2, where D2 is the distance between the terminals k and h. Since the intersection of terminal j and wire L6 is greater than the intersection of terminal k and wire L6, the weight of (j, h) is greater than the weight of (k, h), so (j, h) is selected as the terminal connected to wire L6. Obviously, in this way, the probability of misjudging the wire as being connected to a terminal when the wire passes through a terminal but is not actually connected to the terminal can be reduced.

[0053] S4. Based on the screened terminals, determine the experimental devices connected to the terminals.

[0054] Specifically, in one embodiment of the present invention, the step of determining the experimental device connected to the terminal based on the screened terminal includes:

[0055] Traverse all identified experimental devices, and for each experimental device:

[0056] Calculate the I / O ratio of the experimental device and each selected terminal, determine whether each calculated I / O ratio is greater than a preset threshold, and analyze the number of I / O ratios greater than the threshold:

[0057] If there is an intersection-to-parallel ratio greater than a preset threshold, it is determined that the experimental device is connected to the corresponding terminal;

[0058] If there are multiple cross-parallel ratios greater than the preset threshold, it is determined that the experimental device is connected to the two terminals with the largest cross-parallel ratios.

[0059] Traverse all experimental devices identified in the experimental circuit image, and for each experimental device: calculate the intersection and parallel ratio between the identification frame of the experimental device and the identification frame of each screened terminal, so as to evaluate the degree of spatial overlap between the experimental device and the terminal. Determine whether the calculated intersection and parallel ratio is greater than a preset threshold (such as 0), and analyze the number of all intersection and parallel ratios greater than the threshold, wherein the threshold is used to determine which degree of spatial overlap is considered a valid connection. When the number of intersection and parallel ratios greater than the threshold is one, it means that the experimental device is connected to this terminal. If the intersection and parallel ratio of multiple terminals is greater than the threshold, since it is assumed in the present invention that there are at most two terminals in each experimental equipment, the two terminals with the largest intersection and parallel ratio will be screened out as the connection with the experimental device. It should be noted that in the present invention, the connection relationship between each experimental device and the wire and terminal is established based on the following assumption: when there are experimental devices at both ends of the wire, two different terminals are connected at both ends of the wire.

[0060] S5. Connect the identified terminals, experimental devices and wires according to their respective connection relationships to form a circuit loop.

[0061] Starting from the power supply, the identified terminals, experimental devices and wires are connected according to their respective connection relationships to form a complete circuit loop. If the wire is connected to only one end, or there is only one terminal on the experimental device, the path ends. The experimental device connected to the circuit is obtained from the path, thereby realizing accurate identification of the experimental device in the experimental circuit image. For the convenience of characterization, in one embodiment of the present invention, after forming the circuit loop, it also includes: marking the circuit loop in the experimental circuit image.

[0062] See also Figure 4 , the circuit connection relationship recognition system 100 includes: an image acquisition module 110, a device recognition module 120, a terminal screening module 130, an experimental device screening module 140 and a circuit connection module 150. The image acquisition module 110 is used to acquire an experimental circuit image. The device recognition module 120 inputs the experimental circuit image into the target detection model to identify each experimental device, wire and terminal connected to the wire appearing in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wire, and the target detection model is a YOLO series model. The terminal screening module 130 is used for each wire: calculating the intersection and union ratio of the wire and each terminal, and filtering out the terminal connected to the wire according to the calculated intersection and union ratio. The experimental device screening module 140 determines the experimental device connected to the terminal based on the screened terminals. The terminals, experimental devices and wires identified by the circuit connection module 150 are connected according to their respective connection relationships to form a circuit loop.

[0063] For the specific definition of the circuit connection relationship identification system, please refer to the definition of the circuit connection relationship identification method above, which will not be repeated here. Each module in the above circuit connection relationship identification system can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in hardware format, or stored in the memory of the computer device in software format, so that the processor can call the operations corresponding to the above modules.

[0064] It should be noted that, in order to highlight the innovative part of the present invention, the present embodiment does not introduce modules that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other modules in the present embodiment.

[0065] See also Figure 5 The electronic device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a circuit connection relationship recognition program.

[0066] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 12 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 12 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 1, such as codes for identifying circuit connection relationships, etc., but can also be used to temporarily store data that has been output or is to be output.

[0067] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 1, and uses various interfaces and lines to connect the various components of the entire electronic device 1, and executes or executes programs or modules (such as circuit connection relationship recognition programs, etc.) stored in the memory 12, and calls the data stored in the memory 12 to execute various functions of the electronic device 1 and process data.

[0068] The processor 13 executes the operating system and various installed application programs of the electronic device 1. The processor 13 executes the application programs to implement the steps in the above-mentioned circuit connection relationship identification method.

[0069] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an image acquisition module 110, a device identification module 120, a terminal screening module 130, an experimental device screening module 140, and a circuit connection module 150.

[0070] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium, and the computer-readable storage medium can be non-volatile or volatile. The above-mentioned software function module is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to perform part of the functions of the circuit connection relationship identification method described in each embodiment of the present application.

[0071] In summary, the present invention discloses a method, system, device and medium for identifying circuit connection relationships. By inputting an experimental circuit image into a target detection model, all terminals, experimental equipment and wires appearing in the image can be accurately identified. By calculating the intersection-and-union ratio between the wires and the terminals, the terminals that are actually connected to the wires can be effectively screened out, and by analyzing the connection relationship between these terminals and the corresponding experimental devices, the connection mode of the circuit can be further determined. According to the connection relationship between each terminal, experimental device and wire, the connection relationship of each experimental device is constructed, thereby significantly improving the accuracy of circuit connection relationship identification. The present invention effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.

[0072] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for identifying a circuit connection relationship, characterized in that: The method comprises: Get the experimental circuit image; Input the experimental circuit image into the target detection model, identify each experimental device, wire, and terminal connected to the wire appearing in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wire, and the target detection model is a YOLO series model; For each wire: calculate the intersection-and-parallel ratio between the wire and each terminal, and select the terminal connected to the wire based on the calculated intersection-and-parallel ratio; Based on the screened binding posts, determine the experimental devices connected to the binding posts; Connect the identified terminals, experimental devices and wires according to their respective connection relationships to form a circuit loop; The calculating the intersection-and-parallel ratio of the wire and each terminal, and selecting the terminal connected to the wire according to the calculated intersection-and-parallel ratio, includes: Calculate the I / O ratio of the wire and each terminal, filter out the terminals whose I / O ratio is greater than the preset I / O ratio threshold, and determine the number of filtered terminals: If the number of terminals is equal to 2, all the selected terminals are used as terminals connected to the wires; If the number of the terminals is greater than 2, the terminals connected to the wires are screened out based on the position of each screened terminal relative to the identified wires.

2. The method for identifying a circuit connection relationship according to claim 1, characterized in that: The step of selecting the binding posts connected to the wires based on the position of each selected binding post relative to the identified wires comprises: Traversing all the selected binding posts, and selecting all one or more binding post combinations that are symmetrical about the center of the wire according to the position of the wire; Determine the number of terminal combinations: If the number of the terminal combination is one, two terminals in the terminal combination are used as terminals connected to the wires; If the number of terminal combinations is not one, for each terminal combination: calculate the weight of the terminal combination based on the intersection of two terminals and the wires, and the distance between the terminals; and select the two terminals in the terminal combination with the largest weight as the terminals connected to the wires.

3. The method for identifying a circuit connection relationship according to claim 2, characterized in that: The weight of the binding post combination is calculated based on the intersection of each binding post and the wire, and the distance between the binding posts, including: Calculate the intersection of the two terminals and the wire separately; Calculate the ratio of the intersection to the corresponding terminal as the first ratio and the second ratio of the terminal combination; Calculate the distance between two binding posts; The product of the first ratio, the second ratio and the distance is used as the weight of the terminal combination.

4. The method for identifying a circuit connection relationship according to claim 1, characterized in that: The step of determining the experimental device connected to the binding post based on the screening binding post comprises: Traverse all identified experimental devices, and for each experimental device: Calculate the I / O ratio of the experimental device and each selected terminal, determine whether each calculated I / O ratio is greater than a preset threshold, and analyze the number of I / O ratios greater than the threshold: If there is an intersection-to-parallel ratio greater than a preset threshold, it is determined that the experimental device is connected to the corresponding terminal; If there are multiple cross-parallel ratios greater than the preset threshold, it is determined that the experimental device is connected to the two terminals with the largest cross-parallel ratios.

5. The method for identifying a circuit connection relationship according to claim 1, characterized in that: The target detection model is the YOLOv5 model.

6. The method for identifying a circuit connection relationship according to claim 1, characterized in that: After forming the circuit loop, the method further includes: marking the circuit loop in the experimental circuit image.

7. A circuit connection relationship identification system, characterized in that: The system comprises: An image acquisition module, used for acquiring an experimental circuit image; A device identification module, used for inputting the experimental circuit image into the target detection model, identifying each experimental device, wire and terminal connected to the wire appearing in the experimental circuit image; wherein each experimental device has at most two terminals connected to the wire, and the target detection model is a YOLO series model; The terminal screening module is used for calculating the intersection-and-parallel ratio of the wire and each terminal for each wire, and screening the terminal connected to the wire according to the calculated intersection-and-parallel ratio; An experimental device screening module, used for determining the experimental device connected to the terminal based on the screened terminal; A circuit connection module is used to connect the identified terminals, experimental devices and wires according to their respective connection relationships to form a circuit loop; The calculating the intersection-and-parallel ratio of the wire and each terminal, and selecting the terminal connected to the wire according to the calculated intersection-and-parallel ratio, includes: Calculate the I / O ratio of the wire and each terminal, filter out the terminals whose I / O ratio is greater than the preset I / O ratio threshold, and determine the number of filtered terminals: If the number of terminals is equal to 2, all the selected terminals are used as terminals connected to the wires; If the number of the terminals is greater than 2, the terminals connected to the wires are screened out based on the position of each screened terminal relative to the identified wires.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the circuit connection relationship identification method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method for identifying a circuit connection relationship according to any one of claims 1 to 6.