CN111368387B - Electric power system simulation data textualization method - Google Patents

Electric power system simulation data textualization method Download PDF

Info

Publication number
CN111368387B
CN111368387B CN201811588838.1A CN201811588838A CN111368387B CN 111368387 B CN111368387 B CN 111368387B CN 201811588838 A CN201811588838 A CN 201811588838A CN 111368387 B CN111368387 B CN 111368387B
Authority
CN
China
Prior art keywords
data
template
textualization
analysis
reading
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
CN201811588838.1A
Other languages
Chinese (zh)
Other versions
CN111368387A (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.)
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
China Electric Power Research Institute Co Ltd CEPRI
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 China Electric Power Research Institute Co Ltd CEPRI filed Critical China Electric Power Research Institute Co Ltd CEPRI
Priority to CN201811588838.1A priority Critical patent/CN111368387B/en
Publication of CN111368387A publication Critical patent/CN111368387A/en
Application granted granted Critical
Publication of CN111368387B publication Critical patent/CN111368387B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a method for textualizing simulation data of a power system, which comprises the following steps: step S1, constructing a conceptual model generated by the text; step S2, performing data text preparation on the simulation calculation data; step S3, a data textualization task is performed. The invention can convert massive calculation data which has complex structure and is difficult to be directly observed into a knowledge text with clear and definite natural language characters as contents in a universal and convenient way; in the field of power flow simulation analysis, calculation data is converted into texts, customized data reading and analysis rules are performed for the calculation data conversion, and template languages for supporting rule operation are formulated and analyzed.

Description

一种电力系统仿真数据文本化方法A Textual Method of Power System Simulation Data

【技术领域】【Technical field】

本发明属于电力自动化技术领域,尤其涉及一种电力系统仿真数据文本化方法。The invention belongs to the technical field of electric power automation, and in particular relates to a method for textualizing power system simulation data.

【背景技术】【Background technique】

电力系统仿真计算会产生大量的运行实时数据和结果数据,数据的结构具有一定复杂性,难以直接观测得出结论。以往的电力系统仿真计算分析,是由专业的分析人员对这些数据进行分析、汇总,以产生结论性意见。分析人员大多会先将结果数据进行一些统计类的通用计算,以这些中间结果作基础,再按不同的分析策略或角度,凭借分析人员的专业经验,从中间结果中找到重要的信息。从中可以看出,仿真分析过程存在大量重复性工作,这种重复性工作的实质是缺少数据信息的提取。需要一种能够将具有特殊结构的仿真数据进行解析,并能够从解析后的数据中提取、浓缩知识信息,将这些信息以自然语言文本的形式表达。同时,为了支撑文本挖掘等应用,同时还应考虑构造支持文本挖掘的数据结构。本发明能够将海量的、结构复杂的、难以直接观测的计算数据,以通用的、便捷的方式转化为清晰明确的自然语言文字为内容的知识文本;在潮流仿真分析领域,将计算数据文本化,并为了所述计算数据文本化进行了定制的数据读取、解析规则,以及支撑规则运行的模板语言的制定、解析。The power system simulation calculation will generate a large amount of real-time data and result data. The structure of the data is complex, and it is difficult to directly observe and draw conclusions. In the past power system simulation calculation and analysis, professional analysts analyze and summarize these data to generate conclusive opinions. Most analysts will first perform some general statistical calculations on the result data, based on these intermediate results, and then find important information from the intermediate results according to different analysis strategies or perspectives, relying on the professional experience of the analysts. It can be seen from this that there is a lot of repetitive work in the simulation analysis process, and the essence of this repetitive work is the lack of data extraction. There is a need for a method that can parse simulation data with a special structure, extract and condense knowledge information from the parsed data, and express the information in the form of natural language texts. At the same time, in order to support applications such as text mining, we should also consider constructing data structures that support text mining. The invention can convert massive, complex structure and difficult to directly observe calculation data into clear and clear natural language and text knowledge text in a general and convenient way; in the field of power flow simulation analysis, the calculation data is converted into text , and customized data reading and parsing rules, as well as the formulation and parsing of a template language supporting the operation of the rules, are carried out for the textualization of the computing data.

【发明内容】[Content of the invention]

为了解决现有技术中的上述问题,本发明提出了一种电力系统仿真数据文本化方法,该方法包括:In order to solve the above problems in the prior art, the present invention provides a method for textualizing power system simulation data, the method comprising:

步骤S1:文本生成的概念模型的构建;Step S1: the construction of the conceptual model of text generation;

步骤S2:对仿真计算数据进行数据文本化准备;Step S2: carry out data textual preparation to the simulation calculation data;

步骤S3:执行数据文本化任务。Step S3: Execute the task of data textualization.

进一步的,所述步骤S1具体为:基于概念对象、关系、实体之间的逻辑关系进行数据读取模板、数据解析模板、文本化模板的对应关系设置。Further, the step S1 is specifically: setting the corresponding relationship between the data reading template, the data analysis template, and the textual template based on the logical relationship among conceptual objects, relationships, and entities.

进一步的,所述步骤S2具体为:进行数据读取模板、数据解析模板,文本化模板的具体设置。Further, the step S2 is specifically: performing specific settings of a data reading template, a data parsing template, and a textual template.

进一步的,所述步骤S3具体为:读取原始仿真数据文件,基于数据读取模板进行原始仿真数据文件的读取,基于数据解析文件进行所读取数据的解析,并按照文本化模板填充文本化信息文件。Further, the step S3 is specifically: read the original simulation data file, read the original simulation data file based on the data reading template, analyze the read data based on the data analysis file, and fill in the text according to the textual template information file.

进一步的,通过对数据读取模板、数据解析模板、文本化模板的对应关系的设置,构建了概念对象中的属性、属性之间的关系等和模板项之间的关系。Further, by setting the corresponding relationship between the data reading template, the data parsing template, and the textual template, the attributes in the concept object, the relationship between attributes, etc., and the relationship between template items are constructed.

进一步的,所述步骤S1具体包括如下步骤:Further, the step S1 specifically includes the following steps:

步骤S11:构建概念对象;Step S11: constructing a concept object;

步骤S12:概念对象间水平关系构建;Step S12: constructing the horizontal relationship between conceptual objects;

步骤S13:数据文本化任务的实体构建;Step S13: entity construction of the data textualization task;

步骤S14:生成数据文本化信息文件。Step S14: Generate a data textual information file.

进一步的,所述步骤S11具体为:针对电力系统仿真数据针对的电器元器件进行概念对象的设置,并基于所述概念对象构建数据读取模板,将数据读取模板作为概念对象的载体。Further, the step S11 is specifically: setting a concept object for the electrical components targeted by the power system simulation data, and constructing a data reading template based on the concept object, and using the data reading template as a carrier of the concept object.

进一步的,所述步骤S12具体为:选择所引用的概念对象,进行概念对象的关系解析,基于关系解析结果填充数据解析模板。Further, the step S12 is specifically: selecting the referenced concept object, performing relationship analysis of the concept object, and filling the data analysis template based on the relationship analysis result.

进一步的,所述步骤S13具体为:根据数据文本化任务的属性进行实体构建,并相应的构建文本化模板。Further, the step S13 specifically includes: constructing an entity according to the attributes of the data textualization task, and correspondingly constructing a textualization template.

进一步的,所述步骤S14具体为:初始化数据文本化信息文件,在后续的文本化过程中基于文本化模板进行数据文本化相关信息的保存。Further, the step S14 is specifically: initializing the data textualization information file, and saving the data textualization related information based on the textualization template in the subsequent textualization process.

本发明的有益效果包括:能够将海量的、结构复杂的、难以直接观测的计算数据,以通用的、便捷的方式转化为清晰明确的自然语言文字为内容的知识文本;在潮流仿真分析领域,将计算数据文本化,并为了所述计算数据文本化进行了定制的数据读取、解析规则,以及支撑规则运行的模板语言的制定、解析。The beneficial effects of the present invention include: the massive, complex structure, and difficult to directly observe calculation data can be converted into clear and clear natural language knowledge texts in a general and convenient way; in the field of power flow simulation analysis, The calculation data is textualized, and customized data reading and parsing rules are carried out for the textualization of the calculation data, as well as the formulation and analysis of a template language supporting the operation of the rules.

【附图说明】【Description of drawings】

此处所说明的附图是用来提供对本发明的进一步理解,构成本申请的一部分,但并不构成对本发明的不当限定,在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of this application, but do not constitute an improper limitation of the present invention. In the accompanying drawings:

图1是本发明的数据解析模板示意图。FIG. 1 is a schematic diagram of a data analysis template of the present invention.

图2是本发明的数据读取模板示意图。FIG. 2 is a schematic diagram of a data reading template of the present invention.

图3是本发明的文本化任务执行过程的时序示意图。FIG. 3 is a schematic time sequence diagram of a textualization task execution process of the present invention.

图4是本发明的文本化任务执行过程中的调用关系示意图。FIG. 4 is a schematic diagram of the calling relationship during the execution of the textualization task of the present invention.

【具体实施方式】【Detailed ways】

下面将结合附图以及具体实施例来详细说明本发明,其中的示意性实施例以及说明仅用来解释本发明,但并不作为对本发明的限定。The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments, wherein the exemplary embodiments and descriptions are only used to explain the present invention, but are not intended to limit the present invention.

如图1所示,对本发明所应用的一种电力系统仿真数据文本化方法进行详细说明;As shown in FIG. 1 , a method for textualizing power system simulation data applied by the present invention is described in detail;

基于概念对象、关系、实体之间的逻辑关系进行仿真数据文本化的执行;将数据文本化任务视为实体,称为E,设定实体存在;所述实体由若干事实(Fact)构成,事实由先验判断或逻辑推理得出;事实间不存在关系,事实只是一种描述或罗列;Carry out the execution of simulated data text based on the logical relationship between conceptual objects, relationships and entities; regard the data text task as an entity, called E, and set the entity to exist; the entity is composed of several facts, and the fact It is derived from a priori judgment or logical reasoning; there is no relationship between the facts, and the facts are only a description or listing;

事实是由概念对象和概念对象间的关系构成;概念对象包含一个或多个概念对象属性;概念对象能够跨越事实,成为不同事实的构成要素,但并不能用来直接构成实体,只是基于事实存在;属性用于描述概念对象的状态;Facts are composed of conceptual objects and the relationship between conceptual objects; conceptual objects contain one or more conceptual object attributes; conceptual objects can span facts and become constituent elements of different facts, but they cannot be used to directly constitute entities, but only exist based on facts. ; attributes are used to describe the state of a concept object;

事实是一个或多个概念对象的集合,事实的集合构成实体,将事实记为:A fact is a collection of one or more conceptual objects, the collection of facts constitutes an entity, and the facts are recorded as:

E={Fact1{O1,O2,O3...},Fact2{O1,O2,O3...}...} (1);E = {Fact1{O1, O2, O3...}, Fact2{O1, O2, O3...}...} (1);

优选的:所述关系是概念对象间的水平关系;所述水平关系包括逻辑运算关系、数值运算关系、自定义函数关系等;假设概念对象为xn,n是大于1的正整数,则关于xn的水平关系表达式可记为:Preferably: the relationship is a horizontal relationship between conceptual objects; the horizontal relationship includes a logical operation relationship, a numerical operation relationship, a self-defined function relationship, etc.; assuming that the concept object is x n , n is a positive integer greater than 1, then about The horizontal relation expression of x n can be written as:

Figure BDA0001919755270000041
Figure BDA0001919755270000041

Figure BDA0001919755270000042
Figure BDA0001919755270000042

例如:对于潮流计算数据文本化而言,一个潮流计算数据文本化任务即为一个实体;无论实体的内容如何,文本化任务将先天存在;实体中只输出事实语句,即水平关系中的逻辑值(包含概率性的真值)为真的语句;语句为事实的依据,是系统使用者所设定的规则表达式,是符合形式逻辑的;对于潮流计算数据文本化,由于其数据量大、结构复杂,需要利用数据读取模板构建概念对象;For example: for the textualization of power flow computing data, a textualization task of power flow computing data is an entity; regardless of the content of the entity, the textualization task will exist innately; only factual sentences are output in the entity, that is, the logical value in the horizontal relationship Statements (including probabilistic truth values) are true statements; statements are the basis of facts, and are regular expressions set by system users, which are in line with formal logic; for the textualization of power flow calculation data, due to its large amount of data, The structure is complex, and the concept object needs to be constructed by using the data reading template;

优选的:在水平关系构建中融合专家经验,并将数值数据转化为知识文本,利用数据解析模板构建水平关系;Preferred: integrate expert experience in the construction of horizontal relations, convert numerical data into knowledge texts, and use data analysis templates to construct horizontal relations;

文本化任务首先需要构建文本化模型,利用软件设计对模型维护,使模型运转;将文本化模板作为文本化模型中实体的载体;将数据解析模板作为事实的载体,在数据解析模板中,可设定水平关系;针对电力系统仿真数据而言,构建文本化模型的关键即是对文本化模板、数据解析模板、数据读取模板等的构建;The textualization task first needs to build a textual model, use software design to maintain the model, and make the model run; use the textual template as the carrier of the entities in the textual model; use the data parsing template as the carrier of facts, in the data parsing template, you can Set the horizontal relationship; for power system simulation data, the key to building a textual model is the construction of textual templates, data analysis templates, data reading templates, etc.;

所述电力系统仿真数据文本化方法,具体包括如下步骤:The power system simulation data textualization method specifically includes the following steps:

步骤S1:文本生成的概念模型的构建;基于概念对象、关系、实体之间的逻辑关系进行数据读取模板、数据解析模板、文本化模板的对应关系设置;Step S1: the construction of the conceptual model of text generation; carry out the corresponding relationship setting of data reading template, data analysis template, textual template based on the logical relationship between conceptual objects, relationships, and entities;

通过对数据读取模板、数据解析模板、文本化模板的对应关系的设置,构建了概念对象中的属性、属性之间的关系等和模板项之间的关系,后续在进行针对特定仿真数据文件的文本化过程中,需要根据仿真数据文件的特点进行上述模板文件的实例化设置;By setting the corresponding relationship between the data reading template, data parsing template, and textual template, the attributes in the concept object, the relationship between attributes, and the relationship between template items are constructed. In the process of textualization, the instantiation setting of the above template file needs to be performed according to the characteristics of the simulation data file;

步骤S11:构建概念对象,具体为:针对电力系统仿真数据针对的电器元器件进行概念对象的设置,并基于所述概念对象构建数据读取模板,将数据读取模板作为概念对象的载体;可以看出,通过构建数据读取模板,达到构建概念对象的目的;Step S11: constructing a concept object, specifically: setting a concept object for the electrical components targeted by the power system simulation data, and constructing a data reading template based on the concept object, and using the data reading template as a carrier of the concept object; It can be seen that by constructing a data reading template, the purpose of constructing a concept object is achieved;

优选的:数据读取模板包含若干关键项,所述关键项对应概念对象的若干属性;Preferably: the data reading template includes several key items, and the key items correspond to several attributes of the concept object;

在数据文本化的过程中,数据文本化任务就是一个实体,所述实体由若干事实(Fact)构成,事实由先验判断或逻辑推理得出;事实间不存在关系,事实只是一种描述或罗列;In the process of data textualization, the data textualization task is an entity. The entity is composed of several facts (Facts), and the facts are obtained by a priori judgment or logical reasoning; there is no relationship between the facts, and the fact is only a description or list;

优选的:需要构建的概念对象包括:母线、交流线、直流线、发电机、变压器、负荷等电器元器件;Preferred: the conceptual objects to be constructed include: busbars, AC lines, DC lines, generators, transformers, loads and other electrical components;

优选的:概念对象的属性包括:电气元件相关数据的行列、读取到的数据集合、数据集合的唯一标识、数据跨行读取、数据关联读取;Preferably: the attributes of the conceptual object include: the row and column of the electrical component related data, the read data set, the unique identifier of the data set, the data read across rows, and the data association read;

优选的:针对概念对象模型的特点,在数据读取模板中设置若干模板项与概念对象属性对应;具体的对应关系为如下表所示;Preferably: according to the characteristics of the conceptual object model, a number of template items are set in the data read template to correspond to the attributes of the conceptual object; the specific corresponding relationship is as shown in the following table;

模板项ATemplate item A 概念对象名称conceptual object name 概念对象属性Concept Object Properties 概念对象名称conceptual object name 模板项BTemplate item B 结果集result set 概念对象属性Concept Object Properties 读取到的数据集合read data set 模板项CTemplate item C 主键primary key 概念对象属性Concept Object Properties 数据集合的唯一标识Unique identifier for the dataset 模板项DTemplate item D 读取步长read step 概念对象属性Concept Object Properties 数据跨行读取Read data across rows 模板项ETemplate item E 外连接outer join 概念对象属性Concept Object Properties 数据关联读取data association read

步骤S12:概念对象间水平关系构建;具体为:选择所引用的概念对象,进行概念对象的关系解析,基于关系解析结果填充数据解析模板;Step S12: constructing a horizontal relationship between conceptual objects; specifically: selecting a referenced conceptual object, performing relationship analysis of the conceptual object, and filling a data analysis template based on the relationship analysis result;

水平关系构建即是对数据知识的提取,数据中的知识主要存在于数据间的关联关系中,因此水平关系包含对数据间的数值关系、逻辑关系、方程关系或自定义关系等的提取;The construction of horizontal relationship is the extraction of data knowledge. The knowledge in the data mainly exists in the relationship between the data, so the horizontal relationship includes the extraction of the numerical relationship, logical relationship, equation relationship or self-defined relationship between the data;

优选的:融合专家对数据关系的解析经验,对根据水平关系形成的知识文本进行数据挖掘,并将数据挖掘的结果用于水平关系的构建;Preferred: Integrate experts' experience in analyzing data relationships, perform data mining on knowledge texts formed according to horizontal relationships, and use the results of data mining for the construction of horizontal relationships;

优选的:概念对象间的水平关系包括:逻辑运算关系(HRL)、数值运算关系(HRN)、自定义函数关系(HRF)等;Preferably: the horizontal relationship between conceptual objects includes: logical operation relationship (HRL), numerical operation relationship (HRN), self-defined function relationship (HRF), etc.;

优选的:一个解析模板中可设定多个水平关系,并在水平关系中调用概念对象;Preferably: multiple horizontal relationships can be set in one parsing template, and the concept object can be called in the horizontal relationship;

模板项与水平关系的若干条目对应为下表所示;The corresponding items of template items and horizontal relationships are shown in the following table;

Figure BDA0001919755270000061
Figure BDA0001919755270000061

Figure BDA0001919755270000071
Figure BDA0001919755270000071

步骤S13:数据文本化任务的实体构建,具体为:根据数据文本化任务的属性进行实体构建,并相应的构建文本化模板;Step S13: entity construction of the data textualization task, specifically: constructing the entity according to the attributes of the data textualization task, and correspondingly constructing a textualization template;

