Cable path generation method and device
By generating an adversarial network to identify cable path features, the fully automated and automatic generation of substation cable paths is achieved, solving the high cost problems caused by design refinement and repeated adjustments to the solution, and reducing labor time and cost.
Patent Information
- Application Number
- CN202111152913.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-09-29
AI Technical Summary
There are high labor and time costs caused by design refinement and repeated adjustments to the solution in the design of substation cable paths, and no effective solutions have been proposed in the existing technology.
The cable path characteristics are identified by the generative adversarial network, and the CAD drawings of the substation are converted into images and the algorithm model is used to form a generative adversarial network to achieve full automation and automatic generation of the cable paths.
It reduces labor time and cost, realizes fully automated cable path drawing without manual intervention, and solves the technical problems of non-fully automated path drawing.
Smart Images

Figure CN114186304B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic information technology, and in particular to a method and device for generating a cable path. Background Art
[0002] As substations, especially urban substations, move towards miniaturization and indoor operation, substation design is also gradually becoming more refined. The direction of the high-voltage cable path in the substation is an important detail information that needs to be reflected in the substation design drawings. The refined cable path design provides a necessary and good foundation for the reasonable spatial layout, construction, operation and maintenance of the substation. However, after the design work moves towards refinement, it inevitably brings higher design requirements, which requires higher labor and time costs; in addition, the work process may require repeated adjustments and modifications of the plan. This is because there are multiple professional cooperation in the substation. The modification of a professional will inevitably bring about changes in the professional plan of the cable path. These plan adjustments and modifications are generally small and trivial, but the labor and time costs are as considerable as starting a new version of the plan design. In summary, the current problems in the substation cable path design are mainly the high labor and time costs caused by the refinement of the design and repeated adjustments of the plan.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method and device for generating a cable path, so as to at least solve the technical problem of non-fully automated path drawing caused by manual use of computer-aided design tools.
[0005] According to one aspect of an embodiment of the present invention, a method for generating a cable path is provided, comprising: converting a first-type substation drawing into a first-type substation image, and converting a second-type substation drawing into a second-type substation image; inputting the first-type substation image into a cable two-dimensional path automatic generation model to obtain a third-type substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtaining a real data set consisting of the first-type substation image and the second-type substation image, randomly sampling from images in the real data set and images output by a generator, and inputting the sampled data into a generative adversarial network for processing to obtain a cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate a substation image, and the discriminator is used to judge the authenticity of the substation image; determining the difference between the third-type substation image and the second-type substation image, and determining the cable two-dimensional path image based on the difference.
[0006] Optionally, converting the first-type substation drawing into a first-type substation image includes: converting the first-type substation drawing into a first-type substation image of an m×n pixel matrix, wherein m and n are both positive integers; converting the second-type substation drawing into a second-type substation image includes: converting the second-type substation drawing into a second-type substation image of an m×n pixel matrix.
[0007] Optionally, the first type of substation drawings include: original substation drawings without drawing the two-dimensional cable path; the first type of substation images include: original substation images without drawing the two-dimensional cable path; the second type of substation drawings include: substation drawings with manually drawn two-dimensional cable paths; the second type of substation images include: substation images with manually drawn two-dimensional cable paths; the third type of substation images include: substation images drawn by an automatically generated model of the two-dimensional cable path.
[0008] Optionally, before the sampled data is input into the generative adversarial network for processing, the process includes: initializing the generative adversarial network, wherein the initialization includes: initializing parameters of the generator and parameters of the discriminator.
[0009] Optionally, the generator receives a first type of substation image, and the output result is a substation image with a two-dimensional cable path. The output result of the discriminator is a probability, which is used to determine whether the substation image with a two-dimensional cable path generated by the generator is a second type of substation image corresponding to the first type of substation image. When the probability is 0.5, an automatic generation model of the two-dimensional cable path is obtained, wherein the real substation image is obtained from a real data set.
[0010] Optionally, after initializing the generative adversarial network, the method includes: when the parameters of the generator are determined, randomly sampling from the real data set and the substation image output by the generator, using the sampling results as the input of the discriminator, and updating the parameters of the discriminator according to the output results of the discriminator, wherein the parameters of the generator represent the quality of the generated substation image, and the parameters of the discriminator are used to judge the accuracy of the substation image with a two-dimensional cable path generated by the generator and the second type of substation image, wherein the generator generates a substation image with a two-dimensional cable path based on the first type of substation image, and the second type of substation image corresponds to the first type of substation image; when the parameters of the discriminator are determined, the first type of substation image is input into the generator, the obtained substation image is used as the input of the discriminator, and the parameters of the generator are updated according to the output results of the discriminator.
[0011] Optionally, the difference includes: an operation result obtained by subtracting corresponding pixels of the third type substation image from the second type substation image.
[0012] Optionally, after obtaining the image of the two-dimensional path of the cable, the method includes: converting the image of the two-dimensional path of the cable into vector lines.
[0013] According to another aspect of an embodiment of the present invention, a device for generating a cable path is also provided, including: a conversion module, used to convert a first-type substation drawing into a first-type substation image, and a second-type substation drawing into a second-type substation image; a processing module, connected to the conversion module, used to input the first-type substation image into a cable two-dimensional path automatic generation model to obtain a third-type substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtaining a real data set consisting of the first-type substation image and the second-type substation image, randomly sampling from the images in the real data set and the images output by the generator, and inputting the sampled data into a generative adversarial network for processing to obtain a cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate a substation image, and the discriminator is used to judge the authenticity of the substation image; determining the difference between the third-type substation image and the second-type substation image, and determining the image of the cable two-dimensional path based on the difference.
[0014] According to another aspect of an embodiment of the present invention, there is also provided a cable path generation device, comprising: a memory for storing program instructions; a processor, connected to the memory, for implementing the following functions when executing the program instructions: converting a first-category substation drawing into a first-category substation image, and converting a second-category substation drawing into a second-category substation image; inputting the first-category substation image into a cable two-dimensional path automatic generation model to obtain a third-category substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtaining a real data set consisting of a first-category substation image and a second-category substation image, randomly sampling from images in the real data set and images output by a generator, and inputting the sampled data into a generative adversarial network for processing to obtain a cable two-dimensional path automatic generation model, wherein the generative adversarial network comprises a generator and a discriminator, the generator is used to generate a substation image, and the discriminator is used to judge the authenticity of the substation image; determining the difference between the third-category substation image and the second-category substation image, and determining the image of the cable two-dimensional path based on the difference.
[0015] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium includes a stored program. When the program is running, the device where the non-volatile storage medium is located is controlled to execute the above cable path automatic generation method.
[0016] In the embodiment of the present invention, in view of the modular characteristics of the internal equipment and space layout of the substation, the idea of image content recognition is adopted to convert the CAD drawings of the substation into corresponding images, and the characteristics of the cable path are identified by using a generative adversarial network to form an algorithm model that can be used for automatic generation of the cable path, thereby achieving the purpose of reducing manual time and reducing costs, thereby achieving the technical effect of fully automated cable path drawing without manual intervention, and further solving the technical problem of non-fully automated path drawing caused by manual use of computer-aided design tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a schematic diagram of a cable path generating device according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a method for generating a cable path according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of a generative adversarial network processing method according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of a corresponding pixel subtraction operation process according to an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a device for generating a cable path according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] Figure 1 is a schematic diagram of a cable path automatic generation device according to an embodiment of the present invention, such as Figure 1 As shown, the device includes:
[0026] Memory 102, used for storing program instructions;
[0027] The processor 104 is connected to the memory 102 and is used to implement the following functions when executing program instructions: converting the first-type substation drawing into the first-type substation image, and converting the second-type substation drawing into the second-type substation image, wherein the first-type substation drawing is converted into the first-type substation image, including: converting the first-type substation drawing into the first-type substation image of the m×n pixel matrix, where m and n are both positive integers, and converting the second-type substation drawing into the second-type substation image, including: converting the second-type substation drawing into the second-type substation image of the m×n pixel matrix, where the second-type substation image is the first-type substation image with the artificially drawn cable path added thereto, and the first-type substation image and the second-type substation image are one. One-to-one correspondence; input the first type of substation image into the cable two-dimensional path automatic generation model to obtain the third type of substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtain a real data set consisting of the first type of substation image and the second type of substation image, randomly sample the images in the real data set and the images output by the generator, input the sampled data into a generative adversarial network for processing, and obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate the substation image, and the discriminator is used to judge the authenticity of the substation image; determine the difference between the third type of substation image and the second type of substation image, and determine the image of the cable two-dimensional path based on the difference.
[0028] Substation drawings are graphic representations of substations that include details such as size, location and technical parameters required for construction.
[0029] Generative adversarial network is a deep learning model that produces good outputs through the mutual game learning between the generator and the discriminator in the framework.
[0030] The two-dimensional cable path is a cable path drawn on a plane. The two dimensions refer to the front and back, left and right directions. There is no up and down. For example, a cable path drawn on paper can be called a two-dimensional cable path.
[0031] The third type of substation images includes: substation images drawn by automatically generating a model based on a two-dimensional cable path.
[0032] Under the above operating environment, an embodiment of the present invention provides an embodiment of a method for automatically generating a cable path. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Figure 2 A method for generating a cable path according to an embodiment of the present invention is as follows: Figure 2 As shown, the method comprises the following steps:
[0034] Step S202, converting the first type substation drawing into the first type substation image, and converting the second type substation drawing into the second type substation image; the second type substation image is the first type substation image with the manually drawn cable path added, and the first type substation image and the second type substation image are in a one-to-one correspondence.
[0035] Step S204, inputting the first type of substation image into the cable two-dimensional path automatic generation model to obtain the third type of substation image, wherein the cable two-dimensional path automatic generation model is determined by the following method: obtaining a real data set consisting of the first type of substation image and the second type of substation image, randomly sampling from the images in the real data set and the images output by the generator, and inputting the sampled data into a generative adversarial network for processing to obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate the substation image, and the discriminator is used to judge the authenticity of the substation image;
[0036] The third type of substation images includes: substation images drawn by automatically generating a model based on a two-dimensional cable path.
[0037] Step S206, determining the difference between the third type substation image and the second type substation image, and determining the image of the two-dimensional cable path based on the difference.
[0038] Through the above steps, in view of the modular characteristics of the internal equipment and space layout of the substation, the idea of image content recognition is adopted to convert the CAD drawings of the substation into corresponding images, and the characteristics of the cable path are identified using the generative adversarial network to form an algorithm model that can be used for automatic generation of cable paths, thereby achieving the purpose of reducing manual time and reducing costs, thereby achieving the technical effect of fully automated cable path drawing without human intervention, and thus solving the technical problem of non-fully automated path drawing caused by manual use of computer-aided design tools.
[0039] In step S202, the first type of substation drawings are converted into the first type of substation images, including: converting the first type of substation drawings into the first type of substation images of m×n pixel matrices, where m and n are both positive integers; the second type of substation drawings are converted into the second type of substation images, including: converting the second type of substation drawings into the second type of substation images of m×n pixel matrices. This step is used to preprocess the data, and the converted substation images can be used as inputs of the generative adversarial network and recognized by the generative adversarial network.
[0040] In step S202 and step S204, the first type of substation drawings include: original substation drawings without drawing the two-dimensional cable path; the first type of substation images include: original substation images without drawing the two-dimensional cable path; the second type of substation drawings include: substation drawings with manually drawn two-dimensional cable paths; the second type of substation images include: substation images with manually drawn two-dimensional cable paths; the third type of substation images include: substation images drawn by an automatically generated model of the two-dimensional cable path.
[0041] In step S204, before the sampled data is input into the generative adversarial network for processing, the generative adversarial network is initialized, wherein the initialization includes: initializing the parameters of the generator and the parameters of the discriminator, and setting the parameters of the generator and the parameters of the discriminator to default values.
[0042] In step S204, the generator receives a first type of substation image, and the output result is a substation image with a two-dimensional cable path. The discriminator is a binary classifier, and the output result is a probability. The probability range is between 0 and 1, and is used to determine whether the substation image with a two-dimensional cable path generated by the generator is a second type of substation image corresponding to the first type of substation image. The closer the probability value is to 1, the higher the authenticity of the substation image generated by the generator is considered by the discriminator. The closer the probability value is to 0, the lower the authenticity of the substation image generated by the generator is considered by the discriminator. When the probability is 0.5, a two-dimensional cable path automatic generation model is obtained, wherein the real substation image is obtained from a real data set.
[0043] After the generative adversarial network is initialized, the following processing steps can also be performed:
[0044] Step S302, when the parameters of the generator are determined, randomly sample the substation images from the real data set and the substation images output by the generator, and use the sampling results as the input of the discriminator, wherein the parameters of the generator represent the quality of the generated substation images;
[0045] Step S304, updating the parameters of the discriminator according to the input of the discriminator, wherein the parameters of the discriminator are used to judge the accuracy of the substation image with the two-dimensional cable path generated by the generator and the second type of substation image, wherein the generator generates the substation image with the two-dimensional cable path according to the first type of substation image, and the second type of substation image corresponds to the first type of substation image; if the sampling result is an image in the real data set, the image is input into the discriminator, and the output result of the discriminator is 1; if the sampling result is a substation image generated by the generator, the image is input into the discriminator, and the output result of the discriminator is 0; according to whether the input of the discriminator is an image in the real data set or a substation image generated by the generator, the parameters of the discriminator are continuously adjusted and updated;
[0046] Step S306, when the parameters of the discriminator are determined, the first type of substation image is input into the generator, and the obtained substation image with the two-dimensional cable path is used as the input of the discriminator;
[0047] Step S308, update the parameters of the generator according to the output result of the discriminator.
[0048] According to step S308, the parameters of the generator are continuously adjusted. When the discriminator cannot determine whether the output is 0 or 1 based on the image generated by the generator, the discriminator outputs 0.5, and a two-dimensional cable path automatic generation model is obtained.
[0049] In step S206, the difference includes: the result of subtracting the corresponding pixels of the third type substation image from the second type substation image, wherein the process is:
[0050] Step S402, obtaining a pixel matrix corresponding to the third type of substation image;
[0051] Step S404, obtaining a pixel matrix corresponding to the second type of substation image;
[0052] Step S406, calling the image subtraction function, performing difference calculation on the pixels corresponding to the third type substation image and the second type substation image, when the difference between the pixels is less than 0, taking the absolute value of the difference result as the value of the pixel. For example, in MATLAB, the image subtraction operation is implemented by calling the imsubstract and imabsdiff functions, the imsubstract function is used to assign 0 to the difference result less than 0, and the imabsdiff function is used to take the absolute value of the difference result.
[0053] After subtracting the corresponding pixels of the third-type substation image and the second-type substation image, the image of the two-dimensional cable path is obtained according to the pre-set threshold processing result, wherein the threshold is the difference between two pixels, which here refers to the difference between the pixels corresponding to the third-type substation image and the second-type substation image.
[0054] After obtaining the image of the two-dimensional cable path, the method includes: converting the image of the two-dimensional cable path into vector lines.
[0055] Figure 5 is a schematic diagram of a device for generating a cable path according to an embodiment of the present invention, such as Figure 5 As shown, the device comprises:
[0056] The conversion module 502 is used to convert the first-type substation drawing into the first-type substation image, and the second-type substation drawing into the second-type substation image, wherein the conversion of the first-type substation drawing into the first-type substation image includes: converting the first-type substation drawing into the first-type substation image of an m×n pixel matrix, where m and n are both positive integers; the conversion of the second-type substation drawing into the second-type substation image includes: converting the second-type substation drawing into the second-type substation image of an m×n pixel matrix, where the second-type substation image is the first-type substation image with an artificially drawn cable path added thereto, and the first-type substation image and the second-type substation image are in a one-to-one correspondence relationship;
[0057] The processing module 504 is connected to the conversion module 502, and is used to input the first type of substation image into the cable two-dimensional path automatic generation model to obtain the third type of substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtain a real data set consisting of the first type of substation image and the second type of substation image, randomly sample the images in the real data set and the images output by the generator, and input the sampled data into a generative adversarial network for processing to obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate the substation image, and the discriminator is used to judge the authenticity of the substation image; determine the difference between the third type of substation image and the second type of substation image, and determine the image of the cable two-dimensional path based on the difference.
[0058] It should be noted that Figure 5 The cable path generation device shown is used to perform Figure 2-4 The cable path generation method shown in the figure, therefore the relevant explanation pages in the above-mentioned cable path generation method are applicable to the cable path generation device, and will not be repeated here.
[0059] An embodiment of the present invention further provides a non-volatile storage medium, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the following cable path generation method:
[0060] Convert the first-type substation drawings into the first-type substation images, and convert the second-type substation drawings into the second-type substation images;
[0061] Input the first type of substation image into the cable two-dimensional path automatic generation model to obtain the third type of substation image, wherein the cable two-dimensional path automatic generation model is determined by the following method: obtain a real data set consisting of the first type of substation image and the second type of substation image, randomly sample images in the real data set and images output by the generator, input the sampled data into a generative adversarial network for processing, and obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate the substation image, and the discriminator is used to judge the authenticity of the substation image;
[0062] The difference between the third type substation image and the second type substation image is determined, and an image of the two-dimensional path of the cable is determined based on the difference.
[0063] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0064] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0065] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0066] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0067] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0068] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0069] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating a cable path, characterized in that: include: Convert the first-type substation drawings into first-type substation images, and convert the second-type substation drawings into second-type substation images; Input the first type of substation image into the cable two-dimensional path automatic generation model for analysis to obtain a third type of substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtain a real data set consisting of the first type of substation image and the second type of substation image, randomly sample images in the real data set and images output by the generator, input the sampled data into a generative adversarial network for processing, and obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate a substation image, and the discriminator is used to judge the authenticity of the substation image; Determine a difference between the third type substation image and the second type substation image, and determine an image of a two-dimensional cable path based on the difference; Before inputting the sampled data into the generative adversarial network for processing, the method includes: initializing the generative adversarial network, wherein the initialization includes: initializing the parameters of the generator and the parameters of the discriminator; The generator receives the first type of substation image, and outputs a substation image with a two-dimensional cable path, and the output result of the discriminator is a probability, which is used to determine whether the substation image with a two-dimensional cable path generated by the generator is the second type of substation image corresponding to the first type of substation image; After the generative adversarial network is initialized, the method includes: when the parameters of the generator are determined, randomly sampling from the real data set and the substation image output by the generator, using the sampling results as the input of the discriminator, and updating the parameters of the discriminator according to the input of the discriminator, wherein the parameters of the generator are used to indicate the quality of the generated substation image, and the parameters of the discriminator are used to judge the accuracy of the substation image with a two-dimensional cable path generated by the generator and the second type of substation image, wherein the generator generates the substation image with a two-dimensional cable path based on the first type of substation image, and the second type of substation image corresponds to the first type of substation image; when the parameters of the discriminator are determined, the first type of substation image is input into the generator, the obtained substation image is used as the input of the discriminator, and the parameters of the generator are updated according to the output result of the discriminator.
2. The method according to claim 1, characterized in that Converting a first-type substation drawing into a first-type substation image includes: converting the first-type substation drawing into an m×n pixel matrix of the first-type substation image, wherein m and n are both positive integers; converting a second-type substation drawing into a second-type substation image includes: converting the second-type substation drawing into an m×n pixel matrix of the second-type substation image.
3. The method according to claim 1, characterized in that The first type of substation drawings include: original substation drawings without drawing the two-dimensional cable path; the first type of substation images include: original substation images without drawing the two-dimensional cable path; the second type of substation drawings include: substation drawings with manually drawn two-dimensional cable paths; the second type of substation images include: substation images with manually drawn two-dimensional cable paths; the third type of substation images include: substation images drawn by the automatically generated model of the two-dimensional cable path.
4. The method according to claim 1, characterized in that: The difference includes: a calculation result obtained by subtracting corresponding pixels of the third type substation image from the second type substation image.
5. The method according to claim 1, characterized in that: After obtaining the image of the two-dimensional path of the cable, the method includes: converting the image of the two-dimensional path of the cable into vector lines.
6. A device for generating a cable path, characterized in that: include: A conversion module, used for converting the first type of substation drawings into the first type of substation images, and converting the second type of substation drawings into the second type of substation images; A processing module is connected to the conversion module and is used to input the first type of substation image into the cable two-dimensional path automatic generation model to obtain a third type of substation image, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtaining a real data set consisting of the first type of substation image and the second type of substation image, randomly sampling from the images in the real data set and the images output by the generator, and inputting the sampled data into a generative adversarial network for processing to obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate a substation image, and the discriminator is used to judge the authenticity of the substation image; determining the difference between the third type of substation image and the second type of substation image, and determining the cable two-dimensional path image based on the difference; before inputting the sampled data into the generative adversarial network for processing, it includes: initializing the generative adversarial network, wherein the initialization includes: initializing the parameters of the generator and the parameters of the discriminator; the generator receives the first type of substation image, and the output result is a substation with a cable two-dimensional path. The output result of the discriminator is a probability, which is used to judge whether the substation image with a two-dimensional cable path generated by the generator is the second type of substation image corresponding to the first type of substation image; after initializing the generative adversarial network, it includes: when the parameters of the generator are determined, randomly sampling from the real data set and the substation image output by the generator, taking the sampling result as the input of the discriminator, and updating the parameters of the discriminator according to the input of the discriminator, wherein the parameters of the generator are used to indicate the quality of the generated substation image, and the parameters of the discriminator are used to judge the accuracy of the substation image with a two-dimensional cable path generated by the generator and the second type of substation image, wherein the generator generates the substation image with a two-dimensional cable path according to the first type of substation image, and the second type of substation image corresponds to the first type of substation image; when the parameters of the discriminator are determined, the first type of substation image is input into the generator, the obtained substation image is taken as the input of the discriminator, and the parameters of the generator are updated according to the output result of the discriminator.
7. A device for generating a cable path, characterized in that: include: A memory for storing program instructions; A processor is connected to the memory and is used to implement the following functions when executing the program instructions: converting the first type of substation drawings into the first type of substation images, and converting the second type of substation drawings into the second type of substation images; inputting the first type of substation images into the cable two-dimensional path automatic generation model to obtain the third type of substation images, wherein the cable two-dimensional path automatic generation model is determined in the following manner: obtaining a real data set consisting of the first type of substation images and the second type of substation images, randomly sampling from the images in the real data set and the images output by the generator, and inputting the sampled data into a generative adversarial network for processing to obtain the cable two-dimensional path automatic generation model, wherein the generative adversarial network includes a generator and a discriminator, the generator is used to generate a substation image, and the discriminator is used to judge the authenticity of the substation image; determining the difference between the third type of substation image and the second type of substation image, and determining the cable two-dimensional path image based on the difference; before inputting the sampled data into the generative adversarial network for processing, including: initializing the generative adversarial network, wherein the initialization includes: initializing the parameters of the generator and the parameters of the discriminator; the generator The first type of substation image is received, and the output result is a substation image with a two-dimensional cable path. The output result of the discriminator is a probability, which is used to judge whether the substation image with a two-dimensional cable path generated by the generator is the second type of substation image corresponding to the first type of substation image; after initializing the generative adversarial network, it includes: when the parameters of the generator are determined, randomly sampling from the real data set and the substation image output by the generator, using the sampling result as the input of the discriminator, and updating the parameters of the discriminator according to the input of the discriminator, wherein the parameters of the generator are used to indicate the quality of the generated substation image, and the parameters of the discriminator are used to judge the accuracy of the substation image with a two-dimensional cable path generated by the generator and the second type of substation image, wherein the generator generates the substation image with a two-dimensional cable path according to the first type of substation image, and the second type of substation image corresponds to the first type of substation image; when the parameters of the discriminator are determined, the first type of substation image is input into the generator, the obtained substation image is used as the input of the discriminator, and the parameters of the generator are updated according to the output result of the discriminator.
Citation Information
Patent Citations
Physical loop modeling method for intelligent substation drawing
CN114547968A