CN111949719A - Method and device for realizing configuration tool of power system and related components - Google Patents

Method and device for realizing configuration tool of power system and related components Download PDF

Info

Publication number
CN111949719A
CN111949719A CN202010842384.7A CN202010842384A CN111949719A CN 111949719 A CN111949719 A CN 111949719A CN 202010842384 A CN202010842384 A CN 202010842384A CN 111949719 A CN111949719 A CN 111949719A
Authority
CN
China
Prior art keywords
service
back end
wiring diagram
entity class
uuid
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.)
Pending
Application number
CN202010842384.7A
Other languages
Chinese (zh)
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.)
Shenzhen Tianshun Wisdom Energy Technology Co ltd
Original Assignee
Shenzhen Tianshun Wisdom Energy Technology 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 Shenzhen Tianshun Wisdom Energy Technology Co ltd filed Critical Shenzhen Tianshun Wisdom Energy Technology Co ltd
Priority to CN202010842384.7A priority Critical patent/CN111949719A/en
Publication of CN111949719A publication Critical patent/CN111949719A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The invention discloses a method, a device and related components for realizing a configuration tool of a power system, wherein the method comprises the following steps: generating a front-end page application through Vue technology, and integrating a configuration tool in the page application into a component of Vue; the method comprises the steps that a Nacos Server service is used as a registration center of a back end, a communication micro-service and a service micro-service are registered through the Nacos Server service, and the communication micro-service and the service micro-service mutually call an interface of the other side through a Feign Client; the back end accesses data with a target server, a MySQL database and a Redis database through the business microservice; when the front end accesses data to the back end, a dynamic View entity class is defined through an entity class layer of a JPA frame, a database table is automatically generated according to a MySQL database with the dynamic View entity class as the back end, and then the data access is realized by using a data access interface. The invention provides a configuration tool for a user to conveniently create configuration equipment, the user defines the equipment component by user, and the subsequent operation can be directly called.

Description