所述根据数据文本化任务的属性进行实体构建,具体为:设置数据文本化任务对应实体包含的事实的集合;也就是概念对象、及其概念对象之间的水平关系的集合所构成的集合;基于所述实体构建文本化模板的模板项、模板项目和自定义信息以及水平关系之间的对应关系;通过构建文本化模板达成对文本化报告输出的目的;The entity building according to the attributes of the data textualization task is specifically: setting the set of facts contained in the entity corresponding to the data textualization task; that is, the set formed by the set of conceptual objects and the horizontal relationship between the conceptual objects; Build the corresponding relationship between template items, template items, custom information and horizontal relationships of the textual template based on the entity; achieve the purpose of outputting the textual report by constructing the textual template;

实体即是报告文档的全部内容,对实体模型的构建便是确定文档输出的内容集合,根据文本化模型的设计,内容集合便是输出所有水平关系的真值项;实体模型的设计倾向于报告文档的灵活性和定义关系集合的便捷性;而实体模型包含:自定义信息、水平关系调用;The entity is the entire content of the report document, and the construction of the entity model is to determine the content set of the document output. According to the design of the textual model, the content set is the truth-valued item that outputs all horizontal relationships; the design of the entity model tends to report The flexibility of documents and the convenience of defining relationship collections; while the entity model includes: custom information, horizontal relationship calls;

优选的:所述文本化模板中包括文本实体的自定义信息以及水平关系调用;Preferably: the textual template includes custom information of text entities and horizontal relationship calls;

文本化模板项与实体模型的若干条目对应为下表;The textual template items and several items of the entity model correspond to the following table;

Figure BDA0001919755270000072
Figure BDA0001919755270000072

步骤S14:生成数据文本化信息文件;具体为:初始化数据文本化信息文件,在后续的文本化过程中基于文本化模板进行数据文本化相关信息的保存;Step S14: generating a data textualization information file; specifically: initializing the data textualization information file, and saving the data textualization related information based on the textualization template in the subsequent textualization process;

所述初始化数据文本化信息文件,具体为:创建新的文本化信息文件,根据原始仿真数据文件的大小进行文本化信息文件大小的设置;The initialization data textual information file is specifically: creating a new textual information file, and setting the size of the textual information file according to the size of the original simulation data file;

数据文本化信息文件是数据文本化原型系统提供的具有支持文本挖掘的数据结构数据文件;为支撑文本挖掘,信息文件的数据结构将记录下一次文本化任务中,生成每个事实语句时的所有关联信息;同时提供以事实语句为单位的存储形式以便于以事实语句为维度的搜索;The data text information file is a data file with a data structure that supports text mining provided by the data text prototype system; in order to support text mining, the data structure of the information file will record all the facts when each fact statement is generated in the next text task. Correlation information; at the same time, it provides a storage form in units of fact sentences to facilitate the search in the dimension of fact sentences;

步骤S2:对仿真计算数据进行数据文本化准备;具体为:进行数据读取模板、数据解析模板,文本化模板的具体设置;Step S2: carry out data textual preparation to the simulation calculation data; specifically: carry out data reading template, data analysis template, and the specific setting of the textual template;

所述对仿真计算数据进行数据文本化准备:包括如下步骤:The preparation of data text for the simulation calculation data includes the following steps:

步骤S21:在数据解析模板中设定水平关系组的名称及水平关系中引用的概念对象名称;Step S21: Set the name of the horizontal relationship group and the conceptual object name referenced in the horizontal relationship in the data analysis template;

优选的:所述水平关系组名称、引用的概念对象名称均为英文字符;Preferably: the name of the horizontal relationship group and the name of the referenced concept object are all English characters;

步骤S22:在数据解析模板中设定水平关系名称;Step S22: setting the horizontal relationship name in the data analysis template;

优选的:水平关系名称为英文字符;Preferred: the name of the horizontal relationship is in English characters;

步骤S23:在数据解析模板中设定水平关系说明;Step S23: setting the horizontal relationship description in the data analysis template;

优选的:水平关系说明可为汉字、英文、数字等字符;Preferably: the description of the horizontal relationship can be Chinese characters, English, numbers and other characters;

步骤S24:在数据解析模板中设定水平关系表达式;Step S24: setting a horizontal relationship expression in the data analysis template;

优选的:水平关系表达式支持逻辑表达式、函数名称等方式。其中,逻辑表达式内支持数值运算、逻辑关系运算;Preferred: the horizontal relational expression supports logical expressions, function names, and the like. Among them, numerical operations and logical relation operations are supported in logical expressions;

步骤S215在数据读取模板中设定概念对象名称;Step S215 sets the conceptual object name in the data read template;

优选的:概念对象名称为英文字符;Preferred: the name of the concept object is in English characters;

步骤S26:在数据读取模板中设定概念对象说明字段;Step S26: setting the conceptual object description field in the data reading template;

优选的:概念对象说明内容可为汉字、英文、数字等字符;Preferably: the description content of the concept object can be Chinese characters, English, numbers and other characters;

