Disclosure of Invention
The invention aims to provide a substation information protection master station system and a data initialization method thereof, which are used for solving the problem that the initialization method for the acquired data in the information protection substation is unreliable in the prior art.
Based on the purpose, the technical scheme of the data initialization method of the substation information protection master station system is as follows:
the method comprises the steps that a client generates an initialization command, an ICE interface calls a micro-service module according to the initialization command, the micro-service module generates an identifier, the identifier is returned to the client through the ICE interface, a storage space corresponding to the identifier is created in a database, first data state information is given to the client, and the first data state information represents data processing;
the micro-service module sends a message to the front-end processor, acquires data of a corresponding information protection substation through the front-end processor, stores the data of the information protection substation into a storage space corresponding to a corresponding identifier in a database, and gives second data state information, wherein the second data state information indicates that data processing is finished;
and when the client inquires the corresponding identifier in the database, if the corresponding data state information is the second data state information, reading the data corresponding to the corresponding identifier.
Based on the purpose, the technical scheme of the substation information protection master station system is as follows: the system employs the data initialization method as above.
The two technical schemes have the beneficial effects that:
the data initialization method of the invention realizes the communication between the client and the front-end processor and the information protection sub-station in the information protection main station system through the ICE interface and the micro-service module, the identifiers are in one-to-one correspondence with the data of the information protection sub-station through the identifiers generated by the micro-service module, and are stored in the database, and corresponding data state information is given, if the corresponding data is not stored in the database, the corresponding data is the first data state information, and the client can not obtain the data through the inquiry; if the corresponding data is already stored in the database, the data is the second data state information, and the client can inquire the data, so that the initialization of the data is realized. Compared with the prior art, the data initialization method of the substation information protection master station system effectively guarantees the reliability of data initialization.
In order to realize the display of the initialization data, after the data corresponding to the corresponding identifier is read, the data corresponding to the corresponding identifier is displayed on the client.
Because the protocols used by the information protection substations may be different from each other, in order to implement communication between the client and each information protection substation, the message received by the front-end processor includes the identifier, and is used for converting the identifier into an identifier under a corresponding protocol, and communicating with the information protection substation using the corresponding protocol according to the identifier under the corresponding protocol, so as to obtain data of the corresponding information protection substation.
And the incoming and outgoing parameters of the ICE interface calling the microservice module uniformly adopt a Json format. The Json format is a plain text, has a hierarchical structure, is strong in describability, is short without an end tag, is high in reading and writing speed, and can be used for transmitting and analyzing data better. Wherein the incoming parameters include: group title calling, attribute calling and description calling; the outgoing parameters include: title call response, description call response, attribute call response.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings.
The method comprises the following steps:
the invention provides a data initialization method of a substation information protection master station system, which comprises the following steps of:
the configuration tool (namely QT page) of the client generates an initialization command, an ICE interface calls a micro-service module at a Java side according to the initialization command, the ICE interface is an ICE2Java interface and is a middleware platform for the communication between the client and the front-end processor and the information protection substation. In fig. 1, function C refers to a related function of C + +, function j refers to a related function of Java, in order to achieve the purpose that C + + calls an ICE interface to achieve C + + call of a microservice module, and meanwhile, considering that developers are convenient to debug, a uniform ICE interface package (package at Java end) is designed, and a data structure during packaging includes a key, a target method name, an incoming parameter, and a return type.
The micro-service module generates an identifier (namely UUID, the UUID is equivalent to the key mentioned later), returns the identifier to a QT calling terminal of the client through an ICE interface, creates a storage space corresponding to the identifier in a Redis database, and endows first data state information, wherein the first data state information is in data processing.
The micro-service module sends a message to the front-end processor through the kafka server (i.e. the communication server), the message received by the front-end processor (i.e. the communication manager) comprises an identifier and request information for acquiring corresponding data, the request information is used for converting the identifier into the identifier under a corresponding protocol, converting the request information into the request information under the corresponding protocol, and communicating with the information protection substation using the corresponding protocol according to the identifier and the request information under the corresponding protocol to acquire data of the corresponding information protection substation, and the data comprises data acquired by the information protection substation for each relay protection device.
The microservice module acquires data of the corresponding information protection substation through the front-end processor, stores the data of the information protection substation into a storage space corresponding to the corresponding identifier in the Redis database through the kafka server, and gives second data state information, wherein the second data state information indicates that data processing is finished.
And when the client inquires the corresponding identifier in the Redis database, if the corresponding data state information is the second data state information, reading the data corresponding to the corresponding identifier, and displaying the data corresponding to the corresponding identifier on the client after reading the data corresponding to the corresponding identifier.
In this embodiment, incoming and outgoing parameters of the Java microservice module called by the ICE interface uniformly adopt the Json format, and the process of initializing primary equipment in a certain substation by the master station system includes: calling and storing group titles; calling and storing the equipment name; calling and storing the equipment attribute; the three types of content are specific information of the equipment, and the equipment initializes to acquire the three types of information, wherein group title calling, attribute calling and description calling are incoming parameters. Now, the initialization group title is taken as an example for explanation, and the initialization process of other contents is similar. The group header refers to a group number to which the primary interval of the substation belongs, and is used for distinguishing the primary interval under the total station, for example, a line group header, a plurality of lines are arranged in the total station and are distinguished by the group header, and the group headers to which different lines belong are different. The main station system sends a command request, a specific command information format (JSON format) is shown in table 2, after the command is sent through an ICE interface, the command is processed by a micro-service module, a message is sent to a front-end processor, data of a corresponding protection substation is obtained through the front-end processor, then response information of the command is returned according to the information format (JSON format) shown in table 3, the response information comprises a title call response, a description call response and an attribute call response (namely outgoing parameters), the main station obtains group header data to form a table tb _ commu _ group _ config, and library (Redis database) processing is carried out, the flow is shown in fig. 2, and in the figure, the group is the group in table 2 and table 3; tb _ commun _ group _ config is a table name in the database, and the table contains ID, name, col _103group, station _ ID, col _103addr, cpu, and property fields, where ID represents a number, name represents a group name (device configuration, line configuration, fixed value, etc.), col _103group represents a group number (group value) 103, station _ ID represents a station ID (belonging substation address), col _103addr represents a 103 address (device 103 address), cpu represents a cpu number of the device, and property represents a group attribute.
TABLE 2 group title Call command (21006)
Key
|
Value type
|
Value example
|
Description of the invention
|
msgID
|
Shaping machine
|
21006
|
Group title Call Command value
|
senderID
|
Character string
|
|
|
rii
|
Shaping machine
|
|
Information return identifier
|
flag
|
Shaping machine
|
|
0-call station group header 1-call device group header
|
id
|
Shaping machine
|
|
Filling station ID when Flag is 0; filler ID with Flag of 1
|
cpu
|
Shaping machine
|
|
flag 1 when used |
TABLE 3group title Call response (21007)
The data initialization method of the invention realizes the communication between the client and the front-end processor and the information protection sub-station in the information protection main station system through the ICE interface and the micro-service module, the identifiers are in one-to-one correspondence with the data of the information protection sub-station through the identifiers generated by the micro-service module, and are stored in the database, and corresponding data state information is given, if the corresponding data is not stored in the database, the corresponding data is the first data state information, and the client can not obtain the data through the inquiry; if the corresponding data is already stored in the database, the data is the second data state information, and the client can inquire the data, so that the initialization of the data is realized. Compared with the prior art, the data initialization method of the substation information protection master station system effectively guarantees the reliability of data initialization.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. For example, the kafka server is used as the communication server, and a communication bus may be used instead.
The embodiment of the system is as follows:
the embodiment provides a substation information protection master station system, which adopts the data initialization method in the above method embodiment, and the description of the data initialization method is sufficiently clear and complete, so detailed description is not provided.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, systems, and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Therefore, the protection scope of the present application is defined by the claims, and all structural changes that are equivalent to the contents of the description and drawings of the present application should be considered as being included in the protection scope of the present application.