[go: up one dir, main page]

CN109543125B - Method and device for drawing network elements in power dispatching data network - Google Patents

Method and device for drawing network elements in power dispatching data network Download PDF

Info

Publication number
CN109543125B
CN109543125B CN201811312298.4A CN201811312298A CN109543125B CN 109543125 B CN109543125 B CN 109543125B CN 201811312298 A CN201811312298 A CN 201811312298A CN 109543125 B CN109543125 B CN 109543125B
Authority
CN
China
Prior art keywords
information
network elements
coordinate
network
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811312298.4A
Other languages
Chinese (zh)
Other versions
CN109543125A (en
Inventor
陈昌娜
衷宇清
吴刚
崔兆阳
凌健文
张雄威
张思敏
陈永涛
陈辉煌
王雅娟
晏平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority to CN201811312298.4A priority Critical patent/CN109543125B/en
Publication of CN109543125A publication Critical patent/CN109543125A/en
Application granted granted Critical
Publication of CN109543125B publication Critical patent/CN109543125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The application relates to a method and a device for drawing network elements in a power dispatching data network. The method comprises the following steps: acquiring configuration parameters of the network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements; drawing a vector graph by adopting a GDI method according to the graph information; and coloring the vector graphics according to the color information to obtain the network elements. According to the drawing method, the vector graphics are drawn by adopting the GDI technology according to the configuration parameters, on one hand, the graphics can be drawn according to the requirements of users or user-defined parameters, and the obtained graphic structure is more flexible and diversified; on the other hand, the GDI technology is utilized during drawing, the drawing process is simpler, and the graphics can be subjected to color filling, so that the network element display mode is more diversified.

Description

Method and device for drawing network elements in power dispatching data network
Technical Field
The present application relates to the field of power dispatching data network technologies, and in particular, to a method and an apparatus for drawing network elements in a power dispatching data network, a computer device, and a storage medium.
Background
The power dispatching data network is a system for transmitting power network automation information, dispatching command instructions, relay protection and safety automation device control information; the method is an important means for ensuring the safe, stable and economic operation of the power grid, is also an important infrastructure of the power system, plays an important role in coordinating the combined operation of the components of the power system such as transmission, transformation, distribution, power utilization and the like and ensuring the safe, economic, stable and reliable operation of the power grid, powerfully guarantees the communication requirements of power production, power dispatching, reservoir dispatching, fuel dispatching, relay protection, safety automatic devices, telecontrol, power grid dispatching automation and the like, and plays an irreplaceable role in power production and management. The network element is the most critical device in the power dispatching data network, and is often used for representing different power supply facilities, and different figures, colors and the like represent different meanings. In order to more intuitively view the power scheduling data network and thus know the power transmission situation, power distribution workers often draw and set network elements.
At present, a Simple Network Management Protocol (SNMP) Network Management system is usually adopted to perform Network Management on a power data Network, and the drawing of Network elements by such a system is performed in a picture filling manner, that is, each Network element is displayed by using a previously made icon picture. In such a way, network elements can be visualized, but the network elements obtained by the presentation way cannot flexibly change colors and element type styles according to user requirements, complex secondary expansion and development are needed when elements of new types and new areas are presented, the secondary expansion development cycle is long, and the development cost is high.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device and a storage medium for drawing a network element in a power scheduling data network.
A method for drawing network elements in a power dispatching data network comprises the following steps:
acquiring configuration parameters of the network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements;
drawing a vector graph by adopting a GDI method according to the graph information;
and coloring the vector graphics according to the color information to obtain the network elements.
In one embodiment, the step of analyzing the configuration parameters to obtain the graphic information and the color information of the network element further includes:
and analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
In one embodiment, after the step of rendering the vector graphics according to the color information to obtain the network element, the method further includes:
and processing the network element according to the text information, and displaying corresponding text contents at specified positions in the network element.
In one embodiment, after the step of rendering the vector graphics according to the color information to obtain the network element, the method further includes:
generating at least one new network element identical to the network element;
determining a stacking point on the network element according to the stacking position information;
stacking at least one of the new network elements on the network element, wherein a center point of the new network element coincides with the stacking point in the same vertical direction.
In one embodiment, the graphics information includes coordinate information and shape information; in the step of drawing the vector graphics by adopting the GDI method according to the graphics information, the method comprises the following steps:
determining a coordinate point according to the coordinate information;
calling a corresponding GDI function according to the shape information;
and drawing the vector graph by taking the coordinate point as an identification point and adopting the corresponding GDI function, wherein the identification point is an end point, a focus or a central point.
In one embodiment, the step of rendering the vector graphics according to the color information includes:
segmenting the vector graphics into a plurality of closed region objects;
and calling a Color function in the GDI according to the Color information to respectively fill the Color of each closed region object to obtain the network element.
In one embodiment, the vector graphics are pie vector graphics; the graphic information also comprises a long axis value, a short axis value, an arrow head end point coordinate value, an arrow bottom end point coordinate value, an arrow head length value and an arrow head width value; in the step of drawing the vector graphics by using the coordinate point as an identification point and using the corresponding GDI function, the method includes:
taking the coordinate point as an ellipse focus to obtain a focus value coordinate;
inputting the focal value coordinate, the long axis value and the short axis value into DrawEllipse in the GDI function, and drawing an ellipse vector diagram;
translating the focus of the ellipse downwards according to a preset distance to obtain a new focus coordinate;
drawing a semi-elliptical circular arc line by using Drawarc input into the GDI function by the new focus coordinate, the long axis value and the short axis value;
connecting a long axis vertex of the elliptic vector diagram with a long axis vertex corresponding to the semi-elliptic arc line by adopting DrawLine in a GDI function;
and inputting the coordinate value of the top end point of the arrow, the coordinate values of the two end points at the bottom end of the arrow, the length value of the head of the arrow and the width value of the head of the arrow into DrawArrow in a GDI function, and obtaining the pie-shaped vector graph by adopting the DrawArrow in the ellipse vector diagram.
An apparatus of a network element in a power scheduling data network, the apparatus comprising: the system comprises a parameter acquisition module, an information acquisition module, a vector graph drawing module and a network element acquisition module;
the parameter acquisition module is used for acquiring configuration parameters of the network elements;
the information obtaining module is used for analyzing the configuration parameters to obtain the graphic information and the color information of the network elements;
the vector graph drawing module is used for drawing a vector graph by adopting a GDI method according to the graph information;
and the network element obtaining module is used for coloring the vector graphics according to the color information to obtain the network elements.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring configuration parameters of the network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements;
drawing a vector graph by adopting a GDI method according to the graph information;
and coloring the vector graphics according to the color information to obtain the network elements.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring configuration parameters of the network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements;
drawing a vector graph by adopting a GDI method according to the graph information;
and coloring the vector graphics according to the color information to obtain the network elements.
According to the method, the device, the computer equipment and the storage medium for drawing the network elements in the power dispatching data network, firstly, the configuration parameters of the network elements are obtained, the configuration parameters are analyzed to obtain the graphic information and the color information of the network elements, the vector graphics are drawn by adopting a GDI (graphics device interface) method according to the graphic information, and then the vector graphics are subjected to color filling processing according to the color information, so that the network elements are obtained. According to the drawing method, the vector graphics are drawn by adopting the GDI technology according to the configuration parameters, on one hand, the graphics can be drawn according to the requirements of users or user-defined parameters, and the obtained graphic structure is more flexible and diversified; on the other hand, the GDI technology is utilized during drawing, the drawing process is simpler, and the graphics can be subjected to color filling, so that the network element display mode is more diversified.
Drawings
FIG. 1 is a diagram of an application environment of a method for mapping network elements in a power scheduling data network according to an embodiment;
FIG. 2 is a flow diagram illustrating a method for mapping network elements in a power scheduling data network according to one embodiment;
FIG. 3 is a flow diagram illustrating a method for mapping network elements in a power scheduling data network in one embodiment;
fig. 4 is a schematic flow chart of a method for drawing network elements in a power scheduling data network according to another embodiment;
fig. 5 is a schematic flow chart of a method for drawing network elements in a power scheduling data network according to another embodiment;
FIG. 6 is a diagram illustrating a method for drawing network elements in a power scheduling data network according to another embodiment;
fig. 7 is a schematic diagram of a drawing method of a network element in a power scheduling data network in another embodiment;
FIG. 8 is a diagram of an embodiment of a power dispatch data network architecture;
FIG. 9 is a block diagram of an apparatus for scheduling network elements in a data network for power in one embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for drawing the network elements in the power dispatching data network can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the input device 104 via a network. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, the input device 104 is a device that can be used to input information, that is, can be used to input configuration parameters of network elements, and the input device 104 may be a keyboard, a mouse, and the like.
In one embodiment, as shown in fig. 2, a method for drawing a network element in a power scheduling data network is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step 202, obtaining configuration parameters of the network element, and analyzing the configuration parameters to obtain graphic information and color information of the network element.
The configuration parameters refer to parameters for drawing network elements, and corresponding network elements, which usually include graphic information, color information, and the like of the network elements, can be drawn according to the configuration parameters.
Specifically, the configuration parameters are generally input by a user who needs to draw the network elements, and the user selects the shape, size, and color of the network elements according to the properties of the functions and the like of each device in the power dispatching data network; wherein the shape of the network elements is generally a pie chart (pie or ellipse pie), a cube or a cuboid. In addition, in the power scheduling data network, the network element is generally used to represent a device, and may represent a communication core, a power transmission section, a power supply central station, and the like.
Step 204, drawing a vector graph by adopting a GDI method according to the graph information;
the GDI (Graphics Device Interface) is responsible for information exchange between the system and the drawing program, and handles Graphics and image output of all Windows programs. The GDI is configured with a plurality of functions, and the drawing of a vector graphic can be performed by calling the GDI function, wherein the vector graphic comprises drawing primitives (such as straight lines, curved lines and graphics) specified by a series of points in a coordinate system. For example, a straight line may be specified by its two end points, while an ellipse may be specified by determining the points of its two focal positions and giving a pair of numbers for the major and minor axis lengths. In this embodiment, a vector graphic can be drawn by calling a corresponding function from the GDI according to the graphic information.
And step 206, coloring the vector graphics according to the color information to obtain the network elements.
Specifically, after the vector graphics are drawn, selecting corresponding colors according to the color information to perform color filling on the vector graphics; in this embodiment, the vector graphics are usually rendered by using the color fill function of the GDI.
In the method for drawing the network elements in the power dispatching data network, firstly, the configuration parameters of the network elements are obtained, the configuration parameters are analyzed to obtain the graphic information and the color information of the network elements, the vector graphics are drawn by adopting a GDI (graphics device interface) method according to the graphic information, and then the vector graphics are subjected to color filling treatment according to the color information, so that the network elements are obtained. According to the drawing method, the vector graphics are drawn by adopting the GDI technology according to the configuration parameters, on one hand, the graphics can be drawn according to the requirements of users or user-defined parameters, and the obtained graphic structure is more flexible and diversified; on the other hand, the GDI technology is utilized during drawing, the drawing process is simpler, and the graphics can be subjected to color filling, so that the network element display mode is more diversified.
In one embodiment, the step of analyzing the configuration parameters to obtain the graphic information and the color information of the network element further includes: and analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
Specifically, the configuration parameters may further include text information and stacking position information, where the text information is mainly used to display text content and to mark the network element, which is beneficial to displaying "network element word" at a designated position in the network element, where a user of the text content may set according to his own needs, and fonts and colors in the text content may also be set by self-definition according to the user's preference; the position of the text content display can also be set, can be displayed above the network element, can be displayed in the graph of the network element, can also be displayed at the left, right, lower end and the like of the network element, and the distance between the text content display and the network element can also be adjusted according to the actual requirement.
In addition, for a network element, the network element can be composed of a single graph or a plurality of graphs which are stacked; when a graphic stack is needed, the position of the graphic stack needs to be known, and usually a certain point of the stacked network elements (i.e. the network elements at the bottom layer) is selected as a stacking point, and then a new network element is stacked with the stacking point as the center. According to the text information and the stacking position information, the text content can be rapidly displayed and stacked on the network element, the modification process is simple and convenient, and the user-defined requirement can be met to the greatest extent.
In one embodiment, as shown in fig. 3, after the step of rendering the vector graphics according to the color information to obtain the network element, the method further includes:
and step S208, processing the network element according to the text information, and displaying corresponding text contents at specified positions in the network element.
The method comprises the following specific steps: and inputting the text information into a DrawText function in the GDI, and displaying the text information at a corresponding position to display corresponding text content. The DrawText function is to write the formatted text in a specified rectangle and format the text according to a specified method (extended tab, character alignment, broken lines, etc.). By adopting the method, the text content can be conveniently displayed at the designated position in the network element, and the modification is convenient.
In one embodiment, as shown in fig. 4, after the step of rendering the vector graphics according to the color information to obtain the network element, the method further includes:
step S402, generating at least one new network element which is the same as the network element;
step S404, determining a stacking point on the network element according to the stacking position information;
at least one new network element is stacked on the network element, wherein the center point of the new network element coincides with the stacking point in the same vertical direction, step S406.
Specifically, the process of stacking network elements is as follows: copying the network elements by adopting a Clone function in the GDI, and then generating at least one new network element corresponding to the network elements; then, a stacking point is determined based on the position of the analysis stack, that is, based on the stacking position information, and then the new network basic element from the Clone is stacked on the original network element with the stacking point as the center, wherein the center point of the new network element coincides with the stacking point in the same vertical direction. The interface for creating the Clone new object can quickly create and generate a new object according to the original object. According to the method, the shape of the network element can be changed rapidly, and a new network element is generated.
In one embodiment, as shown in FIG. 5, the graphical information includes coordinate information and shape information; in the step of drawing the vector graphics by adopting the GDI method according to the graphic information, the method comprises the following steps:
step S502, determining coordinate points according to the coordinate information;
step S504, calling a corresponding GDI function according to the shape information;
and step S506, drawing a vector graph by taking the coordinate point as an identification point and adopting a corresponding GDI function, wherein the identification point is an end point, a focus or a central point.
In the present embodiment, in the process of drawing the vector image, coordinate points are determined first, and are usually determined according to coordinate information; then, determining the shape of the network element according to the shape information, and calling a corresponding GDI function according to a method for drawing the network element of the shape; for example: drawing a pixel point: setpexel (); drawing a straight line: MoveTo (), LineTo (); drawing a plurality of end-to-end lines: polyline (); drawing a rectangle: frameRect (), Rectangle (), FillRect (), FillSolidRect (); drawing a rectangle with four arc corners: RoundRect (); drawing a circle or an ellipse: ellipse (); drawing an arc: arc (), ArcTo (), and the like. Finally, drawing a vector graph by taking the coordinate point as an identification point; wherein the identification point is an end point, a focus point or a center point; for example, when drawing a straight line, the points are identified as end points; when drawing an ellipse, the identification point is an ellipse focus; the identification point is the circle center point when drawing the circle. By adopting the method, the corresponding vector graph can be quickly and accurately drawn at the designated position, so that the network element drawing is quickly completed.
In one embodiment, the step of rendering the vector graphics according to the color information includes:
dividing the vector graphics into a plurality of closed region objects;
and calling a Color function in the GDI according to the Color information to respectively fill the Color of each closed region object to obtain the network element.
In particular, a network element typically includes a plurality of different portions, each portion being denoted as an enclosed area object; different parts can be set to different colors, and the network elements with different meanings can be obtained by self-defined configuration. The specific process is as follows: and acquiring the Color information of the closed region object and the closed region object of the vector graphics through the GDI, and then performing RGB Color configuration by using the SetValue of the Color function in the GDI, namely finishing the coloring of the specified closed region. When the method is used for coloring, the operation process is simple, the modification is convenient, and the user-defined degree is very high.
In one embodiment, the vector graphics are pie vector graphics; the graphic information also comprises a long axis value, a short axis value, an arrow head end point coordinate value, an arrow bottom end point coordinate value, an arrow head length value and an arrow head width value; in the step of drawing the vector graph by using the coordinate point as the identification point and adopting the corresponding GDI function, the method comprises the following steps:
taking the coordinate point as an ellipse focus to obtain a focus value coordinate;
inputting the focal value coordinate, the long axis value and the short axis value into DrawEllipse in the GDI function, and drawing an ellipse vector diagram;
translating the focus of the ellipse downwards according to a preset distance to obtain a new focus coordinate;
inputting the new focal point coordinate, the long axis value and the short axis value into Drawarc in the GDI function to draw a semi-elliptical arc line;
connecting a long axis vertex of the elliptic vector diagram with a long axis vertex corresponding to the semi-elliptic arc line by adopting DrawLine in the GDI function;
and inputting the coordinate values of the top end points of the arrows, the coordinate values of the two end points of the bottom ends of the arrows, the length value of the heads of the arrows and the width value of the heads of the arrows into DrawArrow in a GDI function, and adopting the DrawArrow in an ellipse vector diagram and a pie vector diagram.
FIG. 6 is a schematic diagram of a pie-shaped vector graphics rendering process; as shown in fig. 6, the specific process is as follows: (1) drawing an elliptical part of the network element: inputting coordinates, long axis values and short axis values of two focuses of the ellipse as initial parameters into a DrawEllipse interface of the GDI, and drawing an ellipse part S1 of the routing element; (2) drawing a semi-elliptic arc part of the network element: downwards translating the two focuses of the ellipse in the S1 by a distance L (namely a preset distance) to obtain two new focuses, wherein the long axis value and the short axis value are consistent with those in the step (1), and drawing a section of semielliptic arc S2 by using Drawarc of GDI as parameters with the new focus coordinates, the long axis length and the short axis length; (3) drawing a straight line part of the network element: connecting the long axis vertex of the ellipse S1 with the long axis vertex corresponding to the semi-elliptic arc line S2, and respectively drawing two straight lines through DrawLine of GDI as end point parameters; (4) drawing the arrow part of the network element: and (3) transmitting the coordinate value of the top end point of the arrow, the coordinate values of the two end points of the bottom end of the arrow, the length value of the head of the arrow and the width value of the head of the arrow into a DrawArrow interface of the GDI as parameters to obtain a hollow arrow, respectively drawing 4 arrows in the ellipse part obtained by the step (S1), wherein the two arrows face inwards, the two arrows face outwards, the four arrows are pairwise mutually perpendicular, and form an included angle of 45 degrees with the horizontal coordinate axis and the vertical coordinate axis, and thus obtaining a complete pie-shaped vector graph.
To facilitate an understanding of the methods in the examples of the present invention, a more detailed example is given; after a pie vector graph is drawn, the pie vector graph needs to be colored and stacked to obtain a complete network element; as shown in fig. 7, the specific process is as follows: selecting a cake-shaped space (namely a closed space except an arrow) to be filled with red, and obtaining <1 >; selecting a closed space except the arrow, and filling the closed space with green; filling the two arrows at the lower part into red to obtain <2 >; stacking the network elements in the network element <1>, wherein the stacking position is the center of an original network element ellipse, and obtaining <3 >; stacking the network elements in the <1>, wherein the stacking position is the left focus of the original network element ellipse, and obtaining <4 >; and (3) outputting a text to the network element in the <2>, wherein the text position is right above the network element, and the text content is the 'network element', so that the <5> is obtained.
In addition, after a plurality of network elements are drawn, the network elements can be connected together, so that a power dispatching data network is formed; as shown in fig. 8, fig. 8 illustrates network elements drawn by the GDI of the power data network, which are used for distinguishing different areas by coloring the network elements; the arrows are colored differently to distinguish whether an external protocol is imported or not; through different stacking modes, the types of the network elements are described, the stacked network elements are all regional boundary elements, and the network elements which are not stacked are all regional internal elements, so that a user can know the condition of the power dispatching data network more intuitively.
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 9, there is provided an apparatus for network elements in a power scheduling data network, including a parameter obtaining module, an information obtaining module, a vector graphics drawing module, and a network element obtaining module;
a parameter obtaining module 902, configured to obtain configuration parameters of a network element;
an information obtaining module 904, configured to analyze the configuration parameters to obtain graphic information and color information of the network element;
a vector graphics drawing module 906, configured to draw a vector graphics by using a GDI method according to the graphics information;
and a network element obtaining module 908, configured to perform coloring processing on the vector graphics according to the color information to obtain a network element.
In one embodiment, the method further comprises the following steps:
and the text and stacking information obtaining module is used for analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
In one embodiment, the method further comprises the following steps:
and the text display module is used for processing the network element according to the text information and displaying corresponding text contents at specified positions in the network element.
In one embodiment, the method further comprises the following steps:
a new element generation module for generating at least one new network element identical to the network element;
a stacking point determining module for determining a stacking point on the network element according to the stacking position information;
a stacking module for stacking at least one new network element on the network element, wherein a center point of the new network element coincides with the stacking point in the same vertical direction.
In one embodiment, the graphics information includes coordinate information and shape information; the vector graphics rendering module further comprises: the system comprises a coordinate point determining module and a GDI function calling module;
the coordinate point determining module is used for determining a coordinate point according to the coordinate information;
the GDI function calling module is used for calling a corresponding GDI function according to the shape information;
and the vector graph drawing module is also used for drawing the vector graph by taking the coordinate point as an identification point and adopting a corresponding GDI function, wherein the identification point is an end point, a focus or a central point.
In one embodiment, the network element obtaining module further comprises an enclosed region object segmentation module;
the closed region object segmentation module is used for segmenting the vector graphics into a plurality of closed region objects;
and the network element obtaining module is also used for calling a Color function in the GDI according to the Color information to respectively fill the Color of each closed region object so as to obtain the network element.
In one embodiment, the vector graphics are pie vector graphics; the graphic information also comprises a long axis value, a short axis value, an arrow head end point coordinate value, an arrow bottom end point coordinate value, an arrow head length value and an arrow head width value; the vector graph drawing module also comprises a focus value coordinate determining module, an ellipse vector graph drawing module, a new focus coordinate determining module, a semi-ellipse arc line determining module, a vertex connecting module and a pie vector graph obtaining module;
the focus value coordinate determination module is used for taking the coordinate point as an elliptic focus to obtain a focus value coordinate;
the ellipse vector diagram drawing module is used for inputting the focal value coordinate, the long axis value and the short axis value into DrawEllipse in the GDI function and drawing an ellipse vector diagram;
the new focus coordinate determination module is used for translating the elliptic focus downwards according to a preset distance to obtain a new focus coordinate;
the semiellipse arc line determining module is used for drawing a semiellipse arc line by using Drawarc input into the GDI function by the new focal point coordinate, the long axis value and the short axis value;
the vertex connecting module is used for connecting a long-axis vertex of the elliptic vector diagram with a long-axis vertex corresponding to the semi-elliptic arc line by adopting DrawLine in the GDI function;
and the pie vector graph obtaining module is used for inputting the coordinate value of the top end point of the arrow head, the coordinate values of the two end points of the bottom end of the arrow head, the length value of the head of the arrow head and the width value of the head of the arrow head into DrawArrow in the GDI function, and obtaining the pie vector graph by adopting the DrawArrow in the ellipse vector graph.
For specific limitations on the devices of the network elements in the power scheduling data network, reference may be made to the above limitations on the drawing method of the network elements in the power scheduling data network, and details are not described here. The modules in the above-mentioned device for network elements in a power dispatching data network can be implemented wholly or partially by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of rendering network elements in a power scheduling data network. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring configuration parameters of the network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements;
drawing a vector graph by adopting a GDI method according to the graph information;
and coloring the vector graphics according to the color information to obtain the network elements.
In one embodiment, the processor, when executing the computer program, further performs the steps of: in the step of analyzing the configuration parameters to obtain the graphic information and the color information of the network element, the method further includes:
and analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
In one embodiment, the processor, when executing the computer program, further performs the steps of: after the step of rendering the vector graphics according to the color information to obtain the network element, the method further comprises:
and processing the network element according to the text information, and displaying corresponding text contents at specified positions in the network element.
In one embodiment, the processor, when executing the computer program, further performs the steps of: after the step of rendering the vector graphics according to the color information to obtain the network element, the method further comprises:
generating at least one new network element identical to the network element;
determining a stacking point on the network element according to the stacking position information;
at least one new network element is stacked on the network element, wherein the center point of the new network element coincides with the stacking point in the same vertical direction.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the graphic information includes coordinate information and shape information; in the step of drawing the vector graphics by adopting the GDI method according to the graphic information, the method comprises the following steps:
determining a coordinate point according to the coordinate information;
calling a corresponding GDI function according to the shape information;
and drawing a vector graph by taking the coordinate point as an identification point and adopting a corresponding GDI function, wherein the identification point is an end point, a focus or a central point.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the step of rendering the vector graphics according to the color information includes:
dividing the vector graphics into a plurality of closed region objects;
and calling a Color function in the GDI according to the Color information to respectively fill the Color of each closed region object to obtain the network element.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the vector graph is a pie vector graph; the graphic information also comprises a long axis value, a short axis value, an arrow head end point coordinate value, an arrow bottom end point coordinate value, an arrow head length value and an arrow head width value; in the step of drawing the vector graph by using the coordinate point as the identification point and adopting the corresponding GDI function, the method comprises the following steps:
taking the coordinate point as an ellipse focus to obtain a focus value coordinate;
inputting the focal value coordinate, the long axis value and the short axis value into DrawEllipse in the GDI function, and drawing an ellipse vector diagram;
translating the focus of the ellipse downwards according to a preset distance to obtain a new focus coordinate;
inputting the new focal point coordinate, the long axis value and the short axis value into Drawarc in the GDI function to draw a semi-elliptical arc line;
connecting a long axis vertex of the elliptic vector diagram with a long axis vertex corresponding to the semi-elliptic arc line by adopting DrawLine in the GDI function;
and inputting the coordinate values of the top end points of the arrows, the coordinate values of the two end points of the bottom ends of the arrows, the length value of the heads of the arrows and the width value of the heads of the arrows into DrawArrow in the GDI function, and obtaining a pie-shaped vector graph by adopting the DrawArrow in an ellipse vector diagram.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring configuration parameters of the network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements;
drawing a vector graph by adopting a GDI method according to the graph information;
and coloring the vector graphics according to the color information to obtain the network elements.
In one embodiment, the computer program when executed by the processor further performs the steps of: in the step of analyzing the configuration parameters to obtain the graphic information and the color information of the network element, the method further includes:
and analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the step of rendering the vector graphics according to the color information to obtain the network element, the method further comprises:
and processing the network element according to the text information, and displaying corresponding text contents at specified positions in the network element.
In one embodiment, the computer program when executed by the processor further performs the steps of: after the step of rendering the vector graphics according to the color information to obtain the network element, the method further comprises:
generating at least one new network element identical to the network element;
determining a stacking point on the network element according to the stacking position information;
at least one new network element is stacked on the network element, wherein the center point of the new network element coincides with the stacking point in the same vertical direction.
In one embodiment, the computer program when executed by the processor further performs the steps of: the graphic information includes coordinate information and shape information; in the step of drawing the vector graphics by adopting the GDI method according to the graphic information, the method comprises the following steps:
determining a coordinate point according to the coordinate information;
calling a corresponding GDI function according to the shape information;
and drawing a vector graph by taking the coordinate point as an identification point and adopting a corresponding GDI function, wherein the identification point is an end point, a focus or a central point.
In one embodiment, the computer program when executed by the processor further performs the steps of: the step of rendering the vector graphics according to the color information includes:
dividing the vector graphics into a plurality of closed region objects;
and calling a Color function in the GDI according to the Color information to respectively fill the Color of each closed region object to obtain the network element.
In one embodiment, the computer program when executed by the processor further performs the steps of: the vector graph is a pie vector graph; the graphic information also comprises a long axis value, a short axis value, an arrow head end point coordinate value, an arrow bottom end point coordinate value, an arrow head length value and an arrow head width value; in the step of drawing the vector graph by using the coordinate point as the identification point and adopting the corresponding GDI function, the method comprises the following steps:
taking the coordinate point as an ellipse focus to obtain a focus value coordinate;
inputting the focal value coordinate, the long axis value and the short axis value into DrawEllipse in the GDI function, and drawing an ellipse vector diagram;
translating the focus of the ellipse downwards according to a preset distance to obtain a new focus coordinate;
inputting the new focal point coordinate, the long axis value and the short axis value into Drawarc in the GDI function to draw a semi-elliptical arc line;
connecting a long axis vertex of the elliptic vector diagram with a long axis vertex corresponding to the semi-elliptic arc line by adopting DrawLine in the GDI function;
and inputting the coordinate values of the top end points of the arrows, the coordinate values of the two end points of the bottom ends of the arrows, the length value of the heads of the arrows and the width value of the heads of the arrows into DrawArrow in the GDI function, and obtaining a pie-shaped vector graph by adopting the DrawArrow in an ellipse vector diagram.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for drawing network elements in a power dispatching data network, the method comprising:
acquiring configuration parameters of network elements, and analyzing the configuration parameters to obtain graphic information and color information of the network elements, wherein the graphic information comprises coordinate information and shape information;
determining a coordinate point according to the coordinate information;
calling a corresponding GDI function according to the shape information;
drawing a vector graph by taking the coordinate point as an identification point and adopting the corresponding GDI function, wherein the identification point is an end point, a focus or a central point;
and coloring the vector graphics according to the color information to obtain the network elements.
2. The method for drawing network elements in a power dispatching data network according to claim 1, wherein the step of analyzing the configuration parameters to obtain graphic information and color information of the network elements further comprises:
and analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
3. The method for drawing network elements in a power dispatching data network as claimed in claim 2, wherein after the step of rendering the vector graphics according to the color information to obtain network elements, the method further comprises:
and processing the network element according to the text information, and displaying corresponding text contents at specified positions in the network element.
4. The method for drawing network elements in a power dispatching data network as claimed in claim 2, wherein after the step of rendering the vector graphics according to the color information to obtain network elements, the method further comprises:
generating at least one new network element identical to the network element;
determining a stacking point on the network element according to the stacking position information;
stacking at least one of the new network elements on the network element, wherein a center point of the new network element coincides with the stacking point in the same vertical direction.
5. The method for drawing network elements in a power scheduling data network according to any one of claims 1 to 4, wherein the step of rendering the vector graphics according to the color information comprises:
segmenting the vector graphics into a plurality of closed region objects;
and calling a Color function in the GDI according to the Color information to respectively fill the Color of each closed region object to obtain the network element.
6. The method for drawing network elements in a power dispatching data network as claimed in claim 1, wherein the vector graphics are pie vector graphics; the graphic information also comprises a long axis value, a short axis value, an arrow head end point coordinate value, an arrow bottom end point coordinate value, an arrow head length value and an arrow head width value; in the step of drawing the vector graphics by using the coordinate point as an identification point and using the corresponding GDI function, the method includes:
taking the coordinate point as an ellipse focus to obtain a focus value coordinate;
inputting the focal value coordinate, the long axis value and the short axis value into DrawEllipse in the GDI function, and drawing an ellipse vector diagram;
translating the focus of the ellipse downwards according to a preset distance to obtain a new focus coordinate;
drawing a semi-elliptical circular arc line by using Drawarc input into the GDI function by the new focus coordinate, the long axis value and the short axis value;
connecting a long axis vertex of the elliptic vector diagram with a long axis vertex corresponding to the semi-elliptic arc line by adopting DrawLine in a GDI function;
and inputting the coordinate value of the top end point of the arrow, the coordinate values of the two end points at the bottom end of the arrow, the length value of the head of the arrow and the width value of the head of the arrow into DrawArrow in a GDI function, and obtaining the pie-shaped vector graph by adopting the DrawArrow in the ellipse vector diagram.
7. An apparatus for mapping network elements in a power scheduling data network, the apparatus comprising: the system comprises a parameter acquisition module, an information acquisition module, a vector graph drawing module and a network element acquisition module;
the parameter acquisition module is used for acquiring configuration parameters of the network elements;
the information obtaining module is used for analyzing the configuration parameters to obtain graphic information and color information of the network elements, wherein the graphic information comprises coordinate information and shape information;
the vector graphic drawing module is used for determining coordinate points according to the coordinate information; calling a corresponding GDI function according to the shape information; drawing a vector graph by taking the coordinate point as an identification point and adopting the corresponding GDI function, wherein the identification point is an end point, a focus or a central point;
and the network element obtaining module is used for coloring the vector graphics according to the color information to obtain the network elements.
8. The apparatus for mapping network elements in a power dispatching data network of claim 7, wherein the apparatus further comprises:
and the text and stacking information obtaining module is used for analyzing the configuration parameters to obtain the text information and the stacking position information of the network elements.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201811312298.4A 2018-11-06 2018-11-06 Method and device for drawing network elements in power dispatching data network Active CN109543125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811312298.4A CN109543125B (en) 2018-11-06 2018-11-06 Method and device for drawing network elements in power dispatching data network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811312298.4A CN109543125B (en) 2018-11-06 2018-11-06 Method and device for drawing network elements in power dispatching data network

Publications (2)

Publication Number Publication Date
CN109543125A CN109543125A (en) 2019-03-29
CN109543125B true CN109543125B (en) 2020-11-03

Family

ID=65845118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811312298.4A Active CN109543125B (en) 2018-11-06 2018-11-06 Method and device for drawing network elements in power dispatching data network

Country Status (1)

Country Link
CN (1) CN109543125B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110473273B (en) * 2019-07-24 2023-05-09 广州视源电子科技股份有限公司 Vector graph drawing method and device, storage medium and terminal
CN112749356A (en) * 2019-10-30 2021-05-04 北京国双科技有限公司 Webpage graph display method and device
CN111199512B (en) * 2019-12-24 2023-08-15 远光软件股份有限公司 SVG vector graphic adjustment method, SVG vector graphic adjustment device, storage medium and SVG vector graphic adjustment terminal
CN112597414B (en) * 2020-11-25 2022-03-08 中科三清科技有限公司 Pollutant observation data processing method and system, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2220905B1 (en) * 2007-11-20 2017-07-26 Telstra Corporation Limited System and process for dimensioning a cellular telecommunications network
CN103838925B (en) * 2014-03-04 2016-08-17 国网安徽省电力公司 Power network rack pattern drawing method based on computer information technology
CN104504701A (en) * 2014-12-19 2015-04-08 深圳先进技术研究院 Image display method and system based on streetscape attribute information
CN105488269A (en) * 2015-11-29 2016-04-13 国家电网公司 CIM based automatic graph-forming system for power transmission and distribution network
CN108733442A (en) * 2017-04-18 2018-11-02 西安融成科技有限公司 A kind of electronic chart escape character structure system based on vector symbol description language

Also Published As

Publication number Publication date
CN109543125A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109543125B (en) Method and device for drawing network elements in power dispatching data network
CN109146991B (en) Picture format conversion method, device, equipment and storage medium
CN111383308A (en) Method and electronic equipment for generating animation expression
CN108304243B (en) Interface generation method and device, computer equipment and storage medium
CN112102437A (en) Canvas-based radar map generation method and device, storage medium and terminal
CN107943363A (en) Background image configuration method and device, interactive intelligent panel and storage medium
CN109711396A (en) Generation method, device, equipment and the readable storage medium storing program for executing of OCR training sample
CN110033515A (en) Figure conversion method, device, computer equipment and storage medium
CN105227873B (en) A kind of test method and device of on-screen display data
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
CN110428504B (en) Text image synthesis method, apparatus, computer device and storage medium
CN109992730B (en) Method, device, computer equipment and storage medium for generating active page URL
CN114003160A (en) Data visualization display method and device, computer equipment and storage medium
CN111191800A (en) Equipment model checking method and device, computer equipment and storage medium
CN110910475A (en) Picture editing method and device, computer equipment and storage medium
CN108229270A (en) For identifying the method, apparatus and electronic equipment of road from remote sensing images
CN110781653B (en) Method, device, computer equipment and storage medium for drawing svg chart by using vue
CN115641397A (en) Method and system for synthesizing and displaying virtual image
CN114926615A (en) Modeling method, device, equipment and storage medium
CN108287707B (en) JSX file generation method and device, storage medium and computer equipment
CN108876713B (en) Mapping method and device of two-dimensional template image, terminal equipment and storage medium
CN112581620A (en) Image processing method, image processing device, electronic equipment and storage medium
CN106126214A (en) The determination method and device of text color on a kind of interface
CN114863008B (en) Image processing method, device, electronic device and storage medium
KR102445082B1 (en) How to control the server that provides the solution of the block puzzle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200916

Address after: 510620 Tianhe District, Guangzhou, Tianhe South Road, No. two, No. 2, No.

Applicant after: Guangzhou Power Supply Bureau of Guangdong Power Grid Co.,Ltd.

Address before: 510620 Tianhe District, Guangzhou, Tianhe South Road, No. two, No. 2, No.

Applicant before: GUANGZHOU POWER SUPPLY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant