CN111949719B - 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
CN111949719B
CN111949719B CN202010842384.7A CN202010842384A CN111949719B CN 111949719 B CN111949719 B CN 111949719B CN 202010842384 A CN202010842384 A CN 202010842384A CN 111949719 B CN111949719 B CN 111949719B
Authority
CN
China
Prior art keywords
wiring diagram
data access
dynamicview
back end
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.)
Active
Application number
CN202010842384.7A
Other languages
Chinese (zh)
Other versions
CN111949719A (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.)
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/CN111949719B/en
Publication of CN111949719A publication Critical patent/CN111949719A/en
Application granted granted Critical
Publication of CN111949719B publication Critical patent/CN111949719B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Human Resources & Organizations (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Public Health (AREA)
  • Fuzzy Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method, a device and related components for realizing a configuration tool of an electric power system, wherein the method comprises the following steps: generating a front-end page application through a Vue technology, and integrating a configuration tool in the page application into a component of the Vue; taking Nacos Server service as a registration center of the back end, registering communication micro-service and business micro-service through the Nacos Server service, and calling interfaces of the other party through FEIGN CLIENT; the back end performs data access with a target server, a MySQL database and a Redis database through the business micro-service; when the front end performs data access to the back end, DYNAMICVIEW entity classes are defined through an entity class layer of the JPA frame, a database table is automatically generated according to the DYNAMICVIEW entity classes serving as a MySQL database of the back end, and then the data access is realized through a data access interface. The invention provides a configuration tool which is convenient for a user to create configuration equipment, and the user can customize equipment components and can directly call the equipment components in subsequent operations.

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 electrical power systems, and there are many more links between electrical devices and electrical devices. Thus, quick review and modification of the relationships between different electrical devices and parameters of the electrical devices is a current need for a solution.
Meanwhile, most of the current configuration tools are desktop applications, and related operations can be performed only by downloading and installing responsive software by a user, 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, a device, computer equipment and a storage medium for realizing a configuration tool of an electric power system, and aims to provide an online configuration tool applied to the electric power system, and provide components for conveniently creating the 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 electric power system, including:
generating a front-end page application through a Vue technology, and integrating a configuration tool in the page application into a component of the Vue;
Taking Nacos Server service as a registration center of the back end, registering communication micro-service and business micro-service through the Nacos Server service, and calling interfaces of the other party through FEIGN CLIENT;
The back end performs data access with a target server, a MySQL database and a Redis database through the business micro-service;
When the front end performs data access to the back end, DYNAMICVIEW entity classes are defined through an entity class layer of the JPA frame, a database table is automatically generated according to the DYNAMICVIEW entity classes serving as a MySQL database of the back end, and then the data access is realized through a data access interface.
Further, when the front end performs data access to the back end, the entity class layer of the JPA frame defines DYNAMICVIEW entity classes, and automatically generates a database table according to the DYNAMICVIEW entity class as the MySQL database of the back end, and then uses a data access interface to implement data access, including:
When a user performs a new addition and/or modification wiring diagram operation on the front end, the front end sends DynamicViewDTO-format information of the new addition and/or modification wiring diagram to the rear end;
the back 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, continuing to judge whether the content of the newly added and/or modified wiring diagram is empty or not;
If the content of the newly added and/or modified wiring diagram is not null, storing the fields which are the same as DYNAMICVIEW in DynamicViewDTO into a MySQL database, storing viewxml fields corresponding to the equipment information of the newly added and/or modified wiring diagram as a file in a JSON format, generating a corresponding file name for the file through a UUID library, and storing the file into a target server.
Further, when the front end performs data access to the back end, the method defines DYNAMICVIEW entity classes through an entity class layer of the JPA frame, automatically generates a database table according to the DYNAMICVIEW entity class as a MySQL database of the back end, and then realizes data access by using a data access interface, and further comprises:
when a user performs operation of inquiring a wiring diagram at the front end, the front end sends station id and UUID inquiry parameters corresponding to inquiry information to the rear end;
the back end receives the factory station id and UUID inquiry parameters, inquires corresponding factory station id folders in the target server according to the factory station id and UUID inquiry parameters, and then judges whether UUID files exist in the factory station id folders or not;
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 performs data access to the back end, the method defines DYNAMICVIEW entity classes through an entity class layer of the JPA frame, automatically generates a database table according to the DYNAMICVIEW entity class as a MySQL database of the back end, and then realizes data access by using a data access interface, and further comprises:
When a user performs a wiring diagram deleting operation at the front end, the front end sends UUID deleting parameters corresponding to the wiring diagram deleting operation to the rear end;
The back end receives the UUID deleting parameter and judges whether a MySQL database has a corresponding UUID file according to the UUID deleting parameter;
and if the MySQL database stores the corresponding UUID parameters, deleting the UUID file from the MySQL database.
Further, when the front end performs data access to the back end, the method defines DYNAMICVIEW entity classes through an entity class layer of the JPA frame, automatically generates a database table according to the DYNAMICVIEW entity class as a MySQL database of the back end, and then realizes data access by using a data access interface, and further comprises:
The JPA framework creates a t_ dynamicview table in a MySQL database according to the definition of the class, and the t_ dynamicview table stores id information, state information, newly-added time, modification time, factory station id information, stored file name information, type information and background color information of the wiring diagram.
Further, the method further comprises the following steps:
the front end unifies the page styles 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;
the back end queries and returns corresponding field information in the MySQL database through the style attribute and the control attribute of the electric power system modified by the front end.
Further, the method further comprises the following steps:
When a user sets a dynamic display data field at the front end, the front end sends the dynamic display data field to the rear end;
The back end receives the dynamic display data field and stores the dynamic display data field into a Redis database at intervals of preset time;
When the rear end receives a dynamic display request sent by the front end at fixed time, the rear 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 the data according to the received data.
In a second aspect, an embodiment of the present invention provides a configuration tool device of an electric power system, including:
The front-end generation unit is used for generating a front-end page application through a Vue technology and integrating a configuration tool in the page application into a component of the Vue;
The back-end registration unit is used for taking Nacos Server service as a registration center of the back-end, registering communication micro-service and business micro-service through the Nacos Server service, and calling interfaces of the other party through FEIGN CLIENT;
The back end access unit is used for performing data access on the back end through the business micro-service, the target server, the MySQL database and the Redis database;
And the data access unit is used for defining DYNAMICVIEW entity classes through an entity class layer of the JPA frame when the front end performs data access to the rear end, automatically generating a database table according to the DYNAMICVIEW entity class serving as a MySQL database of the rear end, and then realizing data access by utilizing a data access interface.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements a configuration tool implementation method of a power system as described above when the processor executes the computer program.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor implements a method of configuring a power system as described above.
The embodiment of the invention provides a method, a device, computer equipment and a storage medium for realizing a configuration tool of an electric power system, wherein the method comprises the following steps: generating a front-end page application through a Vue technology, and integrating a configuration tool in the page application into a component of the Vue; taking Nacos Server service as a registration center of the back end, registering communication micro-service and business micro-service through the Nacos Server service, and calling interfaces of the other party through FEIGN CLIENT; the back end performs data access with a target server, a MySQL database and a Redis database through the business micro-service; when the front end performs data access to the back end, DYNAMICVIEW entity classes are defined through an entity class layer of the JPA frame, a database table is automatically generated according to the DYNAMICVIEW entity classes serving as a MySQL database of the back end, and then the data access is realized through a data access interface. The embodiment of the invention provides a configuration tool which is convenient for a user to establish configuration equipment through the implementation method of the configuration tool of the power system, and the user can customize equipment components and can directly call the equipment components in subsequent operation.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for implementing a configuration tool of an electric power system according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of a method for implementing a configuration tool of an electric power system according to an embodiment of the present invention;
Fig. 3 is a schematic block diagram of a configuration tool device of an electric power system according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "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 this specification 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 the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flow chart of a method for implementing a configuration tool of an electric 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 a Vue technology, and integrating a configuration tool in the page application into a Vue component;
S102, taking Nacos Server service as a registration center of the back end, and registering communication micro service and business micro service through the Nacos Server service, wherein the communication micro service and the business micro service mutually call an interface of the other party through FEIGN CLIENT;
S103, the back end performs data access with a target server, a MySQL database and a Redis database through the business micro-service;
And S104, when the front end performs data access to the back end, defining DYNAMICVIEW entity classes through an entity class layer of the JPA frame, automatically generating a database table according to the DYNAMICVIEW entity classes serving as a MySQL database of the back end, and then realizing data access by utilizing a data access interface.
In this embodiment, first, a page application of the front end is generated by using a Vue technology (a progressive framework for constructing a user interface), and an operation interface for editing and newly adding a wiring diagram by using a configuration library of the page application is implemented. The backend is then built through Spring Clound (micro-service development framework). Specifically, nacos Server services are used as a back-end registry, communication (Communicate) micro services and business (Bussiness) micro services are registered, then communication with the front-end is realized through the communication micro services, and business interaction with a target server, a MySQL database and a Redis database is realized through the business micro services. After the front end and the back end are built, data access and transmission of the front end and the back end are realized through a JPA framework (Java PERSISTENCE AP, java persistent layer API). In a specific application scenario, a data access interface is utilized to define new addition, deletion, modification and query functions of data, so that front-end and back-end data access is realized.
The embodiment adopts the design idea of separating front end from rear end, realizes a set of online configuration tool 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 is displayed on the interface of the front end in real time, the back end stores the configuration tool information defined and modified by the user, and the configuration tool information is displayed according to the layout created by the user. Meanwhile, when the user logs in next time, the wiring diagram defined under the factory station can be directly checked and modified.
In addition, by the configuration tool implementation method of the power system, operation and maintenance personnel can check real-time data, so that faults of the system can be known at the first time; the equipment manager can correspondingly modify the configuration tool display when newly adding equipment, so as to realize warehouse entry management of the equipment; the power system user can apply the upper component to the front page, quickly create the wiring diagram, and can realize the standardization and normalization of the system through the preset component.
The wiring diagrams described in this embodiment are specifically used to describe the drawing of the device-to-cable connection in the system, which is a simplified conventional graphical representation of the circuit that simplifies the components of the circuit to shape, as well as the power and signal connections between the devices. The meaning of the configuration means "arrangement", "setting" or "setting" and the like. The configuration tool is a platform for providing the user with configuration.
In a specific application scenario, the target server is Amazon S3 server (Amazon Simple Storage Service, a server that can be used for object storage).
In another specific application scenario, the front-end page application may be used for displaying a configuration diagram, and specifically includes: new configuration diagram, modification of configuration diagram, deletion of configuration diagram and switching of function display of current configuration diagram. The front-end page application also comprises a system preset component positioned at 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 performs a new addition and/or modification wiring diagram operation on the front end, the front end sends DynamicViewDTO-format information of the new addition and/or modification wiring diagram 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, continuing to judge whether the content of the newly added and/or modified wiring diagram is empty;
And S204, if the content of the newly added and/or modified wiring diagram is not empty, storing the fields which are the same as DYNAMICVIEW in DynamicViewDTO into a MySQL database, storing viewxml fields corresponding to the equipment information of the newly added and/or modified wiring diagram as a file in a JSON format, generating a corresponding file name for the file through a UUID library, and storing the file to a target server.
In this embodiment, when a wiring diagram needs to be newly added or modified, the back end first determines whether the MySQL database has a wiring diagram with the same name stored according to the information of the newly added wiring diagram or the information of the modified wiring diagram sent by the front end, if it is determined that the MySQL database does not store the wiring diagram with the same name, it is further determined 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, the corresponding field information is stored in the MySQL database, and the corresponding device information is stored in the target server.
It should be noted that, in this embodiment, the front end and the back end communicate based on the http protocol, and when communication is performed regarding the newly added wiring diagram and the modified wiring diagram, the format of information transmitted by the front end and the back end is DynamicViewDTO. The DynamicViewDTO format is one more String type viewxml than the DYNAMICVIEW format, and the String is used for storing device information in the wiring diagram, position information (represented by coordinate axes x and y, for example) of a corresponding device in the wiring diagram, control field attributes of the corresponding device, and the like.
In addition, the same fields DynamicViewDTO and DYNAMICVIEW are stored in MySQL database in this embodiment because these field data belong to structured data.
It should be further noted that, UUID (Universally Unique Identifier, universal unique identifier) described in this embodiment: is a 128-bit identifier used in computer systems to identify the number of information. And in particular to a number generated on one machine that is guaranteed to be unique to all machines in the same time air. The UUID is composed of a combination of the following parts: the current date and time (the first part of the UUID is time dependent, e.g. after generating a UUID and then generating a UUID, 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 performs operation of inquiring a wiring diagram at the front end, the front end sends station id and UUID inquiry parameters corresponding to inquiry information to the rear end;
the back end receives the factory station id and UUID inquiry parameters, inquires corresponding factory station id folders in the target server according to the factory station id and UUID inquiry parameters, and then judges whether UUID files exist in the factory station id folders or not;
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 factory station id folder corresponding to the UUID parameter in the target server according to the UUID parameter sent by the front end about the wiring diagram to be queried, and return the content in the UUID file to the front end when the corresponding UUID file exists in the factory station id folder, thereby completing the query operation of the docking diagram.
In an embodiment, the step S104 further includes:
When a user performs a wiring diagram deleting operation at the front end, the front end sends UUID deleting parameters corresponding to the wiring diagram deleting operation to the rear end;
The back end receives the UUID deleting parameter and judges whether a MySQL database has a corresponding UUID file according to the UUID deleting parameter;
and if the MySQL database stores the corresponding UUID parameters, deleting the UUID file from the MySQL database.
In this embodiment, when the line graph needs to be deleted, the back end may query the MySQL database according to the UUID parameter about the wiring graph to be deleted sent by the front end, and delete the UUID file after querying the corresponding UUID file, thereby completing the deletion operation of the line graph.
In an embodiment, the step S104 further includes:
The JPA framework creates a t_ dynamicview table in a MySQL database according to the definition of the class, and the t_ dynamicview table stores id information, state information, newly-added time, modification time, factory station id information, stored file name information, type information and background color information of the wiring diagram.
In this embodiment, when defining DYNAMICVIEW entity classes through the entity class layer of the JPA framework, an ER diagram (i.e., entity contact diagram) and a UML (unified modeling language) diagram are generated for DYNAMICVIEW entity classes. When the system operates, the ER diagram of the DYNAMICVIEW entity class creates a t_ dynamicview table in a MySQL database through the JPA framework, and stores information contained in the ER diagram into the t_ dynamicview table.
It should be noted that, the ER diagram of DYNAMICVIEW entity class in this embodiment may specifically include id information, status information, time of addition, time of modification, station id information, stored file name information, type information, and background color information about the wiring diagram; the UML graph of the DYNAMICVIEW entity class may specifically include id information about the graph, the time of addition of the graph, the time of modification of the graph, the station id to which the graph belongs, UUID (i.e., JSON file name stored on the target server), viewtype (graph type, e.g., 1 indicates primary graph, etc.), active (graph state, e.g., 1 indicates active, 0 indicates inactive, etc.), background (graph background color), etc.
In an embodiment, the method for implementing a configuration tool of the power system further includes:
the front end unifies the page styles 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;
the back end queries and returns corresponding field information in the MySQL database through the style attribute and the control attribute of the electric power system modified by the front end.
In this embodiment, when a user selects an electric power system element from components applied to a front-end page and is used to edit a corresponding wiring diagram, the front-end may modify style attributes of the electric power system element to achieve an effect of unifying interface styles, and may modify control attributes of the electric power system element to achieve an effect of data sent by the back-end and corresponding to the electric power system element. And when the front end sends the modified attribute (which may include style attribute and control attribute) to the back end, the back end may query the database for the corresponding field information according to the modified attribute of the power system element, and return the queried field information to the front end. Further, the front end stores the operation of the user on the interface, and reads the data corresponding to the back end in real time so as to refresh the edited wiring diagram in real time, thereby facilitating the user to quickly know the running state of the system.
In an embodiment, the method for implementing a configuration tool of the power system further includes:
When a user sets a dynamic display data field at the front end, the front end sends the dynamic display data field to the rear end;
The back end receives the dynamic display data field and stores the dynamic display data field into a Redis database at intervals of preset time;
When the rear end receives a dynamic display request sent by the front end at fixed time, the rear 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 the data 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 data field dynamically displayed may be set on the page application, where the data field is sent from the front end to the back end, and stored in the Redis database by the back end at intervals of a preset time. When the front end sends a dynamic request about the 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 carries out corresponding data update according to the data returned by the back end. In a specific application scenario, the user sets the data of interest or attention as the data field of dynamic display, so that implementation and viewing of the data of interest or attention are realized through the embodiment, and whether the data is abnormal or not is known.
Fig. 3 is a schematic block diagram of a configuration tool device 300 of an electric power system according to an embodiment of the present invention, where the configuration tool device 300 of the electric power system includes:
a front-end generating unit 301, configured to generate a front-end page application by using a Vue technology, and integrate a configuration tool in the page application into a Vue component;
A back-end registration unit 302, configured to use Nacos Server service as a back-end registration center, register a communication micro-service and a business micro-service through the Nacos Server service, and call interfaces of each other through FEIGN CLIENT;
A back-end access unit 303, configured to perform data access on the back-end through the business micro-service and a target server, a MySQL database, and a Redis database;
the data access unit 304 is configured to define DYNAMICVIEW entity classes through an entity class layer of the JPA framework when the front end accesses the back end, automatically generate a database table according to the MySQL database with the DYNAMICVIEW entity class as the back end, 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 DynamicViewDTO-format information of the newly added and/or modified wiring diagram to the rear end when the user performs the operation of the newly added and/or modified 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 from 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;
the second judging unit is used for continuously judging whether the content of the newly added and/or modified wiring diagram is empty or not if the name of the newly added and/or modified wiring diagram is not repeated with the name of the existing wiring diagram;
And the first storage unit is used for storing the fields which are the same as DYNAMICVIEW in DynamicViewDTO into a MySQL database if the content of the newly added and/or modified wiring diagram is not empty, storing viewxml fields corresponding to the equipment information of the newly added and/or modified wiring diagram as files in a JSON format, generating corresponding file names for the files through a UUID library, and storing the files to a target server.
In an embodiment, the data access unit 304 further comprises:
The second sending unit is used for sending the factory station id and UUID query parameters corresponding to the query information to the rear end when the user performs the operation of querying the wiring diagram at the front end;
the first query unit is used for receiving the query parameters of the factory station id and the UUID by the rear end, querying the corresponding factory station id folder in the target server according to the query parameters of the factory station id and the UUID, and judging whether a UUID file exists in the factory station id folder or not;
And the return 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 comprises:
the third sending unit is used for sending UUID deletion parameters corresponding to the deletion wiring diagram to the rear end when the user performs the operation of deleting the wiring diagram at the front end;
The third judging unit is used for receiving the UUID deleting parameter by the rear end and judging whether the MySQL database has a corresponding UUID file 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 is stored in the MySQL database.
In an embodiment, the data access unit 304 further comprises:
The creating unit is used for creating a t_ dynamicview table in the MySQL database according to the definition of the class by the JPA framework, wherein the t_ dynamicview table stores id information, state information, newly-added time, modified time, factory station id information, stored file name information, type information and background color information of the wiring diagram.
In one embodiment, the configuration tool device 300 of the power system further comprises:
The attribute modification unit is used for unifying the page styles of the front end by modifying the style attributes of the power system elements selected by the user at the front end and receiving the data sent by the rear end by modifying the control attributes of the power system elements selected by the user at the front end;
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 electric power system modified by the front end at the rear end.
In one embodiment, the configuration tool device 300 of the power system further comprises:
the setting unit is used for sending the dynamic display data field to the rear end by the front end when the 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 back 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 according to the dynamic display request and sending the data to the front end when the rear end receives the dynamic display request sent by the front end at fixed time, and then the front end updates the data according to the received data.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
The embodiment of the present invention also provides a computer readable storage medium having a computer program stored thereon, which when executed can implement the steps provided in the above embodiment. The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiment of the invention also provides a computer device, which can comprise a memory and a processor, wherein the memory stores a computer program, and the processor can realize the steps provided by the embodiment when calling the computer program in the memory. Of course, the computer device may also include various network interfaces, power supplies, and the like.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. A method for implementing a configuration tool for an electrical power system, comprising:
generating a front-end page application through a Vue technology, and integrating a configuration tool in the page application into a component of the Vue;
Taking Nacos Server service as a registration center of the back end, registering communication micro-service and business micro-service through the Nacos Server service, and calling interfaces of the other party through FEIGN CLIENT;
The back end performs data access with a target server, a MySQL database and a Redis database through the business micro-service;
When the front end performs data access to the back end, DYNAMICVIEW entity classes are defined through an entity class layer of the JPA frame, a database table is automatically generated according to a MySQL database with the DYNAMICVIEW entity classes as the back end, and then the data access is realized by using a data access interface;
When the front end performs data access to the back end, the DYNAMICVIEW entity class is defined through the entity class layer of the JPA frame, a database table is automatically generated according to the DYNAMICVIEW entity class as the MySQL database of the back end, and then the data access is realized by using a data access interface, which comprises the following steps:
When a user performs a new addition and/or modification wiring diagram operation on the front end, the front end sends DynamicViewDTO-format information of the new addition and/or modification wiring diagram to the rear end;
the back 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, continuing to judge whether the content of the newly added and/or modified wiring diagram is empty or not;
If the content of the newly added and/or modified wiring diagram is not null, storing the fields which are the same as DYNAMICVIEW in DynamicViewDTO into a MySQL database, storing viewxml fields corresponding to the equipment information of the newly added and/or modified wiring diagram as a file in a JSON format, generating a corresponding file name for the file through a UUID library, and storing the file into a target server.
2. The method according to claim 1, wherein when the front end accesses the data of the back end, the method defines DYNAMICVIEW entity class through the entity class layer of the JPA frame, automatically generates a database table according to the DYNAMICVIEW entity class as the MySQL database of the back end, and then uses the data access interface to realize the data access, and further comprising:
when a user performs operation of inquiring a wiring diagram at the front end, the front end sends station id and UUID inquiry parameters corresponding to inquiry information to the rear end;
the back end receives the factory station id and UUID inquiry parameters, inquires corresponding factory station id folders in the target server according to the factory station id and UUID inquiry parameters, and then judges whether UUID files exist in the factory station id folders or not;
If the UUID file exists, returning the file content in the UUID file to the front end in a character string mode.
3. The method according to claim 1, wherein when the front end accesses the data of the back end, the method defines DYNAMICVIEW entity class through the entity class layer of the JPA frame, automatically generates a database table according to the DYNAMICVIEW entity class as the MySQL database of the back end, and then uses the data access interface to realize the data access, and further comprising:
When a user performs a wiring diagram deleting operation at the front end, the front end sends UUID deleting parameters corresponding to the wiring diagram deleting operation to the rear end;
The back end receives the UUID deleting parameter and judges whether a MySQL database has a corresponding UUID file according to the UUID deleting parameter;
and if the MySQL database stores the corresponding UUID parameters, deleting the UUID file from the MySQL database.
4. The method according to claim 1, wherein when the front end accesses the data of the back end, the method defines DYNAMICVIEW entity class through the entity class layer of the JPA frame, automatically generates a database table according to the DYNAMICVIEW entity class as the MySQL database of the back end, and then uses the data access interface to realize the data access, and further comprising:
The JPA framework creates a t_ dynamicview table in a MySQL database according to the definition of the class, and the t_ dynamicview table stores id information, state information, newly-added time, modification time, factory station id information, stored file name information, type information and background color information of the wiring diagram.
5. The method for implementing a configuration tool of a power system according to claim 1, further comprising:
the front end unifies the page styles 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;
the back end queries and returns corresponding field information in the MySQL database through the style attribute and the control attribute of the electric power system modified by the front end.
6. The method for implementing a configuration tool of a power system according to claim 1, further comprising:
When a user sets a dynamic display data field at the front end, the front end sends the dynamic display data field to the rear end;
The back end receives the dynamic display data field and stores the dynamic display data field into a Redis database at intervals of preset time;
When the rear end receives a dynamic display request sent by the front end at fixed time, the rear 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 the data according to the received data.
7. A configuration tool device for an electrical power system, comprising:
The front-end generation unit is used for generating a front-end page application through a Vue technology and integrating a configuration tool in the page application into a component of the Vue;
The back-end registration unit is used for taking Nacos Server service as a registration center of the back-end, registering communication micro-service and business micro-service through the Nacos Server service, and calling interfaces of the other party through FEIGN CLIENT;
The back end access unit is used for performing data access on the back end through the business micro-service, the target server, the MySQL database and the Redis database;
The data access unit is used for defining DYNAMICVIEW entity classes through an entity class layer of the JPA frame when the front end performs data access to the rear end, automatically generating a database table according to a MySQL database taking the DYNAMICVIEW entity classes as the rear end, and then realizing data access by utilizing a data access interface;
The data access unit includes:
The first sending unit is used for sending DynamicViewDTO-format information of the newly added and/or modified wiring diagram to the rear end when the user performs the operation of the newly added and/or modified 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 from 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;
the second judging unit is used for continuously judging whether the content of the newly added and/or modified wiring diagram is empty or not if the name of the newly added and/or modified wiring diagram is not repeated with the name of the existing wiring diagram;
And the first storage unit is used for storing the fields which are the same as DYNAMICVIEW in DynamicViewDTO into a MySQL database if the content of the newly added and/or modified wiring diagram is not empty, storing viewxml fields corresponding to the equipment information of the newly added and/or modified wiring diagram as files in a JSON format, generating corresponding file names for the files through a UUID library, and storing the files to a target server.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method for implementing a configuration tool for a power system according to any one of claims 1 to 6 when the computer program is executed by the processor.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the configuration tool method of the power system according to any of claims 1 to 6.
CN202010842384.7A 2020-08-20 2020-08-20 Method and device for realizing configuration tool of power system and related components Active CN111949719B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010842384.7A CN111949719B (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 CN111949719B (en) 2020-08-20 2020-08-20 Method and device for realizing configuration tool of power system and related components

Publications (2)

Publication Number Publication Date
CN111949719A CN111949719A (en) 2020-11-17
CN111949719B true CN111949719B (en) 2024-05-07

Family

ID=73358808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010842384.7A Active CN111949719B (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) CN111949719B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114218317B (en) * 2022-02-18 2022-05-13 苏州浪潮智能科技有限公司 Progress information management and control method, micro-service device, electronic equipment and storage medium
CN116232655B (en) * 2022-12-22 2024-06-11 广州致远电子股份有限公司 Configuration application permission management method and system based on Internet of things cloud platform

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

Also Published As

Publication number Publication date
CN111949719A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CA2539474C (en) System and method for dynamic generation and customization of web service client applications for terminals
US8656417B2 (en) Interface for telecommunication services using uniform resource identifiers
CN111949719B (en) Method and device for realizing configuration tool of power system and related components
CN102567026B (en) Mobile solution constructing system and Mobile solution construction method
JP2005505055A (en) Method, apparatus and system for mobile web client
CN102769709B (en) A kind of for providing the method and apparatus of service contact information to user
JP2012104103A (en) Systems and methods for business network management discovery and consolidation
CN109923847A (en) Call discovery method, apparatus, equipment and the storage medium of link
CN108667660B (en) Method and device for route management and service routing and routing system
US20080133502A1 (en) System and method for utilizing multiple values of a search criteria
CN113031951A (en) Menu generation method and device, computer equipment and storage medium
CN110311819B (en) Page automatic generation and MIBs table generation method based on page configuration file, management method, equipment side and management system
CN116974948A (en) Service system testing method, system, equipment and medium
CN109918210B (en) Method and terminal for displaying offline message
CN109117152B (en) Service generation system and method
CN112162731B (en) Data expansion method, device, storage medium and electronic device
CN113377682A (en) Service testing method and device
CN111506644B (en) Application data processing method and device and electronic equipment
CN113934526A (en) Construction method and device of business process
CN112860725A (en) SQL automatic generation method and device, storage medium and electronic equipment
CN114296696A (en) Business function operation method and device, storage medium and electronic equipment
CN114500002B (en) Cluster account distribution method and system based on LDAP
CN115310415B (en) Data export method, device, equipment and storage medium
JPH1153379A (en) Method and system for message intermediation and storage medium for storing message intermediation program
CN101896884A (en) Methods and systems for communicating data

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
GR01 Patent grant
GR01 Patent grant