Disclosure of Invention
The invention aims to solve the technical problem that in the prior art, it is very difficult to accurately transmit the design information of engineering designers to subsequent links only by using a logic function diagram, and aims to provide a labeling method based on a cloud diagram of a logic algorithm diagram of a nuclear power plant DCS platform, so as to solve the problem.
The invention is realized by the following technical scheme:
a labeling method based on a nuclear power plant DCS platform logic algorithm map cloud picture comprises the following steps:
establishing a logic layer and a label layer;
when a cloud picture annotation layer instruction is received, switching to an annotation layer; setting a cloud picture pattern in the marking layer, and recording the position of a key point selected by a user in the marking layer; selecting a tracking scheme according to the cloud picture pattern and the key point positions, and determining the final frame range of the cloud picture; drawing a frame of the cloud picture, and smoothly connecting the head point and the tail point of the frame;
when the logic diagram is drawn, switching to the logic layer and finishing the drawing of the logic diagram;
and extracting the logic diagram layer data of the logic layer, filtering out the data of the label layer, and generating a logic execution file from the logic diagram layer data.
When the method is applied, a graph layering mode is adopted, a core function graph and a comment cloud graph are independently drawn and jointly used, the graph is graded, and the cloud graph is used as a principle that a high-grade logic graph is not influenced by a low grade. Based on the principle, the drawn logic function diagram is drawn in a labeling layer, and a cloud diagram labeling method is provided. On one hand, the method can realize that the description information in the whole logic function diagram is transferred to the next link step by step, accurately and dependently; on the other hand, the logic part of the functional diagram is guaranteed not to be interfered and influenced.
The invention provides a method for layering graph drawing according to grades and an algorithm for automatic area tracking closing. The core logic function and the description information are all presented by the same logic function diagram, and the presentation mode of the description information is flexibly designed by designers according to actual requirements. The main work to be done to implement the present invention consists of four steps. Firstly, according to user setting, a logic layer and a cloud layer drawn by a graph are flexibly switched. Secondly, according to the input of an operator, a cloud picture frame pattern is set, and the thinking activities of the operator are shown by different line widths, colors, line types and the like. And thirdly, according to the position of a plurality of points selected by a user on the cloud picture labeling layer, the configuration software searches for a track according to a rectangular algorithm and a Bezier curve algorithm, completes the area closing, and draws the cloud picture. And finally, when the function graph is converted into the code, the configuration software filters the cloud layer, and converts the logic layer into the logic code, so that the cloud layer is not influenced by the operation logic.
Further, the cloud pattern includes a cloud shape and a cloud boundary line pattern.
Further, selecting a tracking scheme according to the cloud pattern and the keypoint locations comprises: and when the cloud picture pattern is rectangular, selecting a starting point and an ending point as effective points of the frame.
Further, selecting a tracking scheme according to the cloud pattern and the keypoint locations comprises: when the cloud picture is in an arbitrary polygon shape, all points are selected as effective points.
Further, determining the final frame range of the cloud image includes: and calling a rectangular algorithm to determine the final frame range of the cloud picture in a diagonal manner.
Further, drawing a frame of the cloud picture comprises: and calling a Bezier curve algorithm to draw each edge of the cloud picture frame, ensuring smooth transition of the inflection point and forming effective natural connecting lines.
Further, the codes of the logic layer and the labeling layer are independent of each other.
Furthermore, the grade of the logic layer is higher than that of the label layer, and the label layer does not influence the logic layer.
In the invention, the function of the marking layer is to explain logic algorithm blocks or connecting lines in the logic layer, so in order to ensure the accuracy of generating the logic configuration code, the marking layer and the logic layer need to be completely distinguished, so that the marking layer of low level cannot influence the logic layer of high level.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the invention relates to a labeling method of a cloud picture based on a nuclear power plant DCS platform logic algorithm picture, which strictly separates a logic layer from a cloud picture labeling layer, does not influence each other on data, and is integrated on interface presentation. The independence of data and the convenience of user viewing are ensured;
2. the invention relates to a cloud picture labeling method based on a nuclear power plant DCS platform logic algorithm picture, which is characterized in that inflection points of a cloud picture labeling frame naturally transition, and a curve outer frame is automatically closed;
3. the cloud picture labeling method based on the nuclear power plant DCS platform logic algorithm picture is successfully used on a nuclear power logic picture through analyzing a rectangular algorithm and a Bezier curve algorithm, and cloud picture labeling is carried out on the logic picture, so that the cloud picture labeling method looks simple, easy to understand and clear;
4. the invention relates to a cloud picture labeling method based on a nuclear power plant DCS platform logic algorithm picture, which strictly separates logic data from labeled data through a scheme of automatically filtering the data according to business requirements by computer software, transmits the logic data to compiling software by using an effective and constant scheme, and strictly cleans and checks the cloud picture labeled data before transmitting the data.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Examples
As shown in fig. 1, the invention provides a labeling method based on a cloud chart of a nuclear power plant DCS platform logic algorithm, which comprises the following steps:
establishing a logic layer and a label layer;
when a cloud picture annotation layer instruction is received, switching to an annotation layer; setting a cloud picture pattern in the marking layer, and recording the position of a key point selected by a user in the marking layer; selecting a tracking scheme according to the cloud picture pattern and the key point positions, and determining the final frame range of the cloud picture; drawing a frame of the cloud picture, and smoothly connecting the head point and the tail point of the frame;
when the logic diagram is drawn, switching to the logic layer and finishing the drawing of the logic diagram;
and extracting the logic diagram layer data of the logic layer, filtering out the data of the label layer, and generating a logic execution file from the logic diagram layer data.
In the implementation of this embodiment, a graph layering mode is adopted, a core function graph and a comment cloud graph are independently drawn and jointly used, the graph is graded, and the cloud graph is used as a principle that a low grade does not affect a high-grade logic diagram. Based on the principle, the drawn logic function diagram is drawn in a labeling layer, and a cloud diagram labeling method is provided. On one hand, the method can realize that the description information in the whole logic function diagram is transferred to the next link step by step, accurately and dependently; on the other hand, the logic part of the functional diagram is guaranteed not to be interfered and influenced.
The embodiment provides a method for layering graphics drawing according to levels and an algorithm for automatic tracking closing of areas. The core logic function and the description information are all presented by the same logic function diagram, and the presentation mode of the description information is flexibly designed by designers according to actual requirements. The main work to be done to implement the present invention consists of four steps. Firstly, according to user setting, a logic layer and a cloud layer drawn by a graph are flexibly switched. Secondly, according to the input of an operator, a cloud picture frame pattern is set, and the thinking activities of the operator are shown by different line widths, colors, line types and the like. And thirdly, according to the position of a plurality of points selected by a user on the cloud picture labeling layer, the configuration software searches for a track according to a rectangular algorithm and a Bezier curve algorithm, completes the area closing, and draws the cloud picture. And finally, when the function graph is converted into the code, the configuration software filters the cloud layer, and converts the logic layer into the logic code, so that the cloud layer is not influenced by the operation logic.
To further illustrate the working principle of the present embodiment, the cloud pattern includes a cloud shape and a cloud boundary line pattern.
To further illustrate the working principle of the present embodiment, the selecting a tracking scheme according to the cloud pattern and the keypoint locations comprises: and when the cloud picture pattern is rectangular, selecting a starting point and an ending point as effective points of the frame.
To further illustrate the working principle of the present embodiment, the selecting a tracking scheme according to the cloud pattern and the keypoint locations comprises: when the cloud picture is in an arbitrary polygon shape, all points are selected as effective points.
To further illustrate the working principle of the embodiment, determining the final frame range of the cloud picture includes: and calling a rectangular algorithm to determine the final frame range of the cloud picture in a diagonal manner.
To further illustrate the working principle of this embodiment, drawing the frame of the cloud graph includes: and calling a Bezier curve algorithm to draw each edge of the cloud picture frame, ensuring smooth transition of the inflection point and forming effective natural connecting lines.
To further illustrate the working principle of the embodiment, the codes of the logic layer and the label layer are independent of each other.
To further illustrate the working principle of the embodiment, the level of the logic layer is higher than that of the label layer, and the label layer does not affect the logic layer.
In the present invention, the function of the annotation layer is to explain logic algorithm blocks or links in the logic layer, so in order to ensure the accuracy of generating the logic configuration code, the annotation layer and the logic layer need to be completely distinguished, so that the low-level annotation layer cannot affect the high-level logic layer.
To further illustrate the operation of the present embodiment, the present embodiment has been implemented in a security level DCS system, which has been provided in the Center project. The method uses a mode of automatically closing a multipoint connecting line, and selects a rectangular algorithm and a Bezier curve algorithm. The radian of the inflection point of the connecting line is natural, and the whole cloud picture mark supports text marking, range marking and line type interactive setting, so that the whole logic picture is simple, understandable and clear in appearance. The explanation information in the whole logic function diagram is transferred to the next link step by step, accurately and according to the explanation information; while ensuring that the logic portion of the functional diagram is not subject to any interference or influence provides an efficient and feasible approach.
The specific steps are as follows:
firstly, configuration software receives an instruction of starting a cloud picture labeling layer by an operator, and the configuration software automatically switches to the cloud picture labeling layer.
Second, the configuration software receives cloud picture pattern setting and provides flexible and various cloud picture patterns including the patterns of the cloud pictures, such as rectangles, any polygons and the like; including patterns of cloud boundary lines such as line width, line color, line style, etc.
And thirdly, the configuration software receives the positions of the key points selected by the operator in the cloud picture layer and records the positions of the key points.
Judging the self style of the cloud picture to be drawn currently by the configuration software, selecting a tracking scheme according to the style, selecting a starting point and an ending point as effective points of a frame if the cloud picture is a rectangular style, and selecting all the points as the effective points if the cloud picture is any polygon.
And fifthly, calling a rectangle algorithm by the configuration software, and determining the final frame range of the rectangle in a diagonal manner.
And sixthly, the configuration software calls a Bezier curve algorithm to draw each edge of the cloud picture frame, so that smooth transition of the inflection point is guaranteed, and effective natural connection lines are formed.
And seventhly, smoothly connecting the first point and the last point by configuration software according to a closing principle to ensure that the cloud picture is closed.
And switching the configuration software to a logic diagram drawing layer to draw a logic diagram.
Ninthly, the functional graph page data are processed by the configuration software, the logic graph layer data are extracted, cloud graph marking layer data are filtered, undisturbed logic graph data are transmitted to the compiling software, and a logic execution file is generated.
In a safety level DCS project, the labeling method based on the cloud graph of the nuclear power plant DCS platform logic algorithm diagram is realized.
A graphical representation of a rectangular cloud generated using the present method is shown, for example, in fig. 2.
An example of an arbitrary polygon cloud generated by the method is shown in fig. 3:
an example of an arbitrary polygon cloud generated by the method is shown in fig. 4:
the pure logic layer processed by the method is shown in FIG. 5:
in the embodiment, a cloud picture labeling method is researched aiming at the characteristics of complex logic function diagram flow and various functions, a mode of automatically closing multipoint connecting lines is used, and a rectangular algorithm and a Bezier curve algorithm are selected. The radian of the inflection point of the connecting line is natural. The whole cloud picture mark supports text marking, range marking and linear interaction setting, so that the whole logic picture is simple, easy to understand and clear in appearance. Finally, the explanation information in the logic function diagram is transferred to the next link step by step, accurately and according to the explanation information; while ensuring that the functional diagram logic is not subject to any interference or influence. The method is suitable for various occasions of logic function design, V & V, test and verification.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.