Method and device for realizing configuration tool of power system and related components
Technical Field
The present invention relates to the field of power management systems, and in particular, to a method and an apparatus for implementing a configuration tool of a power system, and related components.
Background
There are a variety of electrical devices in an electrical power system, and there is a greater number of connections between electrical devices. Therefore, rapidly checking and modifying the relationship between different electrical devices and the parameters of the electrical devices is a problem which needs to be solved urgently at present.
Meanwhile, most current configuration tools are desktop applications, and related operations can be performed only when a user downloads and installs responsive software, or the support provided by some web applications cannot meet the user requirements, so that the user lacks experience.
Disclosure of Invention
The embodiment of the invention provides a method and a device for realizing a configuration tool of a power system, computer equipment and a storage medium, aiming at providing an online configuration tool applied to the power system and providing a component for conveniently creating configuration equipment for a user.
In a first aspect, an embodiment of the present invention provides a method for implementing a configuration tool of an electrical power system, including:
generating a front-end page application through Vue technology, and integrating a configuration tool in the page application into a component of Vue;
the method comprises the steps that a Nacos Server service is used as a registration center of a back end, a communication micro-service and a service micro-service are registered through the Nacos Server service, and the communication micro-service and the service micro-service mutually call an interface of the other side through a Feign Client;
the back end accesses data with a target server, a MySQL database and a Redis database through the business microservice;
when the front end accesses data to the back end, a dynamic View entity class is defined through an entity class layer of a JPA frame, a database table is automatically generated according to a MySQL database with the dynamic View entity class as the back end, and then the data access is realized by using a data access interface.
Further, when the front end accesses data to the back end, defining a dynamic view entity class through an entity class layer of a JPA framework, automatically generating a database table for a MySQL database of the back end according to the dynamic view entity class, and then implementing data access by using a data access interface, including:
when a user adds and/or modifies a wiring diagram at the front end, the front end sends information of adding and/or modifying the wiring diagram in a dynamic ViewDTO format to the rear end;
the rear end receives the information of the newly added and/or modified wiring diagram and judges whether the name of the newly added and/or modified wiring diagram is repeated with the name of the existing wiring diagram according to the information of the newly added and/or modified wiring diagram;
if the name of the newly added and/or modified wiring diagram is not repeated with the name of the existing wiring diagram, continuously judging whether the content of the newly added and/or modified wiring diagram is empty;
and if the content of the newly added and/or modified wiring diagram is not empty, storing a field in a dynamic ViewDTO, which is the same as the field in the dynamic View, into a MySQL database, storing a viewxml field corresponding to the equipment information of the newly added and/or modified wiring diagram into a JSON format file, generating a corresponding file name for the file through a UUID library, and then storing the file to a target server.
Further, when the front end accesses data to the back end, defining a dynamic view entity class through an entity class layer of a JPA framework, automatically generating a database table for a MySQL database of the back end according to the dynamic view entity class, and then implementing data access by using a data access interface, the method further includes:
when a user inquires a wiring diagram at a front end, the front end sends factory station id and UUID inquiry parameters corresponding to inquiry information to a rear end;
the rear end receives the factory station id and UUID query parameters, queries a corresponding factory station id folder in a target server according to the factory station id and UUID query parameters, and then judges whether a UUID file exists under the factory station id folder or not;
and if the UUID file exists, returning the file content in the UUID file to the front end in a character string mode.
Further, when the front end accesses data to the back end, defining a dynamic view entity class through an entity class layer of a JPA framework, automatically generating a database table for a MySQL database of the back end according to the dynamic view entity class, and then implementing data access by using a data access interface, the method further includes:
when a user deletes a wiring diagram at the front end, the front end sends a UUID deletion parameter corresponding to the wiring diagram to the rear end;
the rear end receives the UUID deletion parameter and judges whether a corresponding UUID file exists in the MySQL database or not according to the UUID deletion parameter;
and if the corresponding UUID parameter exists in the MySQL database, deleting the UUID file from the MySQL database.
Further, when the front end accesses data to the back end, defining a dynamic view entity class through an entity class layer of a JPA framework, automatically generating a database table for a MySQL database of the back end according to the dynamic view entity class, and then implementing data access by using a data access interface, the method further includes:
the JPA framework creates a t-dynamic view table in a MySQL database according to the definition of the class, wherein id information, state information, newly added time, modified time, factory station id information, storage file name information, type information and background color information of a wiring diagram are stored in the t-dynamic view table.
Further, the method also comprises the following steps:
the front end unifies the page style of the front end by modifying the style attribute of the power system element selected by the user, and receives the data sent by the back end by modifying the control attribute of the power system element selected by the user;
and the back end queries and returns corresponding field information in the MySQL database through the style attribute and the control attribute of the power system modified by the front end.
Further, the method also comprises the following steps:
when a user sets a dynamic display data field at a front end, the front end sends the dynamic display data field to a back end;
the rear end receives the dynamic display data field and stores the dynamic display data field into a Redis database at preset time intervals;
when the back end receives a dynamic display request sent by the front end at regular time, the back end extracts corresponding data from the Redis database according to the dynamic display request and sends the data to the front end, and then the front end updates according to the received data.
In a second aspect, an embodiment of the present invention provides a configuration tool device for an electrical power system, including:
the front-end generating unit is used for generating a front-end page application through Vue technology and integrating a configuration tool in the page application into a Vue component;
the system comprises a back-end registration unit, a service management unit and a service management unit, wherein the back-end registration unit is used for taking a Nacos Server service as a registration center of a back end, registering a communication micro service and a service micro service through the Nacos Server service, and mutually calling an interface of the other party through a Feign Client;
the back-end access unit is used for the back end to perform data access with the target server, the MySQL database and the Redis database through the business microservice;
and the data access unit is used for defining a dynamic View entity class through an entity class layer of the JPA frame when the front end accesses data to the back end, automatically generating a database table for a MySQL database of the back end according to the dynamic View entity class, and then realizing data access by using a data access interface.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the configuration tool implementation method of the power system as described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the configuration tool method of the power system as described above.
The embodiment of the invention provides a method and a device for realizing a configuration tool of a power system, computer equipment and a storage medium, wherein the method for realizing the configuration tool comprises the following steps: generating a front-end page application through Vue technology, and integrating a configuration tool in the page application into a component of Vue; the method comprises the steps that a Nacos Server service is used as a registration center of a back end, a communication micro-service and a service micro-service are registered through the Nacos Server service, and the communication micro-service and the service micro-service mutually call an interface of the other side through a Feign Client; the back end accesses data with a target server, a MySQL database and a Redis database through the business microservice; when the front end accesses data to the back end, a dynamic View entity class is defined through an entity class layer of a JPA frame, a database table is automatically generated according to a MySQL database with the dynamic View entity class as the back end, and then the data access is realized by using a data access interface. The embodiment of the invention provides a configuration tool which is convenient for establishing configuration equipment for a user through the implementation method of the configuration tool of the power system, the user defines the equipment component by the user, and the equipment component can be directly called in subsequent operation.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for implementing a configuration tool of an electrical power system according to an embodiment of the present invention;
fig. 2 is a sub-flow diagram illustrating a method for implementing a configuration tool of an electrical power system according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a configuration tool device of an electrical power system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for implementing a configuration tool of an electrical power system according to an embodiment of the present invention, which specifically includes: steps S101 to S104.
S101, generating a front-end page application through Vue technology, and integrating a configuration tool in the page application into a Vue component;
s102, using a Nacos Server service as a registration center of a back end, and registering a communication micro-service and a service micro-service through the Nacos Server service, wherein the communication micro-service and the service micro-service mutually call an interface of the other side through a Feign Client;
s103, the back end accesses data with a target server, a MySQL database and a Redis database through the business microservice;
s104, when the front end accesses data to the back end, defining a dynamic View entity class through an entity class layer of the JPA frame, automatically generating a database table for a MySQL database of the back end according to the dynamic View entity class, and then realizing data access by using a data access interface.
In this embodiment, firstly, a front-end page application is generated by Vue technology (a progressive framework for constructing a user interface), and an operation interface for a user to edit and add a wiring diagram is implemented by using a configuration library of the page application. And then building a back end through Spring cloud (micro service development framework). Specifically, a Nacos Server service is used as a rear-end registration center, a communication (Communicate) micro service and a business (Business) micro service are registered, then, the communication with a front end is realized through the communication micro service, and business interaction with a target Server, a MySQL database and a Redis database is realized through the business micro service. After the front end and the back end are built, data access, transmission and the like of the front end and the back end are achieved through a JPA framework (Java Persistence AP, Java Persistence API). In a specific application scenario, functions of adding, deleting, modifying and querying data are defined by using a hierarchy data access interface, so that data access of a front end and a back end is realized.
The embodiment adopts a design idea of separating the front end from the back end, realizes a set of online configuration tools applied to the power system, and enables a user to operate on a browser without downloading and installing software. And the result of the user modification can be displayed on the front-end interface in real time, and the configuration tool information defined and modified by the user is stored at the back end and displayed according to the layout created by the user. Meanwhile, when the user logs in next time, the wiring diagram defined under the plant station can be directly checked and modified.
In addition, by the configuration tool implementation method of the power system provided by the embodiment, operation and maintenance personnel can check real-time data, so that the fault of the system can be known at the first time; the equipment management personnel can correspondingly modify the configuration tool display when newly adding equipment, so as to realize the warehousing management of the equipment; the page of the front end of a power system user can be applied with the upper component to quickly create a wiring diagram, and the standardization and the normalization of the system can be realized through the preset component.
The wiring diagram described in this embodiment is specifically used for describing the connection of equipment and cables in the system, and is a simplified conventional graphical representation of the circuit, which simplifies the components of the circuit into shapes, and power and signal connections between devices. The configuration means "configure", "set" or "set". The configuration tool refers to a platform provided for a user to realize configuration.
In a specific application scenario, the target server is Amazon S3 server (Amazon Simple Storage Service, a server available for object Storage).
In another specific application scenario, the front-end page application may be used for displaying a configuration diagram, and specifically includes: and functions of adding configuration diagrams, modifying configuration diagrams, deleting configuration diagrams and switching current configuration diagrams are displayed. The front-end page application further comprises a system preset component positioned on the left side of the page and an operation area positioned in the middle of the page.
In an embodiment, as shown in fig. 2, the step S104 further includes:
s201, when a user adds and/or modifies a wiring diagram at the front end, the front end sends information of adding and/or modifying the wiring diagram in a dynamic ViewDTO format to the rear end;
s202, the rear end receives the information of the newly added and/or modified wiring diagram, and judges whether the name of the newly added and/or modified wiring diagram is repeated with the name of the existing wiring diagram according to the information of the newly added and/or modified wiring diagram;
s203, if the name of the newly added and/or modified wiring diagram is not repeated with the name of the existing wiring diagram, continuously judging whether the content of the newly added and/or modified wiring diagram is empty;
s204, if the content of the newly added and/or modified wiring diagram is not empty, storing a field in a dynamic ViewDTO, which is the same as the dynamic View, into a MySQL database, storing a viewxml field corresponding to the equipment information of the newly added and/or modified wiring diagram as a JSON format file, generating a corresponding file name for the file through a UUID database, and then storing the file to a target server.
In this embodiment, when a wiring diagram needs to be added or modified, the back end first determines whether the wiring diagram with the same name is stored in the MySQL database according to the information of the added wiring diagram or the information of the modified wiring diagram sent by the front end, and if it is determined that the wiring diagram with the same name is not stored in the MySQL database, further determines whether the received information is empty, that is, whether the content of the newly added wiring diagram is empty or whether the content of the modified wiring diagram is empty, and when it is determined that the content of the newly added wiring diagram or the modified wiring diagram is not empty, stores the corresponding field information into the MySQL database, and stores the corresponding device information into the target server.
It should be noted that, in the present embodiment, the front end and the back end communicate based on the http protocol, and when the communication regarding the new wiring diagram and the modified wiring diagram is performed, the format of the information transmitted by the front end and the back end is DynamicViewDTO. Compared with the dynamic view format, the dynamic view dto format has one more String type of viewxml, and the String is used to store device information in the wiring diagram, location information (for example, represented by coordinate axes x and y) of a corresponding device in the wiring diagram, and control field attributes of the corresponding device.
In addition, in the embodiment, the fields of the DynamicView dto which are the same as the DynamicView are stored in the MySQL database because the field data belong to structured data.
It should be noted that, in this embodiment, the UUID (universal Unique Identifier) is as follows: is a 128 bit identifier used in computer systems to identify the number of messages. In particular a number generated on one machine, which number is guaranteed to be unique for all machines in the same air. The UUID is composed of a combination of: current date and time (the first part of the UUID is time dependent, e.g. after a UUID is generated, a UUID is generated again, the first part is different and the rest is the same), clock sequence, globally unique IEEE machine identification number.
In an embodiment, the step S104 further includes:
when a user inquires a wiring diagram at a front end, the front end sends factory station id and UUID inquiry parameters corresponding to inquiry information to a rear end;
the rear end receives the factory station id and UUID query parameters, queries a corresponding factory station id folder in a target server according to the factory station id and UUID query parameters, and then judges whether a UUID file exists under the factory station id folder or not;
and if the UUID file exists, returning the file content in the UUID file to the front end in a character string mode.
In this embodiment, when the wiring diagram needs to be queried, the back-end may query the plant-site id folder corresponding to the UUID parameter in the target server according to the UUID parameter about the wiring diagram to be queried sent by the front-end, and return the content in the UUID file to the front-end under the condition that the corresponding UUID file exists in the plant-site id folder, thereby completing the query operation on the wiring diagram.
In an embodiment, the step S104 further includes:
when a user deletes a wiring diagram at the front end, the front end sends a UUID deletion parameter corresponding to the wiring diagram to the rear end;
the rear end receives the UUID deletion parameter and judges whether a corresponding UUID file exists in the MySQL database or not according to the UUID deletion parameter;
and if the corresponding UUID parameter exists in the MySQL database, deleting the UUID file from the MySQL database.
In this embodiment, when the wiring diagram needs to be deleted, the back end may query the MySQL database according to the UUID parameter about the wiring diagram to be deleted, which is sent by the front end, and delete the UUID file after querying the corresponding UUID file, thereby completing the deletion operation of the wiring diagram.
In an embodiment, the step S104 further includes:
the JPA framework creates a t-dynamic view table in a MySQL database according to the definition of the class, wherein id information, state information, newly added time, modified time, factory station id information, storage file name information, type information and background color information of a wiring diagram are stored in the t-dynamic view table.
In this embodiment, when the DynamicView entity class is defined by the entity class layer of the JPA framework, an ER graph (i.e., an entity contact graph) and a UML (unified modeling language) graph related to the DynamicView entity class are generated. When the system runs, the ER graph of the dynamic View entity class creates a t _ dynamic view table in a MySQL database through the JPA framework, and stores information contained in the ER graph into the t _ dynamic view table.
It should be noted that the ER diagram of the DynamicView entity class described in this embodiment may specifically include id information, state information, adding time, modifying time, factory station id information, storage file name information, type information, and background color information about the wiring diagram; the UML map of the dynamic view entity class may specifically include id information about the wiring map, new time of the wiring map, modification time of the wiring map, factory station id of the connection, UUID (i.e., JSON file name stored on the target server), viewtype (type of the wiring map, for example, 1 represents a one-time wiring map, etc.), active (state of the wiring map, for example, 1 represents valid, 0 represents invalid, etc.), background (color of the wiring map background), and the like.
In an embodiment, the method for implementing the configuration tool of the power system further includes:
the front end unifies the page style of the front end by modifying the style attribute of the power system element selected by the user, and receives the data sent by the back end by modifying the control attribute of the power system element selected by the user;
and the back end queries and returns corresponding field information in the MySQL database through the style attribute and the control attribute of the power system modified by the front end.
In this embodiment, when a user selects an electric power system element in a component of a front-end page application and edits a corresponding wiring diagram, the front end may modify a style attribute of the electric power system element to achieve an effect of unifying interface styles, and may also modify a control attribute of the electric power system element to achieve an effect of data corresponding to the electric power system element sent by the back end. And when the front end sends the modified attribute (which may include a style attribute and a control attribute) to the back end, the back end may query corresponding field information in the database according to the modified attribute of the power system element, and return the queried field information to the front end. Furthermore, the front end stores the operation of the user on the interface, and reads the corresponding data of the back end in real time to refresh the edited wiring diagram in real time, so that the user can conveniently and quickly know the running state of the system.
In an embodiment, the method for implementing the configuration tool of the power system further includes:
when a user sets a dynamic display data field at a front end, the front end sends the dynamic display data field to a back end;
the rear end receives the dynamic display data field and stores the dynamic display data field into a Redis database at preset time intervals;
when the back end receives a dynamic display request sent by the front end at regular time, the back end extracts corresponding data from the Redis database according to the dynamic display request and sends the data to the front end, and then the front end updates according to the received data.
In this embodiment, when a user adds a wiring diagram to the front end or modifies the wiring diagram, a dynamically displayed data field may be set on the page application, where the data field is sent from the front end to the back end, and is stored in the Redis database by the back end every preset time. When the front end sends a dynamic request about a data field to the back end, the back end can extract corresponding data from the Redis database according to the received dynamic display request and send the data to the front end, and the front end performs corresponding data updating according to the data returned by the back end. In a specific application scenario, a user sets data which is interested or concerned to be dynamically displayed data fields, so that the data which is interested or concerned is implemented and checked through the embodiment, and whether the data is abnormal or not is known.
Fig. 3 is a schematic block diagram of a configuration tool apparatus 300 of an electrical power system according to an embodiment of the present invention, where the configuration tool apparatus 300 of the electrical power system includes:
a front end generating unit 301, configured to generate a front-end page application through Vue technology, and integrate a configuration tool in the page application into a component Vue;
a backend registration unit 302, configured to use a Nacos Server service as a registration center of a backend, and register a communication microserver and a service microserver through the Nacos Server service, where the communication microserver and the service microserver mutually call an interface of each other through a Feign Client;
a back-end access unit 303, configured to perform data access with a target server, a MySQL database, and a Redis database through the service microservice by the back end;
and the data access unit 304 is configured to define a dynamic view entity class through an entity class layer of the JPA frame when the front end performs data access on the back end, automatically generate a database table for the MySQL database of the back end according to the dynamic view entity class, and then implement data access by using a data access interface.
In one embodiment, the data access unit 304 includes:
the first sending unit is used for sending information of adding and/or modifying the wiring diagram in a dynamic ViewDTO format to the back end when a user adds and/or modifies the wiring diagram at the front end;
the first judging unit is used for receiving the information of the newly added and/or modified wiring diagram at the rear end and judging whether the name of the newly added and/or modified wiring diagram is repeated with the name of the existing wiring diagram according to the information of the newly added and/or modified wiring diagram;
a second judging unit, configured to, if the name of the newly added and/or modified wiring diagram is not identical to the name of the existing wiring diagram, continuously judge whether the content of the newly added and/or modified wiring diagram is empty;
and the first storage unit is used for storing a field in the dynamic ViewDTO, which is the same as the dynamic View, to a MySQL database if the content of the newly added and/or modified wiring diagram is not empty, storing a viewxml field corresponding to the equipment information of the newly added and/or modified wiring diagram as a JSON format file, generating a corresponding file name for the file through a UUID database, and storing the file to a target server.
In an embodiment, the data access unit 304 further includes:
the second sending unit is used for sending the factory station id and UUID query parameters corresponding to the query information to the back end when a user queries the wiring diagram at the front end;
the first query unit is used for receiving the factory station id and UUID query parameters at the rear end, querying a corresponding factory station id folder in a target server according to the factory station id and UUID query parameters, and then judging whether a UUID file exists under the factory station id folder or not;
and the returning unit is used for returning the file content in the UUID file to the front end in a character string mode if the UUID file exists.
In an embodiment, the data access unit 304 further includes:
the third sending unit is used for sending UUID deleting parameters corresponding to the deleted wiring diagram to the back end by the front end when the user deletes the wiring diagram at the front end;
the third judging unit is used for receiving the UUID deleting parameter at the rear end and judging whether the MySQL database stores a corresponding UUID file or not according to the UUID deleting parameter;
and the deleting unit is used for deleting the UUID file from the MySQL database if the corresponding UUID parameter exists in the MySQL database.
In an embodiment, the data access unit 304 further includes:
the creating unit is used for the JPA framework to create a t _ dynamic view table in the MySQL database according to the class definition, wherein id information, state information, newly added time, modified time, factory station id information, storage file name information, type information and background color information of the wiring diagram are stored in the t _ dynamic view table.
In one embodiment, the configuration tool apparatus 300 of the power system further comprises:
the attribute modification unit is used for unifying the page style of the front end by modifying the style attribute of the power system element selected by the user at the front end and receiving the data sent by the back end by modifying the control attribute of the power system element selected by the user;
and the second query unit is used for querying and returning corresponding field information in the MySQL database through the style attribute and the control attribute of the power system modified by the front end by the back end.
In one embodiment, the configuration tool apparatus 300 of the power system further comprises:
the device comprises a setting unit, a display unit and a display unit, wherein the setting unit is used for sending a dynamic display data field to a back end by a front end when a user sets the dynamic display data field at the front end;
the second storage unit is used for receiving the dynamic display data field at the rear end and storing the dynamic display data field into a Redis database at intervals of preset time;
and the updating unit is used for extracting corresponding data from the Redis database by the back end according to the dynamic display request and sending the data to the front end when the back end receives the dynamic display request sent by the front end at regular time, and then updating by the front end according to the received data.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps provided by the above embodiments can be implemented. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the present invention further provides a computer device, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided in the above embodiments when calling the computer program in the memory. Of course, the computer device may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for implementing a configuration tool of a power system is characterized by comprising the following steps:
generating a front-end page application through Vue technology, and integrating a configuration tool in the page application into a component of Vue;
the method comprises the steps that a Nacos Server service is used as a registration center of a back end, a communication micro-service and a service micro-service are registered through the Nacos Server service, and the communication micro-service and the service micro-service mutually call an interface of the other side through a Feign Client;
the back end accesses data with a target server, a MySQL database and a Redis database through the business microservice;
when the front end accesses data to the back end, a dynamic View entity class is defined through an entity class layer of a JPA frame, a database table is automatically generated according to a MySQL database with the dynamic View entity class as the back end, and then the data access is realized by using a data access interface.
2. The method for implementing the configuration tool of the power system according to claim 1, wherein when the front end accesses data to the back end, a dynamic view entity class is defined through an entity class layer of a JPA framework, a database table is automatically generated for a MySQL database of the back end according to the dynamic view entity class, and then the data access is implemented by using a data access interface, including:
when a user adds and/or modifies a wiring diagram at the front end, the front end sends information of adding and/or modifying the wiring diagram in a dynamic ViewDTO format to the rear end;
the rear end receives the information of the newly added and/or modified wiring diagram and judges whether the name of the newly added and/or modified wiring diagram is repeated with the name of the existing wiring diagram according to the information of the newly added and/or modified wiring diagram;
if the name of the newly added and/or modified wiring diagram is not repeated with the name of the existing wiring diagram, continuously judging whether the content of the newly added and/or modified wiring diagram is empty;
and if the content of the newly added and/or modified wiring diagram is not empty, storing a field in a dynamic ViewDTO, which is the same as the field in the dynamic View, into a MySQL database, storing a viewxml field corresponding to the equipment information of the newly added and/or modified wiring diagram into a JSON format file, generating a corresponding file name for the file through a UUID library, and then storing the file to a target server.
3. The method for implementing the configuration tool of the power system according to claim 1, wherein when the front end accesses data to the back end, a dynamic view entity class is defined through an entity class layer of a JPA framework, a database table is automatically generated for a MySQL database of the back end according to the dynamic view entity class, and then the data access is implemented by using a data access interface, further comprising:
when a user inquires a wiring diagram at a front end, the front end sends factory station id and UUID inquiry parameters corresponding to inquiry information to a rear end;
the rear end receives the factory station id and UUID query parameters, queries a corresponding factory station id folder in a target server according to the factory station id and UUID query parameters, and then judges whether a UUID file exists under the factory station id folder or not;
and if the UUID file exists, returning the file content in the UUID file to the front end in a character string mode.
4. The method for implementing the configuration tool of the power system according to claim 1, wherein when the front end accesses data to the back end, a dynamic view entity class is defined through an entity class layer of a JPA framework, a database table is automatically generated for a MySQL database of the back end according to the dynamic view entity class, and then the data access is implemented by using a data access interface, further comprising:
when a user deletes a wiring diagram at the front end, the front end sends a UUID deletion parameter corresponding to the wiring diagram to the rear end;
the rear end receives the UUID deletion parameter and judges whether a corresponding UUID file exists in the MySQL database or not according to the UUID deletion parameter;
and if the corresponding UUID parameter exists in the MySQL database, deleting the UUID file from the MySQL database.
5. The method for implementing the configuration tool of the power system according to claim 1, wherein when the front end accesses data to the back end, a dynamic view entity class is defined through an entity class layer of a JPA framework, a database table is automatically generated for a MySQL database of the back end according to the dynamic view entity class, and then the data access is implemented by using a data access interface, further comprising:
the JPA framework creates a t-dynamic view table in a MySQL database according to the definition of the class, wherein id information, state information, newly added time, modified time, factory station id information, storage file name information, type information and background color information of a wiring diagram are stored in the t-dynamic view table.
6. The method of claim 1, further comprising:
the front end unifies the page style of the front end by modifying the style attribute of the power system element selected by the user, and receives the data sent by the back end by modifying the control attribute of the power system element selected by the user;
and the back end queries and returns corresponding field information in the MySQL database through the style attribute and the control attribute of the power system modified by the front end.
7. The method of claim 2, further comprising:
when a user sets a dynamic display data field at a front end, the front end sends the dynamic display data field to a back end;
the rear end receives the dynamic display data field and stores the dynamic display data field into a Redis database at preset time intervals;
when the back end receives a dynamic display request sent by the front end at regular time, the back end extracts corresponding data from the Redis database according to the dynamic display request and sends the data to the front end, and then the front end updates according to the received data.
8. A configuration tool apparatus for an electrical power system, comprising:
the front-end generating unit is used for generating a front-end page application through Vue technology and integrating a configuration tool in the page application into a Vue component;
the system comprises a back-end registration unit, a service management unit and a service management unit, wherein the back-end registration unit is used for taking a Nacos Server service as a registration center of a back end, registering a communication micro service and a service micro service through the Nacos Server service, and mutually calling an interface of the other party through a Feign Client;
the back-end access unit is used for the back end to perform data access with the target server, the MySQL database and the Redis database through the business microservice;
and the data access unit is used for defining a dynamic View entity class through an entity class layer of the JPA frame when the front end accesses data to the back end, automatically generating a database table for a MySQL database of the back end according to the dynamic View entity class, and then realizing data access by using a data access interface.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the configuration tool implementation method of the power system according to any one of claims 1 to 7.
10. A computer-readable storage medium, having a computer program stored thereon, which, when being executed by a processor, implements the power system configuration tool method according to any of claims 1 to 7.
CN202010842384.7A 2020-08-20 2020-08-20 Method and device for realizing configuration tool of power system and related components Pending CN111949719A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010842384.7A CN111949719A (en) 2020-08-20 2020-08-20 Method and device for realizing configuration tool of power system and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010842384.7A CN111949719A (en) 2020-08-20 2020-08-20 Method and device for realizing configuration tool of power system and related components

