Wire length measuring method and device, electronic equipment and storage medium
By obtaining the pixel coordinates and equipment type of electrical equipment in the 2D cabinet layout drawings, the wire length is calculated, solving the problem of inaccurate manual measurement of wire length. This achieves high-precision measurement and cutting of wire length, improving the success rate of layout.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-31
AI Technical Summary
Manually measuring the length of wires is less accurate in the deployment of two-dimensional display cabinets, resulting in wires being cut too short and affecting the success rate of deployment.
By obtaining the image connection of electrical equipment in the 2D cabinet layout drawing, the pixel coordinates are obtained, and the wire length is calculated based on the pixel coordinates. The connection compensation length is determined in combination with the equipment type. The connection length is enlarged using a scale to calculate the total wire length.
This improves the accuracy of conductor length measurement, increases the success rate of conductor cutting, and ensures the precision of conductor laying.
Smart Images

Figure CN121767424A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of the power industry, and in particular relates to a method for measuring conductor length, a measuring device, electronic equipment and storage medium thereof. Background Technology
[0002] Two-dimensional cabinets are enclosed metal structures in power systems used for the centralized installation, protection, and management of electrical equipment (such as protection devices, measuring instruments, control components, etc.). The electrical equipment in a two-dimensional cabinet can be electrically connected through wires.
[0003] Currently, before laying wires in a two-dimensional screen cabinet, the distance between electrical devices to be electrically connected is measured manually, and the distance is used as the wire length. The wires are then cut according to the wire length.
[0004] However, due to individual differences, the accuracy of manually measured wire length is low. When the manually measured wire length is too short, the cut wire will also be too short, leading to wire laying failure. Summary of the Invention
[0005] In view of the above, embodiments of this application provide a method for measuring wire length, a measuring device, an electronic device, and a storage medium thereof, to overcome the problems of the prior art.
[0006] In a first aspect, embodiments of this application provide a method for measuring the length of a conductor, including: Obtain a two-dimensional cabinet layout drawing, wherein the first electrical equipment image in the two-dimensional cabinet layout drawing is connected to the second electrical equipment image; Based on the two-dimensional cabinet layout drawing, obtain the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image; The length of the target wire is determined based on the first pixel coordinates and the second pixel coordinates. The target wire is used to electrically connect a first electrical device and a second electrical device. The first electrical device corresponds to the first electrical device image, and the second electrical device corresponds to the second electrical device image.
[0007] In some optional embodiments, determining the wire length of the target wire based on the first pixel coordinates and the second pixel coordinates includes: Based on the first pixel coordinates and the second pixel coordinates, determine the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image; According to the scale of the two-dimensional screen cabinet layout drawing, the first horizontal connection length is enlarged to obtain the second horizontal connection length between the first electrical equipment and the second electrical equipment, and the first vertical connection length is enlarged to obtain the second vertical connection length between the first electrical equipment and the second electrical equipment; The length of the conductor is obtained by calculating the sum of the second transverse connection length and the second longitudinal connection length.
[0008] In some optional embodiments, before calculating the sum of the second transverse connection length and the second longitudinal connection length to obtain the conductor length, the conductor length measurement method further includes: Based on the first equipment type of the first electrical equipment and the second equipment type of the second electrical equipment, determine the target connection compensation length between the first electrical equipment and the second electrical equipment; The step of calculating the sum of the second transverse connection length and the second longitudinal connection length to obtain the conductor length includes: The length of the conductor is obtained by calculating the sum of the second transverse connection length, the second longitudinal connection length, and the target connection compensation length.
[0009] In some optional embodiments, determining the target connection compensation length between the first electrical device and the second electrical device based on the first device type of the first electrical device and the second device type of the second electrical device includes: Based on the first device type and the second device type, a preset length compensation table is consulted to obtain the target connection compensation length. The preset length compensation table is used to characterize the correspondence between the device type of the electrical device and the connection compensation length.
[0010] In some optional embodiments, the first pixel coordinates include a first horizontal coordinate and a first vertical coordinate, and the second pixel coordinates include a second horizontal coordinate and a second vertical coordinate; The step of determining the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image based on the first pixel coordinates and the second pixel coordinates includes: Calculate the first horizontal connection length based on the first horizontal coordinate and the second horizontal coordinate; Calculate the first longitudinal connection length based on the first ordinate and the second ordinate.
[0011] In some optional embodiments, obtaining the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the two-dimensional cabinet layout drawing includes: The two-dimensional screen cabinet layout drawing is input to a preset client, so that the preset client can parse the two-dimensional screen cabinet layout drawing to obtain drawing information. The drawing information includes at least the first pixel coordinates and the second pixel coordinates.
[0012] In some optional embodiments, the drawing information further includes the conductor material, conductor color, and conductor diameter of the target conductor, and the conductor length measurement method further includes: The wire length, wire material, wire color, and wire diameter are sent to the wire cutting machine so that the wire cutting machine can select the wire to be cut according to the wire material, wire color, and wire diameter, and cut the wire to be cut according to the wire length to obtain the target wire.
[0013] Secondly, embodiments of this application provide a conductor length measuring device, comprising: The first acquisition module is used to acquire a two-dimensional screen cabinet layout drawing, wherein the first electrical equipment image in the two-dimensional screen cabinet layout drawing is connected to the second electrical equipment image; The second acquisition module is used to acquire the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the two-dimensional cabinet layout drawing; The first determining module is used to determine the length of the target wire based on the first pixel coordinates and the second pixel coordinates. The target wire is used to electrically connect a first electrical device and a second electrical device. The first electrical device corresponds to the first electrical device image, and the second electrical device corresponds to the second electrical device image.
[0014] Thirdly, embodiments of this application provide an electronic device, including: Memory; One or more processors are coupled to the memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the wire length measurement method as provided in the first aspect above.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be called by a processor to execute the wire length measurement method provided in the first aspect above.
[0016] Fifthly, embodiments of this application provide a computer program product that, when run on a computer device, causes the computer device to perform the wire length measurement method as described in the first aspect above.
[0017] The solution provided in this application obtains a two-dimensional cabinet layout drawing, in which the image of a first electrical device is connected to the image of a second electrical device. Based on the two-dimensional cabinet layout drawing, the first pixel coordinates of the first electrical device image and the second pixel coordinates of the second electrical device image are obtained. Based on the first pixel coordinates and the second pixel coordinates, the length of the target wire is determined. The target wire is used to electrically connect the first electrical device and the second electrical device. The first electrical device corresponds to the first electrical device image, and the second electrical device corresponds to the second electrical device image. This solution enables the measurement of the wire length of the electrically connected electrical device based on the two-dimensional cabinet layout drawing corresponding to the electrical device. This results in high accuracy of the measured wire length, which is beneficial to improving the success rate of laying wires cut according to the wire length. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic flowchart of a wire length measurement method provided in an embodiment of this application is shown.
[0020] Figure 2 This paper illustrates another flowchart of the wire length measurement method provided in an embodiment of this application.
[0021] Figure 3 A structural block diagram of a wire length measuring device provided in an embodiment of this application is shown.
[0022] Figure 4 A functional block diagram of an electronic device provided in an embodiment of this application is shown.
[0023] Figure 5 This application illustrates a computer-readable storage medium for storing or carrying program code that implements a method for measuring the conductor length of substation equipment according to an embodiment of this application.
[0024] Figure 6This application illustrates a computer program product for storing or carrying program code that implements the method for measuring the conductor length of substation equipment according to an embodiment of this application. Detailed Implementation
[0025] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0027] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0028] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0029] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0030] Two-dimensional cabinets are enclosed metal structures in power systems used for the centralized installation, protection, and management of electrical equipment (such as protection devices, measuring instruments, control components, etc.). The electrical equipment in a two-dimensional cabinet can be electrically connected through wires.
[0031] Currently, before laying wires in a two-dimensional screen cabinet, the distance between electrical devices to be electrically connected is measured manually, and the distance is used as the wire length. The wires are then cut according to the wire length.
[0032] However, due to individual differences, the accuracy of manually measured wire length is low. When the manually measured wire length is too short, the cut wire will also be too short, leading to wire laying failure.
[0033] To address the aforementioned issues, the wire length measurement method, measuring device, electronic equipment, and storage medium provided in this application embodiment acquire a two-dimensional cabinet layout drawing. A first electrical equipment image in the two-dimensional cabinet layout drawing is connected to a second electrical equipment image. Based on the two-dimensional cabinet layout drawing, the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image are obtained. The wire length of the target wire is determined based on the first and second pixel coordinates. The target wire is used to electrically connect the first and second electrical equipment. The first electrical equipment corresponds to the first electrical equipment image, and the second electrical equipment corresponds to the second electrical equipment image. This method measures the wire length of electrically connected electrical equipment based on the two-dimensional cabinet layout drawing corresponding to the electrical equipment. This results in high accuracy of the measured wire length, which is beneficial for improving the success rate of laying wires cut according to their length.
[0034] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0035] The wire length measurement method provided in this application embodiment can be applied to a processing device, which can be a terminal device or a server, etc. The type of processing device is not limited here, and can be set according to actual needs.
[0036] The terminal device can be a mobile terminal device (such as a mobile phone, PDA, tablet PC, laptop, smartwatch, smart bracelet or wearable device, etc.) or a fixed terminal device (desktop computer, smart panel, etc.).
[0037] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or any of the following: cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), big data or artificial intelligence platforms.
[0038] Please see Figure 1 This document illustrates a flowchart of a wire length measurement method according to an embodiment of this application. In a specific embodiment, the wire length measurement method can be applied to a processing device; the following example uses a processing device. Figure 1The process shown is described in detail. The method for measuring the length of a conductor may include the following steps 101 to 103.
[0039] Step 101: Obtain the 2D screen cabinet layout drawing.
[0040] In this embodiment of the application, when a user needs to measure the length of a wire, he / she can send a measurement command to the processing device. After receiving the measurement command, the processing device can obtain a two-dimensional cabinet layout drawing.
[0041] The two-dimensional cabinet layout drawing may include a first electrical equipment image of the first electrical equipment and a second electrical equipment image of the second electrical equipment, and the first electrical equipment image may be connected to the second electrical equipment image.
[0042] The first electrical device can be any one of a protection device, a measuring instrument device, a terminal block, or a control element, etc., and the second electrical device can be any one of a protection device, a measuring instrument device, a terminal block, or a control element, etc., without limitation.
[0043] In some implementations, when a user needs to measure the length of a conductor, they can send a measurement command to the processing device. After receiving the measurement command, the processing device can generate a prompt message and receive the two-dimensional cabinet layout drawing input by the user based on the prompt message.
[0044] The prompts can be used to guide users to input 2D display cabinet layout drawings into the processing equipment. The prompts can be at least one of the following: text prompts, sound prompts, or light prompts; no specific limitation is made here.
[0045] In some implementations, the processing device can pre-store two-dimensional cabinet layout drawings. When a user needs to measure the length of a conductor, they can send a measurement command to the processing device. After receiving the measurement command, the processing device can read the pre-stored two-dimensional cabinet layout drawings.
[0046] In some implementations, when a user needs to measure the length of a wire, they can send a measurement command to the processing device. After receiving the measurement command, the processing device can send an acquisition command to the service platform. After receiving the acquisition command, the service platform can send a pre-stored two-dimensional cabinet layout drawing to the processing device. The processing device then receives the two-dimensional cabinet layout drawing returned by the service platform.
[0047] The service platform can be an independent physical service platform, a service platform cluster or distributed system composed of multiple physical service platforms, or any of the following cloud service platforms that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), big data or artificial intelligence platforms, etc. There is no limitation here.
[0048] In some implementations, the processing device can detect user operations and receive a measurement command when it is determined from the detected user operations that the user has input an instruction to measure the length of the conductor.
[0049] For example, when a user needs to measure the length of a wire, they can perform a touch operation on the operation panel of the processing device. The processing device responds to the user's touch operation, generates a corresponding touch signal, and analyzes the touch signal. When it is determined that the touch signal is a preset signal used to characterize the length of the wire, it is determined that a measurement command has been received.
[0050] In some implementations, the processing device may be equipped with a voice recognition module. When a user needs to measure the length of a conductor, the user can send voice information within the voice acquisition range of the voice recognition module. The voice recognition module collects the voice information sent by the user, performs voice recognition on the collected voice information, and determines, based on the recognition result, that the recognition result contains keywords used to indicate the measurement of conductor length, such as "measure conductor length", and then determines that a measurement command has been received.
[0051] Step 102: Based on the 2D cabinet layout drawing, obtain the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image.
[0052] In this embodiment of the application, after the processing device obtains the two-dimensional cabinet layout drawing, it can obtain the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the two-dimensional cabinet layout drawing.
[0053] The first pixel coordinate can be used to characterize the placement of the first electrical device in the two-dimensional cabinet, and the second pixel coordinate can be used to characterize the placement of the second electrical device in the two-dimensional cabinet.
[0054] Specifically, after the processing device acquires the 2D cabinet layout drawing, it can input the 2D cabinet layout drawing to a preset client. The preset client responds to the received 2D cabinet layout drawing by parsing it to obtain drawing information. This drawing information may include at least the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image. By obtaining the first and second pixel coordinates based on the preset client's parsing of the 2D cabinet layout drawing, the accuracy of obtaining the first and second pixel coordinates is improved.
[0055] The preset client can be any of the following: a mobile client (e.g., a mobile phone client, a PDA client, a Tablet PC client, a laptop client, a smartwatch client, a smart bracelet client, or a wearable client) or a fixed client (e.g., a desktop computer client, a smart panel client). The type of client is not limited here and can be set according to actual needs.
[0056] Step 103: Determine the length of the target wire based on the first pixel coordinate and the second pixel coordinate.
[0057] In this embodiment, after the processing device obtains the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the two-dimensional cabinet layout drawing, it can determine the wire length of the target wire based on the first pixel coordinates and the second pixel coordinates. This realizes the measurement of the wire length of the wire between electrically conductive electrical equipment based on the two-dimensional cabinet layout drawing corresponding to the electrical equipment, which makes the measured wire length more accurate and helps to improve the success rate of laying wires cut according to the wire length.
[0058] The target conductor can be used to electrically connect the first electrical device and the second electrical device.
[0059] Specifically, after obtaining the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the 2D cabinet layout drawing, the processing equipment can determine the first horizontal connection length and the first vertical connection length between the first and second electrical equipment images based on the first and second pixel coordinates. Then, according to the scale of the 2D cabinet layout drawing, the first horizontal connection length is enlarged to obtain the second horizontal connection length between the first and second electrical equipment, and the first vertical connection length is enlarged to obtain the second vertical connection length between the first and second electrical equipment. The sum of the second horizontal and second vertical connection lengths is calculated to obtain the wire length. Calculating the wire length based on the first pixel coordinates, the second pixel coordinates, and the scale of the 2D cabinet layout drawing improves the accuracy of wire length calculation.
[0060] The first horizontal connection length can be used to characterize the horizontal distance between the first pixel coordinate and the second pixel coordinate, and the first vertical connection length can be used to characterize the vertical distance between the first pixel coordinate and the second pixel coordinate.
[0061] The second lateral connection length can be used to characterize the lateral distance between the first electrical device and the second electrical device, and the second longitudinal connection length can be used to characterize the longitudinal distance between the first electrical device and the second electrical device.
[0062] The scale of a two-dimensional screen cabinet layout drawing can be used to represent the ratio of the length of the target conductor in the two-dimensional screen cabinet layout drawing to its actual length.
[0063] The first pixel coordinates may include a first horizontal coordinate and a first vertical coordinate, and the second pixel coordinates may include a second horizontal coordinate and a second vertical coordinate.
[0064] The processing device can calculate the first horizontal connection length between the first electrical equipment image and the second electrical equipment image based on the first and second horizontal coordinates, and calculate the first vertical connection length between the first electrical equipment image and the second electrical equipment image based on the first and second vertical coordinates. Calculating the first horizontal and first vertical connection lengths based on the first and second pixel coordinates improves the accuracy of these calculations.
[0065] As an example, the first pixel coordinates (Xq, Yq) may include a first horizontal coordinate Xq and a first vertical coordinate Yq, and the second pixel coordinates (Xz, Yz) may include a second horizontal coordinate Xz and a second vertical coordinate Yz.
[0066] The first horizontal connection length Lx1 can be calculated according to Formula 1 based on the first horizontal coordinate Xq and the second horizontal coordinate Xz.
[0067] Formula 1 is: Lx1=∣Xq-Xz∣.
[0068] The first longitudinal connection length Ly1 can be calculated according to Formula 2 based on the first ordinate Yq and the second ordinate Yz.
[0069] Formula 2 is: Ly1 = |Yq - Yz|.
[0070] The scale of the two-dimensional screen cabinet layout drawing can be 1:a. Based on the scale 1:a and the first horizontal connection length Lx1, the second horizontal connection length Lx2 can be calculated according to Formula 3.
[0071] Formula 3 is: Lx2 = Lx1 × a = |Xq - Xz| × a.
[0072] The second longitudinal connection length Ly2 can be calculated according to formula four based on the scale 1:a and the first longitudinal connection length Ly1.
[0073] Formula 4 is: Ly2 = Ly1 × a = |Yq - Yz| × a.
[0074] The conductor length L can be calculated according to Formula 5 based on the second horizontal connection length Lx2 and the second vertical connection length Ly2.
[0075] Formula 5 is: L = Lx2 + Ly2 = Lx1 × a + Ly1 × a = |Xq - Xz| × a + |Yq - Yz| × a.
[0076] In some implementations, the drawing information may also include the conductor material, color, and diameter of the target conductor. After determining the conductor length of the target conductor based on the first and second pixel coordinates, the processing device can send the conductor length, material, color, and diameter to the cutting machine. Upon receiving the conductor length, material, color, and diameter, the cutting machine can select the conductor to be cut based on the material, color, and diameter, and cut it according to the conductor length to obtain the target conductor. By obtaining the conductor length, color, and diameter based on the two-dimensional cabinet layout drawing, and automatically cutting the target conductor based on the conductor color, diameter, and length using the cutting machine, manual measurement and cutting by the user are eliminated, improving the efficiency and accuracy of target conductor cutting.
[0077] The conductor material can be any of copper, aluminum, silver, gold, nickel, iron, or alloys, and there is no limitation here.
[0078] The wire color can be any of the following: red, green, blue, yellow, gray, or brown; there is no limitation here.
[0079] In some embodiments, the processing device may include a display module. After determining the length of the target wire based on the first pixel coordinates and the second pixel coordinates, the processing device can obtain target layout guidance information for the target wire based on the wire material and wire diameter, and display the target layout guidance information on the display module so that the user can lay the target wire according to the target layout guidance information, which helps to improve the efficiency of laying the target wire.
[0080] Among them, the target deployment guidance information can be used to characterize the information that provides guidance for the deployment process of the target traverse.
[0081] The processing equipment can look up the deployment guidance information table based on the conductor material and diameter to obtain the target deployment guidance information. The deployment guidance information table can be used to characterize the correspondence between conductor material and diameter and the deployment guidance information.
[0082] The display module can be any of the following: a liquid crystal display (LCD) module, a light-emitting diode (LED) module, or an organic light-emitting diode (OLED) module; there is no limitation here.
[0083] The solution provided in this application obtains a two-dimensional cabinet layout drawing, in which the image of a first electrical device is connected to the image of a second electrical device. Based on the two-dimensional cabinet layout drawing, the first pixel coordinates of the first electrical device image and the second pixel coordinates of the second electrical device image are obtained. Based on the first pixel coordinates and the second pixel coordinates, the length of the target wire is determined. The target wire is used to electrically connect the first electrical device and the second electrical device. The first electrical device corresponds to the first electrical device image, and the second electrical device corresponds to the second electrical device image. This solution enables the measurement of the wire length of the electrically connected electrical device based on the two-dimensional cabinet layout drawing corresponding to the electrical device. This results in high accuracy of the measured wire length, which is beneficial to improving the success rate of laying wires cut according to the wire length.
[0084] Please see Figure 2 This document illustrates a flowchart of a wire length measurement method according to another embodiment of this application. In a specific embodiment, the wire length measurement method can be applied to a processing device. The following example uses a processing device to illustrate this method. Figure 2 The process shown is described in detail. The method for measuring the length of a conductor may include the following steps 201 to 206.
[0085] Step 201: Obtain the 2D screen cabinet layout drawing.
[0086] Step 202: Based on the 2D cabinet layout drawing, obtain the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image.
[0087] Step 203: Determine the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image based on the first pixel coordinates and the second pixel coordinates.
[0088] Step 204: According to the scale of the two-dimensional cabinet layout drawing, enlarge the first horizontal connection length to obtain the second horizontal connection length between the first electrical equipment and the second electrical equipment, and enlarge the first vertical connection length to obtain the second vertical connection length between the first electrical equipment and the second electrical equipment.
[0089] In this embodiment, steps 201, 202, 203 and 204 can be referred to the corresponding steps in the previous embodiments, and will not be repeated here.
[0090] Step 205: Determine the target connection compensation length between the first electrical device and the second electrical device based on the first device type of the first electrical device and the second device type of the second electrical device.
[0091] In this embodiment, the processing device enlarges the first horizontal connection length according to the scale of the two-dimensional cabinet layout drawing to obtain the second horizontal connection length between the first electrical device and the second electrical device, and enlarges the first vertical connection length to obtain the second vertical connection length between the first electrical device and the second electrical device. Then, based on the first device type of the first electrical device and the second device type of the second electrical device, the target connection compensation length between the first electrical device and the second electrical device can be determined.
[0092] The target connection compensation length can characterize the wire loss length at the connection between the first electrical device and the second electrical device.
[0093] The processing equipment can look up a preset length compensation table based on the first and second equipment types to obtain the target connection compensation length. The preset length compensation table can be used to characterize the correspondence between the equipment type of electrical equipment and the connection compensation length. Based on the preset correspondence between the equipment type of electrical equipment and the connection compensation length, the target connection compensation length is determined, thus improving the accuracy of the target connection compensation length.
[0094] In one application scenario, the first device type can be a terminal block, and the second device type can include an air switch, a terminal block, and a protection device.
[0095] The correspondence between the equipment type and the connection compensation length of electrically connected electrical equipment can be shown in Table 1, i.e., the preset length compensation table. Based on this correspondence, the target connection compensation length corresponding to the first equipment type and the second equipment type can be obtained.
[0096] Table 1
[0097] It should be noted that the correspondence between the equipment type and the connection compensation length of electrically connected electrical equipment is not limited to that shown in Table 1, and can be set according to actual needs.
[0098] Step 206: Calculate the sum of the second transverse connection length, the second longitudinal connection length, and the target connection compensation length to obtain the conductor length.
[0099] In this embodiment, after the processing device determines the target connection compensation length between the first electrical device and the second electrical device based on the first device type of the first electrical device and the second device type of the second electrical device, it can calculate the sum of the second lateral connection length, the second longitudinal connection length and the target connection compensation length to obtain the conductor length. The accuracy of conductor length calculation is further improved by calculating the conductor length based on the second lateral connection length, the second longitudinal connection length and the target connection compensation length.
[0100] As an example, the second horizontal connection length can be Lx2, the second vertical connection length can be Ly2, and the target connection compensation length can be ΔL.
[0101] The conductor length L can be calculated according to Formula 6 based on the second transverse connection length Lx2, the second longitudinal connection length Ly2, and the target connection compensation length ΔL.
[0102] Formula 6 is: L=Lx2+Ly2+ΔL=Lx1×a+Ly1×a+ΔL=∣Xq-Xz∣×a+∣Yq-Yz∣×a+ΔL.
[0103] The solution provided in this embodiment obtains a two-dimensional cabinet layout drawing, and based on the two-dimensional cabinet layout drawing, obtains the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image. Based on the first pixel coordinates and the second pixel coordinates, it determines the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image. According to the scale of the two-dimensional cabinet layout drawing, it enlarges the first horizontal connection length to obtain the second horizontal connection length between the first electrical equipment and the second electrical equipment, and enlarges the first vertical connection length to obtain the second vertical connection length between the first electrical equipment and the second electrical equipment. Based on the first equipment type of the first electrical equipment and the second equipment type of the second electrical equipment, it determines the target connection compensation length between the first electrical equipment and the second electrical equipment. It also calculates the sum of the second horizontal connection length, the second vertical connection length, and the target connection compensation length to obtain the wire length. This realizes the measurement of the wire length between electrically conductive electrical equipment based on the two-dimensional cabinet layout drawing corresponding to the electrical equipment. The accuracy of the measured wire length is high, which is beneficial to improving the success rate of laying wires cut according to the wire length.
[0104] Furthermore, the accuracy of conductor length calculation is further improved by calculating the conductor length based on the second transverse connection length, the second longitudinal connection length, and the target connection compensation length.
[0105] Please see Figure 3This illustration shows a wire length measuring device 300 provided in one embodiment of this application. The wire length measuring device 300 can be applied to a processing device. The following example uses a processing device to illustrate... Figure 3 The wire length measuring device 300 shown will be described in detail. The wire length measuring device 300 may include a first acquisition module 301, a second acquisition module 302, and a first determination module 303.
[0106] The first acquisition module 301 can be used to acquire a two-dimensional cabinet layout drawing, in which the first electrical equipment image can be connected to the second electrical equipment image; the second acquisition module 302 can be used to acquire the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image according to the two-dimensional cabinet layout drawing; the first determination module 303 can be used to determine the wire length of the target wire according to the first pixel coordinates and the second pixel coordinates, in which the target wire can be used to electrically connect the first electrical equipment and the second electrical equipment, the first electrical equipment can correspond to the first electrical equipment image, and the second electrical equipment can correspond to the second electrical equipment image.
[0107] In some implementations, the first determining module 303 may include a determining unit, an amplification unit, and a calculation unit.
[0108] The determining unit can be used to determine the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image based on the first pixel coordinates and the second pixel coordinates; the magnifying unit can be used to magnify the first horizontal connection length to obtain the second horizontal connection length between the first electrical equipment and the second electrical equipment according to the scale of the two-dimensional cabinet layout drawing, and magnify the first vertical connection length to obtain the second vertical connection length between the first electrical equipment and the second electrical equipment; the calculating unit can be used to calculate the sum of the second horizontal connection length and the second vertical connection length to obtain the wire length.
[0109] In some embodiments, the wire length measuring device 300 may also include a second determining module.
[0110] The second determining module can be used to calculate the sum of the second lateral connection length and the second longitudinal connection length before obtaining the conductor length, and to determine the target connection compensation length between the first electrical device and the second electrical device according to the first device type of the first electrical device and the second device type of the second electrical device.
[0111] In some implementations, the computing unit may include a first computing subunit.
[0112] The first calculation subunit can be used to calculate the sum of the second lateral connection length, the second longitudinal connection length, and the target connection compensation length to obtain the conductor length.
[0113] In some implementations, the second determining module may include a search unit.
[0114] The lookup unit can be used to look up a preset length compensation table based on the first device type and the second device type to obtain the target connection compensation length. The preset length compensation table can be used to characterize the correspondence between the device type and the connection compensation length of the electrically connected electrical equipment.
[0115] In some implementations, the first pixel coordinates may include a first horizontal coordinate and a first vertical coordinate, and the second pixel coordinates may include a second horizontal coordinate and a second vertical coordinate; the determining unit may include a second calculation subunit and a third calculation subunit.
[0116] The second calculation subunit can be used to calculate the first horizontal connection length based on the first horizontal coordinate and the second horizontal coordinate; the third calculation subunit can be used to calculate the first vertical connection length based on the first vertical coordinate and the second vertical coordinate.
[0117] In some implementations, the second acquisition module 302 may include an input unit.
[0118] The input unit can be used to input two-dimensional screen cabinet layout drawings to a preset client, so that the preset client can parse the two-dimensional screen cabinet layout drawings and obtain drawing information. The drawing information can include at least the first pixel coordinates and the second pixel coordinates.
[0119] In some implementations, the drawing information may also include the conductor material, conductor color and conductor diameter of the target conductor, and the conductor length measuring device 300 may also include a transmitting module.
[0120] The sending module can be used to send the wire length, wire material, wire color and wire diameter to the cutting machine, so that the cutting machine can select the wire to be cut according to the wire material, wire color and wire diameter, and cut the wire to be cut according to the wire length to obtain the target wire.
[0121] The solution provided in this embodiment obtains a two-dimensional cabinet layout drawing, in which the first electrical equipment image is connected to the second electrical equipment image. Based on the two-dimensional cabinet layout drawing, the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image are obtained. Based on the first pixel coordinates and the second pixel coordinates, the length of the target wire is determined. The target wire is used to electrically connect the first electrical equipment and the second electrical equipment. The first electrical equipment corresponds to the first electrical equipment image, and the second electrical equipment corresponds to the second electrical equipment image. This realizes the measurement of the wire length of the electrically connected electrical equipment based on the two-dimensional cabinet layout drawing corresponding to the electrical equipment. This makes the measured wire length more accurate and helps to improve the success rate of laying wires cut according to the wire length.
[0122] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For device embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to in the descriptions of the method embodiments. Any processing method described in the method embodiments can be implemented in the device embodiments through corresponding processing modules, and will not be elaborated upon further in the device embodiments.
[0123] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0124] Please see Figure 4 The diagram illustrates a functional block diagram of an electronic device 500 provided in one embodiment of the present application. The electronic device 500 may include one or more of the following components: a memory 501, a processor 502, and one or more application programs. One or more application programs may be stored in the memory 501 and configured to be executed by one or more processors 502. One or more application programs are configured to perform the methods described in the foregoing method embodiments.
[0125] The memory 501 may include random access memory (RAM) or read-only memory (ROM). The memory 501 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 501 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., acquiring a two-dimensional cabinet layout drawing, acquiring first pixel coordinates, acquiring second pixel coordinates, determining wire length, determining first horizontal connection length, determining first vertical connection length, enlarging the first horizontal connection length, obtaining a second horizontal connection length, enlarging the first vertical connection length, obtaining the second vertical connection length, calculating the sum of lengths, obtaining the wire length, determining the target connection compensation length, looking up a preset length compensation table, obtaining the target connection compensation length, calculating the first horizontal connection length, calculating the first vertical connection length, inputting a two-dimensional cabinet layout drawing, parsing the two-dimensional cabinet layout drawing, obtaining drawing information, sending wire length, sending wire material, sending wire color, sending wire diameter, selecting the wire to be cut, cutting the wire to be cut, and obtaining the target wire, etc.), and instructions for implementing the various method embodiments described below. The data storage area can also store data created by the electronic device 500 during use (such as two-dimensional screen cabinet layout drawings, images of the first electrical equipment, images of the second electrical equipment, first pixel coordinates, second pixel coordinates, target wires, wire lengths, first electrical equipment, second electrical equipment, first horizontal connection lengths, first vertical connection lengths, scales, second horizontal connection lengths, second vertical connection lengths, first equipment type, second equipment type, target connection compensation lengths, preset length compensation tables, correspondences, first horizontal coordinates, first vertical coordinates, second horizontal coordinates, second vertical coordinates, preset clients, drawing information, wire material, wire color, wire diameter, unloading machine, and wires to be cut), etc.
[0126] Processor 502 may include one or more processing cores. Processor 502 connects to various parts within the electronic device 500 using various interfaces and lines, and performs various functions and processes data of the electronic device 500 by running or executing instructions, programs, code sets, or instruction sets stored in memory 501, and by calling data stored in memory 501. Optionally, processor 502 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 502 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 502 and may be implemented separately using a communication chip.
[0127] Please refer to Figure 5 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 600 stores program code 601, which can be called by a processor to execute the methods described in the above method embodiments.
[0128] The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for program code 601 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 601 may be compressed, for example, in a suitable form.
[0129] Please refer to Figure 6This diagram illustrates a structural block diagram of a computer program product 700 provided in an embodiment of this application. The computer program product 700 includes a computer program / instructions 701, which is stored in a computer-readable storage medium of a computer device. When the computer program product 700 runs on the computer device, the processor of the computer device reads the computer program / instructions 701 from the computer-readable storage medium, and executes the computer program / instructions 701, causing the computer device to perform the methods described in the above method embodiments.
[0130] The solution provided in this embodiment obtains a two-dimensional cabinet layout drawing, in which the first electrical equipment image is connected to the second electrical equipment image. Based on the two-dimensional cabinet layout drawing, the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image are obtained. Based on the first pixel coordinates and the second pixel coordinates, the length of the target wire is determined. The target wire is used to electrically connect the first electrical equipment and the second electrical equipment. The first electrical equipment corresponds to the first electrical equipment image, and the second electrical equipment corresponds to the second electrical equipment image. This realizes the measurement of the wire length of the electrically connected electrical equipment based on the two-dimensional cabinet layout drawing corresponding to the electrical equipment. This makes the measured wire length more accurate and helps to improve the success rate of laying wires cut according to the wire length.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for measuring the length of a conductor, characterized in that, include: Obtain a two-dimensional cabinet layout drawing, wherein the first electrical equipment image in the two-dimensional cabinet layout drawing is connected to the second electrical equipment image; Based on the two-dimensional cabinet layout drawing, obtain the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image; The length of the target wire is determined based on the first pixel coordinates and the second pixel coordinates. The target wire is used to electrically connect a first electrical device and a second electrical device. The first electrical device corresponds to the first electrical device image, and the second electrical device corresponds to the second electrical device image.
2. The method for measuring the length of a conductor according to claim 1, characterized in that, Determining the wire length of the target wire based on the first pixel coordinates and the second pixel coordinates includes: Based on the first pixel coordinates and the second pixel coordinates, determine the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image; According to the scale of the two-dimensional screen cabinet layout drawing, the first horizontal connection length is enlarged to obtain the second horizontal connection length between the first electrical equipment and the second electrical equipment, and the first vertical connection length is enlarged to obtain the second vertical connection length between the first electrical equipment and the second electrical equipment; The length of the conductor is obtained by calculating the sum of the second transverse connection length and the second longitudinal connection length.
3. The method for measuring the length of a conductor according to claim 2, characterized in that, Before calculating the sum of the second transverse connection length and the second longitudinal connection length to obtain the conductor length, the conductor length measurement method further includes: Based on the first equipment type of the first electrical equipment and the second equipment type of the second electrical equipment, determine the target connection compensation length between the first electrical equipment and the second electrical equipment; The step of calculating the sum of the second transverse connection length and the second longitudinal connection length to obtain the conductor length includes: The length of the conductor is obtained by calculating the sum of the second transverse connection length, the second longitudinal connection length, and the target connection compensation length.
4. The method for measuring the length of a conductor according to claim 3, characterized in that, The step of determining the target connection compensation length between the first electrical device and the second electrical device based on the first device type of the first electrical device and the second device type of the second electrical device includes: Based on the first device type and the second device type, a preset length compensation table is consulted to obtain the target connection compensation length. The preset length compensation table is used to characterize the correspondence between the device type of the electrical device and the connection compensation length.
5. The method for measuring conductor length according to claim 2, characterized in that, The first pixel coordinates include a first horizontal coordinate and a first vertical coordinate, and the second pixel coordinates include a second horizontal coordinate and a second vertical coordinate; The step of determining the first horizontal connection length and the first vertical connection length between the first electrical equipment image and the second electrical equipment image based on the first pixel coordinates and the second pixel coordinates includes: Calculate the first horizontal connection length based on the first horizontal coordinate and the second horizontal coordinate; Calculate the first longitudinal connection length based on the first ordinate and the second ordinate.
6. The method for measuring the length of a conductor according to any one of claims 1 to 5, characterized in that, The step of obtaining the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the two-dimensional cabinet layout drawing includes: The two-dimensional screen cabinet layout drawing is input to a preset client, so that the preset client can parse the two-dimensional screen cabinet layout drawing to obtain drawing information. The drawing information includes at least the first pixel coordinates and the second pixel coordinates.
7. The method for measuring conductor length according to claim 6, characterized in that, The drawing information also includes the conductor material, conductor color, and conductor diameter of the target conductor, and the conductor length measurement method further includes: The wire length, wire material, wire color, and wire diameter are sent to the wire cutting machine so that the wire cutting machine can select the wire to be cut according to the wire material, wire color, and wire diameter, and cut the wire to be cut according to the wire length to obtain the target wire.
8. A wire length measuring device, characterized in that, include: The first acquisition module is used to acquire a two-dimensional screen cabinet layout drawing, wherein the first electrical equipment image in the two-dimensional screen cabinet layout drawing is connected to the second electrical equipment image; The second acquisition module is used to acquire the first pixel coordinates of the first electrical equipment image and the second pixel coordinates of the second electrical equipment image based on the two-dimensional cabinet layout drawing; The first determining module is used to determine the length of the target wire based on the first pixel coordinates and the second pixel coordinates. The target wire is used to electrically connect a first electrical device and a second electrical device. The first electrical device corresponds to the first electrical device image, and the second electrical device corresponds to the second electrical device image.
9. An electronic device, characterized in that, include: Memory; One or more processors are coupled to the memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by one or more processors, the one or more applications being configured to perform the wire length measurement method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be called by a processor to execute the wire length measurement method as described in any one of claims 1 to 7.