Disclosure of Invention
The method for generating the secondary equipment graph can be used for efficiently drawing the secondary equipment graph, is convenient for a user to look up and improves the user experience; another core of the present application is to provide a system and an apparatus for generating a secondary device graph, both having the above technical effects.
In order to solve the above technical problem, the present application provides a method for generating a secondary device graph, including:
receiving secondary device data;
organizing according to the secondary equipment data to obtain secondary equipment page data;
calling a corresponding secondary equipment mould according to the secondary equipment page data;
and arranging the secondary equipment mould and the auxiliary graphic elements on a secondary equipment page according to a preset layout rule to obtain a secondary equipment graph.
Optionally, before organizing and obtaining the secondary device page data according to the secondary device data, the method further includes:
and carrying out data error checking processing on the secondary equipment data.
Optionally, the organizing and obtaining secondary device page data according to the secondary device data includes:
organizing according to the secondary equipment data to obtain secondary equipment list data;
organizing and obtaining screen cabinet list data, protection cubicle list data and interval list data according to the secondary equipment list data;
organizing according to the screen cabinet list data and the protection cubicle list data to obtain protection cubicle page data and protection cubicle screen page data;
and organizing according to the screen cabinet list data and the interval list data to obtain interval screen page data, interval abnormal signal page data and interval soft pressing plate page data.
Optionally, the method further includes:
and cascading the label of each secondary equipment page with the primary equipment page and/or the secondary equipment page.
In order to solve the above technical problem, the present application further provides a system for generating a secondary device graph, including:
the receiving module is used for receiving secondary equipment data;
the processing module is used for organizing and obtaining secondary equipment page data according to the secondary equipment data;
the calling module is used for calling a corresponding secondary equipment mould according to the secondary equipment page data;
and the generating module is used for arranging the secondary equipment mould and the auxiliary graphic elements on a secondary equipment page according to a preset layout rule to obtain a secondary equipment graph.
Optionally, the method further includes:
and the error checking module is used for carrying out data error checking processing on the secondary equipment data.
Optionally, the processing module includes:
the first list data organization unit is used for organizing and obtaining secondary equipment list data according to the secondary equipment data;
the second list data organization unit is used for organizing and obtaining screen cabinet list data, protection cubicle list data and interval list data according to the secondary equipment list data;
the first page data organization unit is used for organizing and obtaining protection cubicle page data and protection cubicle screen page data according to the screen cabinet list data and the protection cubicle list data;
and the second page data organization unit is used for organizing and obtaining interval screen page data, interval abnormal signal page data and interval soft pressing plate page data according to the screen cabinet list data and the interval list data.
Optionally, the method further includes:
and the cascading module is used for cascading the label of each secondary equipment page with the primary equipment page and/or the secondary equipment page.
In order to solve the above technical problem, the present application further provides a device for generating a secondary device graph, including:
a memory for storing a computer program;
a processor for implementing the steps of the secondary device graph generation method according to any one of the above when executing the computer program.
The method for generating the secondary device graph comprises the steps of receiving secondary device data; organizing according to the secondary equipment data to obtain secondary equipment page data; calling a corresponding secondary equipment mould according to the secondary equipment page data; and arranging the secondary equipment mould and the auxiliary graphic elements on a secondary equipment page according to a preset layout rule to obtain a secondary equipment graphic.
Therefore, the method for generating the secondary equipment graph provided by the application adopts an automatic drawing mode, and the drawing efficiency can be effectively improved. On the basis of receiving secondary equipment data, the secondary equipment graph generating method obtains secondary equipment page data according to secondary equipment data organization and further calls corresponding secondary equipment molds according to the secondary equipment page data, and then each secondary equipment mold and auxiliary graphic element are arranged according to preset layout rules to obtain secondary equipment graphs, so that ordered and attractive secondary equipment graphs can be presented, a user can check conveniently, and the use experience of the user is effectively improved.
The system and the device for generating the secondary device graph have the technical effects.
Detailed Description
The core of the application is to provide a method for generating the secondary equipment graph, the secondary equipment graph can be efficiently drawn, a user can conveniently look up the secondary equipment graph, and the use experience of the user is improved; the other core of the application is to provide a system and a device for generating secondary device graphs, which have the technical effects.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for generating a secondary device graph according to an embodiment of the present disclosure; referring to fig. 1, the generation method includes:
s101: receiving secondary device data;
specifically, a secondary device data template is preset based on the affiliated relationships of secondary devices (such as a pressure plate, an air switch, and the like), devices, a screen cabinet, a protection cubicle, and intervals, so that a user can input related secondary device data according to the secondary device data template in combination with actual conditions, for example, secondary device data can be input in an Excel form, and each line of the Excel form corresponds to one secondary device. Wherein, the device is the container of secondary equipment, and secondary equipment directly belongs to the device. The screen cabinet is a container of the device, namely the device directly belongs to the screen cabinet. The protection cubicle is a container of the screen cabinet, namely the screen cabinet directly belongs to the protection cubicle. In addition, bay is a proprietary concept of the power industry, and devices belong to the bay. In view of this, the secondary device data template may include a secondary device name, a device number, a device type, an belonging apparatus, a device attribute, an belonging screen cabinet, a screen cabinet attribute, an belonging interval, an interval attribute, an belonging protection cell, a protection cell attribute, an extension attribute, and the like. Of course, the specific content of the secondary device data template is not limited uniquely, and can be set appropriately according to the actual application needs.
S102: organizing according to the secondary equipment data to obtain secondary equipment page data;
specifically, on the basis of receiving the secondary device data, the step aims to organize and obtain the secondary device page data according to the secondary device data so as to further obtain the secondary device graph based on the secondary device page data. In a specific embodiment, the organizing and obtaining the secondary device page data according to the secondary device data includes: organizing according to the secondary equipment data to obtain secondary equipment list data; organizing according to the secondary equipment list data to obtain screen cabinet list data, protection cubicle list data and interval list data; organizing according to the screen cabinet list data and the protection cubicle list data to obtain protection cubicle page data and protection cubicle screen page data; and organizing according to the screen cabinet list data and the interval list data to obtain interval screen page data, interval abnormal signal page data and interval soft pressing plate page data.
Specifically, secondary device list data is organized according to the secondary device data, and each secondary device in the secondary device list data includes all attributes used for generating a secondary device graph, such as a name and a type of the secondary device. Further, the screen cabinet list data, the protection cubicle list data and the interval list data are organized according to the secondary equipment list data.
Organizing and obtaining screen cabinet list data according to the secondary equipment list data: the classes of secondary equipment in the cubicle are known and include air switches, selector switches, hard platens and soft platens. Therefore, when the screen cabinet list data is organized, the four types of secondary equipment are screened out from the secondary equipment list data, and then the screen cabinet equipment list is organized to obtain, and according to the 'belonged screen cabinet' of the secondary equipment attribute in the screen cabinet equipment list, each secondary equipment in the screen cabinet equipment list is divided into related equipment lists under different screen cabinets, and then the screen cabinet list data is organized to obtain. The screen cabinet list data may include a screen cabinet name, a screen cabinet type, a screen cabinet under air switch list, a screen cabinet under selection switch list, a screen cabinet under hard platen list, a screen cabinet under soft platen device list, and the like.
Organizing and obtaining protection cell list data according to the secondary equipment list data: traversing the secondary equipment list data, organizing according to the 'belonged protection cubicle' of the secondary equipment attribute to obtain a protection cubicle name list, and adding the corresponding cubicle to the protection cubicle according to the 'belonged cubicle' in the secondary equipment attribute. Naturally, if the cabinet already exists in the protection cubicle, the addition is not repeated. And obtaining protection cubicle list data after traversing, wherein the protection cubicle list data can comprise each protection cubicle and a screen cabinet name list under each protection cubicle, and further adding related screen cabinet information into the screen cabinet information under the protection cubicles according to the screen cabinet list.
Organizing and obtaining interval list data according to the secondary equipment list data: and traversing the secondary equipment list data, and organizing according to the 'affiliated interval' of the secondary equipment attribute to obtain an interval name list. And if the secondary equipment is secondary equipment in the screen cabinet, adding the corresponding screen cabinet to the interval to which the secondary equipment belongs according to the 'belonging screen cabinet' of the attribute of the secondary equipment. Likewise, if the cubicle is already present under the interval, the addition is not repeated. In addition, if the type of the secondary device is an abnormal signal, it is added to the abnormal signal list in the interval information, and if the type of the secondary device is a soft platen, it is added to the soft platen list in the interval information. And finally obtaining interval list data after traversing. The interval information comprises an interval name, an interval lower screen cabinet list, an abnormal signal list and a soft pressing plate list.
On the basis of obtaining screen cabinet list data, protection cubicle list data and interval list data, further obtaining protection cubicle page data and protection cubicle screen page data according to the screen cabinet list data and the protection cubicle list data; the protection cubicle page data can include each protection cubicle and the cubicles included in each protection cubicle. The protection cubicle screen page data can include devices and equipment contained in the protection cubicle. And obtaining interval screen page data, interval abnormal signal page data and interval soft pressing plate page data according to the interval list data. The partition screen page data can comprise devices and secondary equipment contained in each partition screen cabinet. Each compartment exception page data may include all exception signals for the devices in the compartment. Each interval soft platen page data may include all soft platens in the interval, and the soft platens are distinguished and displayed according to the device to which they belong.
Specifically, protection cubicle page data is obtained according to cubicle list data and protection cubicle list data: and traversing the list data of the protection cells, and acquiring the names of the protection cells and the names of the screen cabinets under the protection cells so as to obtain the page data of the protection cells. Reference is made to a schematic illustration of a protection cubicle page shown in FIG. 2.
Obtaining screen page data of the protection cubicle according to the screen cabinet list data and the protection cubicle list data: traversing the data of the protection cell list, obtaining the name of the protection cell, the name of the screen cabinet and the secondary equipment list under the screen cabinet, and further obtaining the screen page data of the protection cell. Reference is made to a schematic illustration of a protection cubicle screen page shown in FIG. 3.
Obtaining interval screen page data according to the interval list data: and traversing the interval list data, and acquiring an interval name, an under-interval screen cabinet name list and an under-screen cabinet secondary equipment list so as to obtain interval screen page data. Reference is made to figure 4 which shows a schematic view of a spacer screen page.
Obtaining interval abnormal signal page data according to the interval list data: traversing the interval list data, and acquiring an interval name and an abnormal signal list so as to obtain interval abnormal signal page data. Refer to fig. 5 for a schematic diagram of an interval exception page.
Obtaining interval soft pressing plate page data according to the interval list data: and traversing the interval list data, acquiring an interval name and a soft pressing plate list, and further acquiring interval soft pressing plate page data. Reference is made to a schematic illustration of a spaced soft platen page shown in fig. 6.
The interval screen pages, the interval abnormal signal pages and the interval soft pressing plate pages can be provided with interval signal lamps, and specifically can be arranged at the upper right corners of the interval abnormal signal pages and other pages to represent the interval remote control state. The number and the type of each interval signal lamp can be obtained by calculation according to the model topology of a primary wiring diagram page, namely a primary equipment page. Typically, one interval corresponds to one switch, multiple switches. In addition, in the practical application process, the green signal lamp can indicate that the state is allowed, and the red signal lamp can indicate that the state is not allowed.
In addition, the accuracy of the secondary device data is a key for generating the secondary device graph, and therefore, in order to ensure the integrity and the validity of the secondary data, in a specific embodiment, before the organizing and obtaining the secondary device page according to the secondary device data, the method further includes: and carrying out data error checking on the secondary equipment data.
Specifically, after receiving the secondary device data input by the user, data error checking is performed on the secondary device data first, so that when the secondary device data is correct, the secondary device data is imported. Wherein the error checking for the secondary device data may comprise: the interval is as follows: checking the interval of the device according to the interval data in the topology data; numbering the screen cabinets: checking the screen cabinet number according to the regular expression, if the screen cabinet number which only supports the symbols of English, number, -sum # "is set; device name: checking the device name according to the regular expression, if the device name is set to only support the device name consisting of symbols of Chinese, english, number, -, #, I, II, III, IV, V, VI, VII, VIII, IX, X, XI and XII; the device type is as follows: checking whether the device type exists according to data in a preset device type table; voltage class: the voltage class of the device is checked according to the voltage class specification, and the device can be set to a format only supporting 'digit + V' and 'digit + kV'; the primary equipment comprises: checking whether primary equipment of the device exists according to primary equipment data in the station data; doubling: the dualization may be set to a format that supports only numbers, and the dualization of the device is checked according to this format.
The secondary device data error checking may include: equipment numbering: checking the name of the device according to the regular expression, and setting the name to only support the device name consisting of symbols of Chinese, english, number, -, #, I, II, III, IV, V, VI, VII, VIII, IX, X, XI and XII; device type: checking whether the equipment type of the secondary equipment exists according to the type data in a preset equipment type table; the type of the device: checking whether the equipment type of the secondary equipment exists according to the type data in the equipment type table; the device function type: checking whether the function type of the secondary equipment exists according to the function type data in the equipment type table; primary equipment: checking whether primary equipment to which secondary equipment belongs exists according to primary equipment data in the station data; the screen cabinet belongs to: checking whether a screen cabinet of the secondary equipment exists according to the screen cabinet name data in the secondary device table; the device comprises: checking whether a device to which the secondary equipment belongs exists or not according to the device name data in the secondary device table; the interval is as follows: checking the interval to which the secondary equipment belongs according to the interval data in the topological data; and (3) equipment repeatability inspection: performing repeatability check on secondary equipment according to the rule that equipment with the same number and name is not allowed to appear under the same device; and (3) line value repeatability inspection: performing row and column value repeatability check on secondary equipment according to the rule that hard pressing equipment with the same number is not allowed to appear under the same screen cabinet (the pattern arrangement of the hard pressing equipment needs only one hard pressing equipment under one position); checking the state number in the extended attribute: according to the fact that the extended attributes of the selective switch (except for the remote local selective switch) equipment must have the state number attributes, the extended attributes of the selective switch equipment are checked, and other equipment does not require the state number attributes; wherein, the state number attribute needs to satisfy: the rule of [ state number ] = [ state value 1 ] + [ state N ]) performs the check of the number of states in the extended attribute of the secondary device.
For example, when the device repeatability check is performed, two pieces of identical secondary device data are found to exist, and at this time, a data error can be performed, specifically, the position of the data in the input Excel table and the error reason can be clearly indicated, for example: the same number (QF 2) exists in rows 3 and 4, and both belong to the device (# 1 Main Transformer 110KV side 18A1 disconnecting link chassis)! The same number (QF 2) exists on line 4 and line 3, and both belong to the device (# 1 Main Transformer 110KV side 18A1 disconnecting link chassis)!
S103: calling a corresponding secondary equipment mould according to the secondary equipment page data;
s104: and arranging the secondary equipment mould and the auxiliary graphic elements on a secondary equipment page according to a preset layout rule to generate a secondary equipment graphic.
Specifically, each secondary device page data is obtained according to the organization, and a secondary device mold required to be drawn by each secondary device page is called, wherein the secondary device mold is used for displaying the corresponding secondary device. Further, the secondary equipment mould and the auxiliary graphic elements are orderly arranged in the page of the secondary equipment to obtain a secondary equipment graphic; wherein the auxiliary graphical element may comprise a label for drawing text; lines for segmenting regions. In addition, the secondary equipment mould is stored in a mould library in advance, and the corresponding secondary equipment mould is called from the mould library according to the type, the function type, the extended attribute and the like of the secondary equipment. The specific pattern of the secondary equipment mold can be set according to actual needs.
Further, on the basis of the above embodiment, optionally, the method further includes: and cascading the label of each secondary equipment page with the primary equipment page and/or the secondary equipment page.
Specifically, the step is directed to performing label cascading, which includes cascading a label of a primary device page with a secondary device page, cascading a label of a secondary device page with the primary device page, and cascading a label of the secondary device page with the secondary device page. For example, concatenating a tag named protection cubicle in a primary device page to a first protection cubicle page; cascading a label named a golden-half I path in a primary equipment page to a first page of a related page of the golden-half I path; and cascading a label named as a return main page in a page of a protection cubicle screen in a secondary equipment page to a primary equipment page. (where, if there are multiple pages of primary device pages, then the tag named return main page in the protection cubicle screen page in the secondary device page may be concatenated to the first page in the primary device page). The tag named protection cubicle name is concatenated to the corresponding protection cubicle page. Tags for cabinet names (e.g., 221kv gold half I way 283 line 931 protection screen) are cascaded to the corresponding protection cubicle screen page. Therefore, after the label cascade processing, the aim of jumping to the related page can be realized by clicking the label subsequently, so that the label cascade processing is convenient to look up.
Further, on the basis of completing the above operations, the operation state of the secondary device can be presented in real time by receiving the signal of the operation state of the secondary device and by means of a secondary device mold, and the current actual operation condition of the secondary device can be known by usually checking a secondary device graph, for example, a certain main protection function hard pressing plate is in an input state. And the real secondary equipment can be operated according to the generated operation ticket by clicking the secondary equipment on the secondary equipment image to perform simulated billing operation. In addition, secondary device attributes and the like can be viewed, modified by operating the secondary device graph.
In conclusion, the method for generating the secondary device graph provided by the application adopts an automatic drawing mode, so that the drawing efficiency can be effectively improved. On the basis of receiving the secondary equipment data, the secondary equipment graph generating method obtains the secondary equipment page data according to the secondary equipment data organization and further calls the corresponding secondary equipment molds according to the secondary equipment page data, and then arranges all the secondary equipment molds and the auxiliary graphic elements according to the preset layout rule to obtain the secondary equipment graph.
The application also provides a system for generating the secondary device graph, and the system described below can be correspondingly referenced with the method described above. Referring to fig. 7, fig. 7 is a schematic diagram of a secondary device graph generating system according to an embodiment of the present disclosure; with reference to fig. 7, the generation system includes:
a receiving module 10, configured to receive secondary device data;
the processing module 20 is configured to obtain secondary device page data according to the secondary device data organization;
the calling module 30 is used for calling a corresponding secondary equipment mould according to the secondary equipment page data;
and the generating module 40 is configured to arrange the secondary device mold and the auxiliary graphic elements on a secondary device page according to a preset layout rule to obtain a secondary device graphic.
On the basis of the above embodiment, optionally, the method further includes:
and the error checking module is used for carrying out data error checking processing on the secondary equipment data.
On the basis of the above embodiment, optionally, the processing module 20 includes:
the first list data organization unit is used for organizing and obtaining secondary equipment list data according to the secondary equipment data;
the second list data organization unit is used for organizing and obtaining screen cabinet list data, protection cubicle list data and interval list data according to the secondary equipment list data;
the first page data organization unit is used for organizing and obtaining protection cubicle page data and protection cubicle screen page data according to the screen cabinet list data and the protection cubicle list data;
and the second page data organization unit is used for organizing and obtaining interval screen page data, interval abnormal signal page data and interval soft pressing plate page data according to the screen cabinet list data and the interval list data.
On the basis of the above embodiment, optionally, the method further includes:
and the cascading module is used for cascading the label of each secondary equipment page with the primary equipment page and/or the secondary equipment page.
The present application further provides an apparatus for generating a secondary device graph, which is shown with reference to fig. 8 and includes a memory 1 and a processor 2. Wherein, the memory 1 is used for storing computer programs; a processor 2, configured to implement the following steps when executing the computer program:
receiving secondary device data; organizing according to the secondary equipment data to obtain secondary equipment page data; calling a corresponding secondary equipment mould according to the secondary equipment page data; and arranging the secondary equipment mould and the auxiliary graphic elements on a secondary equipment page according to a preset layout rule to obtain a secondary equipment graph.
For the introduction of the secondary device graph generating apparatus provided by the present invention, please refer to the embodiment of the above method, which is not described herein again.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. The apparatuses, devices, and computer-readable storage media disclosed in the embodiments correspond to the methods disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to in the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, system and apparatus for generating a secondary device graph provided in the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.