Publications (1)

Publication Number Publication Date
CN111949719A true CN111949719A (en) 2020-11-17

Family

ID=73358808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010842384.7A Pending CN111949719A (en) 2020-08-20 2020-08-20 Method and device for realizing configuration tool of power system and related components

Country Status (1)

Country Link
CN (1) CN111949719A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155591A1 (en) * 2022-02-18 2023-08-24 苏州浪潮智能科技有限公司 Progress information management and control method, micro-service apparatus, electronic device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646348A (en) * 2013-09-26 2014-03-19 国家电网公司 Method for saving factory station wiring diagram panoramic inversion context
US20140122996A1 (en) * 2012-10-26 2014-05-01 Kapil Gupta Method, system, and program for automatic generation of screens for mobile apps based on back-end services
CN108932588A (en) * 2018-06-29 2018-12-04 华中科技大学 A kind of the GROUP OF HYDROPOWER STATIONS Optimal Scheduling and method of front and back end separation
CN109714411A (en) * 2018-12-25 2019-05-03 浪潮电子信息产业股份有限公司 The task timing of springboot micro services frame executes method, apparatus, equipment and medium
CN110442326A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 A kind of method and its system simplifying separation permission control in front and back end based on Vue
CN111259303A (en) * 2020-01-20 2020-06-09 西安百想科技有限公司 System and method for automatically generating front-end page of WEB information system
CN111522849A (en) * 2020-04-22 2020-08-11 深圳市春蚕智能信息技术有限公司 Database dynamic access method, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140122996A1 (en) * 2012-10-26 2014-05-01 Kapil Gupta Method, system, and program for automatic generation of screens for mobile apps based on back-end services
CN103646348A (en) * 2013-09-26 2014-03-19 国家电网公司 Method for saving factory station wiring diagram panoramic inversion context
CN108932588A (en) * 2018-06-29 2018-12-04 华中科技大学 A kind of the GROUP OF HYDROPOWER STATIONS Optimal Scheduling and method of front and back end separation
CN109714411A (en) * 2018-12-25 2019-05-03 浪潮电子信息产业股份有限公司 The task timing of springboot micro services frame executes method, apparatus, equipment and medium
CN110442326A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 A kind of method and its system simplifying separation permission control in front and back end based on Vue
CN111259303A (en) * 2020-01-20 2020-06-09 西安百想科技有限公司 System and method for automatically generating front-end page of WEB information system
CN111522849A (en) * 2020-04-22 2020-08-11 深圳市春蚕智能信息技术有限公司 Database dynamic access method, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023155591A1 (en) * 2022-02-18 2023-08-24 苏州浪潮智能科技有限公司 Progress information management and control method, micro-service apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
US8271940B2 (en) System and method for dynamic generation and customization of web service client applications for terminals
US20120017222A1 (en) Interface For Telecommunication Services Using Uniform Resource Identifiers
CN110324169B (en) Interface management method and device
CN111708557B (en) Method, device and storage medium for updating configuration file
CN109871289A (en) A kind of remote procedure call service creation method and device
CN111580869A (en) Data communication method and system based on OPC UA
CN108667660B (en) Method and device for route management and service routing and routing system
CN114416075A (en) Service processing method and device
CN112799659A (en) Method, device and terminal for automatically generating data interface without programming
CN111651639A (en) Address space management method, device, equipment and medium
CN111949719A (en) Method and device for realizing configuration tool of power system and related components
CN112087327B (en) Information state acquisition method and apparatus, storage medium, and electronic apparatus
CN111970192B (en) Information editing method and device based on session group
CN111078219A (en) Page display method, device and system, electronic equipment and storage medium
CN115878860A (en) Menu generation method, device, server equipment and medium
CN102904742B (en) To method of operation and the system of executable node
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN112860725A (en) SQL automatic generation method and device, storage medium and electronic equipment
CN109117152B (en) Service generation system and method
US9077612B2 (en) Method for managing configuration information of an outsourced part, and method and system for managing an alarm of an outsourced part
CN108881344B (en) Service processing method and device, storage equipment and processing server
CN112380411A (en) Sensitive word processing method and device, electronic equipment, system and storage medium
CN101896884B (en) Methods and systems for communicating data
CN113971191A (en) Data import method and device and computer readable storage medium
CN115310415B (en) Data export method, device, equipment and storage medium

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