步骤S27:在数据读取模板中设定概念对象数据来源的文件名称及返回的结果集名称;Step S27: setting the file name of the conceptual object data source and the returned result set name in the data reading template;

步骤S28:在数据读取模板中设定概念对象数据集主键;Step S28: set the primary key of the conceptual object dataset in the data read template;

优选的:主键为概念对象数据文件的列号;Preferably: the primary key is the column number of the conceptual object data file;

步骤S29:在数据读取模板中设定概念对象的关联读取数据;Step S29: setting the associated read data of the concept object in the data read template;

优选的:根据仿真数据特有结构,可设定概念对象A、B间,对象A的指定行、列的数据内容与对象B的行序号间的关联;Preferably: according to the unique structure of the simulation data, between conceptual objects A and B, the association between the data content of the specified row and column of object A and the row serial number of object B can be set;

步骤S210:在文本化模板中配置调用设定好的水平关系名称,并根据需要填写自定义信息;Step S210: configure and call the set horizontal relationship name in the textual template, and fill in custom information as required;

步骤S3:执行数据文本化任务;具体为:读取原始仿真数据文件,基于数据读取模板进行原始仿真数据文件的读取,基于数据解析文件进行所读取数据的解析,并按照文本化模板填充文本化信息文件;Step S3: performing a data textualization task; specifically: read the original simulation data file, read the original simulation data file based on the data reading template, analyze the read data based on the data analysis file, and follow the textualization template Fill textual information files;

优选的:所述原始仿真数据文件为潮流仿真计算数据文件;所述潮流仿真计算数据文件按不同的电气元件存储在一个算例文件夹内,单个文件的内容为一类电气元件的仿真计算数据;每个文件的内容形式为二维表,二维表的行表示在单位仿真时间内,电气元件的某个物理量所产生的仿真数据,二维表的列表示这类元件的可观测物理量;此外,数据形式的变化之处在于,有可能按多行展现电气元件的可观测物理量和单位时间的仿真数据;Preferably: the original simulation data file is a power flow simulation calculation data file; the power flow simulation calculation data file is stored in a calculation example folder according to different electrical components, and the content of a single file is the simulation calculation data of a class of electrical components ;The content of each file is in the form of a two-dimensional table, the row of the two-dimensional table represents the simulation data generated by a certain physical quantity of an electrical component in the unit simulation time, and the column of the two-dimensional table represents the observable physical quantity of this type of component; In addition, the change in the data form is that it is possible to display the observable physical quantities of electrical components and simulation data per unit time in multiple lines;

优选的:潮流仿真计算数据文件具有文件间关联的特点,可由第一文件中某一行列的数据值关联到第二文件中某一行列的数据值;关联的两个数据值相等;例如:由A电气元件数据中,某一行列LaCa的值关联到B电气元件数据中某一行列LbCb的数据值,可简记为A(LaCa)=B(LbCb);Preferably: the power flow simulation calculation data file has the characteristics of association between files, and the data value of a certain row and column in the first file can be associated with the data value of a certain row and column in the second file; the two associated data values are equal; for example: by In the electrical component data of A, the value of a row and column L a C a is related to the data value of a row and column L b C b in the electrical component data of B, which can be abbreviated as A(L a C a )=B(L b C b );

所述基于数据读取模板进行原始仿真数据文件的读取,具体为:针对概念对象模型的特点,在数据读取模板中基于模板项与概念对象属性对应关系,进行模板项的填充;The reading of the original simulation data file based on the data reading template is specifically: according to the characteristics of the conceptual object model, in the data reading template, based on the corresponding relationship between the template item and the conceptual object attribute, the template item is filled;

在进行数据读取模板结束后,数据文本化任务读取所有模板解析所需要的调用函数进行后续的模板解析;After the data reading template is completed, the data textualization task reads all the calling functions required for template parsing for subsequent template parsing;

所述基于数据解析文件进行所读取数据的解析,具体为:进行模板解析函数的循环调用,在每次调用过程中,模板解析函数通过读取数据解析文件,进行概念对象及其水平关系的解析;通过循环调用来解析所有的模板项,直到所有模板项均解析完毕为止;The parsing of the read data based on the data parsing file is specifically: performing a cyclic call of the template parsing function, and in each calling process, the template parsing function reads the data parsing file to perform a conceptual object and its horizontal relationship. Parse; parse all template items through loop calls until all template items are parsed;

所述按照文本化模板填充文本化信息文件,具体为:将数据解析结果按照文本化模板进行文本化信息文件的填充;The filling of the textual information file according to the textualized template is specifically: filling the textualized information file with the data analysis result according to the textualized template;

优选的;在发起执行文本化任务后,初始化文本化信息文件;Preferably; after initiating the execution of the textualization task, initialize the textualized information file;

优选的:所述文本化信息文件为位于分布式存储设备上;以适用于当前电力系统仿真计算的大数据环境;Preferably: the textual information file is located on a distributed storage device; in a big data environment suitable for current power system simulation computing;

以准备数据“36节点算例数据”为原始数据文件,文件夹大小为2.66M,其中包含母线、交流线、变压器、直流线、发电机、负荷等数据说明文件与数据结果文件;进行所述数据文本化过程中,需要首先配置好读取模板、解析末班、文本化模板后,在文本化系统界面上选择“场景管理”,新建场景“作业2”,并选择相应模板,并导入原始数据文件。在主界面点击分析,将得到本次分析结果;查看本地项目文件夹“项目路径名”+“resultData”,可以看到根据规则生成的临时文件,临时文件大小为50.26KB;Taking the prepared data "36-node calculation example data" as the original data file, the folder size is 2.66M, which contains data description files and data result files such as busbar, AC line, transformer, DC line, generator, load, etc.; In the process of data textualization, you need to configure the reading template, the last shift analysis, and the textual template first, then select "Scenario Management" on the textual system interface, create a new scene "Job 2", select the corresponding template, and import the original template. data files. Click Analysis on the main interface to get the analysis results; check the local project folder "project path name" + "resultData", you can see the temporary file generated according to the rules, the size of the temporary file is 50.26KB;

优选的:数据文本化认为采用分布式设备完成;例如:运行于两台节点机中,达成了多机分布式处理的试验目的;同时,在文本生成过程中实现了生成模板和生成过程的可配置的特性,同时只使用了2M左右的数据就可以生成相对准确的文本案例,达到了设计要求和目的;Preferably: the data text is considered to be completed by distributed equipment; for example, it runs on two node machines to achieve the experimental purpose of multi-machine distributed processing; at the same time, in the process of text generation, it realizes the possibility of generating templates and generating processes. The configuration features, and at the same time, only about 2M data can be used to generate relatively accurate text cases, which achieves the design requirements and purposes;

在本发明所提供的几个实施例中,应该理解到,所揭露的方法和终端,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed method and terminal may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.

另外,在不发生矛盾的情况下,上述几个实施例中的技术方案可以相互组合和替换。In addition, the technical solutions in the above-mentioned embodiments can be combined and replaced with each other under the condition that no contradiction occurs.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.

对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个模块或装置也可以由一个模块或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。It will be apparent to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, but that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, which are therefore intended to fall within the scope of the appended claims. All changes within the meaning and range of the equivalents of , are included in the present invention. Any reference signs in the claims shall not be construed as limiting the involved claim. Furthermore, it is clear that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. Several modules or means recited in the system claims can also be implemented by one module or means by means of software or hardware. The terms first, second, etc. are used to denote names and do not denote any particular order.

最后应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present invention.

Claims (4)

1. A power system simulation data textualization method, the method comprising:
step S1, constructing a conceptual model generated by the text;
step S2, performing data text preparation on the simulation calculation data;
step S3, executing data text task;
the step S1 specifically includes the following steps:
step S11: constructing a concept object;
step S12: constructing a horizontal relation between concept objects;
step S13: entity construction of a data textualization task;
step S14: generating a data text information file;
the step S11 specifically includes: setting a concept object for an electric appliance component aimed by power system simulation data, constructing a data reading template based on the concept object, and taking the data reading template as a carrier of the concept object;
the data reading template comprises a plurality of key items, and the key items correspond to a plurality of attributes of the concept object;
the constructed concept objects comprise: the system comprises a bus, an alternating current line, a direct current line, a generator, a transformer and load electrical components;
the attributes of the conceptual object include: the method comprises the following steps of row and column of electric component related data, read data set, unique identification of the data set, data cross-row reading and data association reading;
the step S12 specifically includes: selecting the referred concept object, performing relation analysis of the concept object, and filling a data analysis template based on a relation analysis result;
the horizontal relation construction comprises the following steps: extracting data knowledge;
the analysis experience of the data relation is fused, data mining is carried out on the knowledge text formed according to the horizontal relation, and the result of the data mining is used for constructing the horizontal relation;
the horizontal relationship between conceptual objects includes: a logical operation relationship, a numerical operation relationship and a custom function relationship;
the step S13 specifically includes: entity construction is carried out according to the attribute of the data textualization task, and a textualization template is correspondingly constructed;
the entity construction is carried out according to the attribute of the data text task, and specifically comprises the following steps: setting a set of facts contained in the entity corresponding to the data textualization task; constructing corresponding relations among template items, user-defined information and horizontal relations of the textual templates based on the entities; the purpose of outputting the textual report is achieved by constructing a textual template;
the step S14 specifically includes: initializing a data text information file, and storing data text related information based on a text template in a subsequent text process;
the step S3 specifically includes: reading an original simulation data file, reading the original simulation data file based on a data reading template, analyzing the read data based on a data analyzing file, and filling a textual information file according to a textual template; the original simulation data file is a load flow simulation calculation data file;
the reading of the original simulation data file based on the data reading template specifically comprises the following steps: filling template items in the data reading template based on the corresponding relation between the template items and the concept object attributes according to the characteristics of the concept object model;
after the data reading template is subjected to analysis, the data textualization task reads all calling functions required by the template analysis to perform subsequent template analysis;
the analyzing of the read data based on the data analyzing file specifically comprises the following steps: circularly calling the template analysis function, wherein in each calling process, the template analysis function analyzes the concept object and the horizontal relation thereof by reading the data analysis file; analyzing all the template items by circularly calling until all the template items are analyzed;
the filling of the textual information file according to the textual template specifically comprises: and filling the textual information file according to the data analysis result by a textual template.
2. The power system simulation data textualization method according to claim 1, wherein the step S1 is specifically: and setting the corresponding relation of the data reading template, the data analysis template and the textualization template based on the logical relation among the concept objects, the relation and the entities.
3. The electric power system simulation data textualization method according to claim 2, wherein the step S2 is specifically: and performing specific setting of a data reading template, a data analysis template and a textualization template.
4. The electric power system simulation data textualization method according to claim 1, wherein the attributes in the conceptual object, the relationships between the attributes and the relationships between the template items are constructed by setting the corresponding relationships of the data reading template, the data parsing template and the textualization template.
CN201811588838.1A 2018-12-25 2018-12-25 Electric power system simulation data textualization method Active CN111368387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811588838.1A CN111368387B (en) 2018-12-25 2018-12-25 Electric power system simulation data textualization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811588838.1A CN111368387B (en) 2018-12-25 2018-12-25 Electric power system simulation data textualization method

Publications (2)

Publication Number Publication Date
CN111368387A CN111368387A (en) 2020-07-03
CN111368387B true CN111368387B (en) 2022-07-26

Family

ID=71207832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811588838.1A Active CN111368387B (en) 2018-12-25 2018-12-25 Electric power system simulation data textualization method

Country Status (1)

Country Link
CN (1) CN111368387B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111159986A (en) * 2019-12-17 2020-05-15 国家电网有限公司大数据中心 Method and system for executing intelligent task constructed based on data resource catalog

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8019791B2 (en) * 2006-11-22 2011-09-13 Oracle International Corporation Method and system for transforming metadata modeled in the common information model into grid control target metadata
CN101794280B (en) * 2010-03-11 2011-07-27 北京中科辅龙计算机技术股份有限公司 Form automatic generation method and system based on form template set
CN102819655B (en) * 2011-06-10 2015-09-16 中国科学院深圳先进技术研究院 Represent the system and method for electronic health record
CN104408571A (en) * 2014-12-03 2015-03-11 国家电网公司 Conversion tool and method for power flow model of power grid
CN105528418B (en) * 2015-12-04 2019-06-07 东软集团股份有限公司 A kind of design documentation generation method and device

Also Published As

Publication number Publication date
CN111368387A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN109871311B (en) Method and device for recommending test cases
Deitrick et al. Mutually enhancing community detection and sentiment analysis on twitter networks
CN113672781A (en) Data query method, device, electronic device and storage medium
CN111813963A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN111090417B (en) Binary file analysis method, binary file analysis device, binary file analysis equipment and binary file analysis medium
CN104298496B (en) data analysis type software development framework system
CN100550020C (en) A kind of method and apparatus that is used to solve the Chinese software issue of supporting multilanguage
CN104391881A (en) Word segmentation algorithm-based log parsing method and word segmentation algorithm-based log parsing system
CN106503268B (en) Data comparison methods, devices and systems
CN109933331A (en) Data transfer device and associated component between a kind of client-server
Tiwary et al. Compression of xml and json api responses
CN112528013A (en) Text abstract extraction method and device, electronic equipment and storage medium
CN112035416A (en) Data blood relationship analysis method, device, electronic device and storage medium
CN117171362A (en) A relationship extraction method, device, equipment and medium for power system information
KR20200103133A (en) Method and apparatus for performing extract-transfrom-load procedures in a hadoop-based big data processing system
CN111368387B (en) Electric power system simulation data textualization method
CN115757596A (en) A general electric power unstructured data conversion method for structured data
CN107038022B (en) Deserialization method and deserialization device
CN113434658A (en) Thermal power generating unit operation question-answer generation method, system, equipment and readable storage medium
CN111435365A (en) Data textualization task execution method
CN109995518A (en) Method for generating cipher code and device
Cui et al. CURIE: Evaluating LLMs On Multitask Scientific Long Context Understanding and Reasoning
CN104361121B (en) A kind of batch analytic method of WEB reporting systems formula
CN111414452B (en) Search word matching method and device, electronic equipment and readable storage medium
CN115129871A (en) Text category determination method, apparatus, computer 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
GR01 Patent grant
GR01 Patent grant