CN114996930A - Modeling method and device, electronic equipment and storage medium - Google Patents

Modeling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114996930A
CN114996930A CN202210589365.7A CN202210589365A CN114996930A CN 114996930 A CN114996930 A CN 114996930A CN 202210589365 A CN202210589365 A CN 202210589365A CN 114996930 A CN114996930 A CN 114996930A
Authority
CN
China
Prior art keywords
power grid
necessary
service scene
dynamically
modeling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210589365.7A
Other languages
Chinese (zh)
Inventor
邱泽坚
吴龙腾
徐春华
陈卉灿
张水平
袁炜灯
张鑫
胡润锋
陈凤超
张锐
刘树安
程涛
王健华
罗松林
黄达区
刘树鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Dongguan Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Dongguan Power Supply Bureau of Guangdong Power Grid 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 Guangdong Power Grid Co Ltd, Dongguan Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202210589365.7A priority Critical patent/CN114996930A/en
Publication of CN114996930A publication Critical patent/CN114996930A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/04Power grid distribution networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The application discloses a modeling method, a modeling device, electronic equipment and a storage medium, and relates to the technical field of computers. Wherein, the method comprises the following steps: classifying a plurality of power grid entities in a power distribution network database based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene; acquiring information records of necessary power grid entities from a power distribution grid database; determining a dynamically modelable power grid object from a data set corresponding to a business scene based on the information record; and adopting a JavaScript object representation method to build a model for the dynamically modelled power grid object to obtain a memory resident dynamic model corresponding to the service scene. The technical scheme provided by the application can save the memory and improve the processing efficiency of the calculation program.

Description

Modeling method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a modeling method, an apparatus, an electronic device, and a storage medium.
Background
In recent years, with the rapid promotion of national economy of China, the power distribution network response power utilization demand is rapidly developed, and the requirements on scale and power supply quality are higher and higher. Under the condition, various analysis and calculation are required to be carried out on the power distribution network, so that the daily operations of maintenance, power supply adjustment and the like of the power distribution network are completed under the condition that power supply is not influenced. However, the large scale of the power distribution network causes difficulties in various analysis and calculation of the power distribution network, such as: on one hand, the modeling of the power distribution network needs to meet various calculations, and detailed modeling is needed to cause overlarge memory occupation, and on the other hand, the processing efficiency of a calculation program is low due to overlarge scale and data dispersion.
Disclosure of Invention
The application provides a modeling method, a modeling device, an electronic device and a storage medium, which can save memory and improve the processing efficiency of a calculation program.
In a first aspect, the present application provides a modeling method, the method comprising:
classifying a plurality of power grid entities in a power distribution network database based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene;
acquiring information records of the necessary power grid entities from the power distribution grid database;
determining a dynamically modelable grid object from a data set corresponding to the service scene based on the information record;
and adopting a JavaScript object representation method to build a model for the dynamically modelable power grid object to obtain a memory resident dynamic model corresponding to the service scene.
In a second aspect, the present application provides a modeling apparatus, the apparatus comprising:
the data set determining module is used for classifying a plurality of power grid entities in a power distribution network database based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene;
the information acquisition module is used for acquiring the information record of the necessary power grid entity from the power distribution network database;
the object determining module is used for determining a dynamically modelable power grid object from a data set corresponding to the service scene based on the information record;
and the model building module is used for building a model for the dynamically modelable power grid object by adopting a JavaScript object representation method to obtain a memory resident dynamic model corresponding to the service scene.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the modeling method of any of the embodiments of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium storing computer instructions for causing a processor to perform a modeling method according to any of the embodiments of the present application when the computer instructions are executed.
The embodiment of the application provides a modeling method, a modeling device, electronic equipment and a storage medium, wherein the method comprises the following steps: classifying a plurality of power grid entities in a power distribution network database based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene; acquiring information records of necessary power grid entities from a power distribution network database; determining a dynamically modelable power grid object from a data set corresponding to a business scene based on the information record; and adopting a JavaScript object representation method to build a model for the dynamically modelled power grid object to obtain a memory resident dynamic model corresponding to the service scene. The method includes the steps that a power distribution network database is classified and sorted based on a service scene to obtain a necessary power grid entity and a necessary field corresponding to the service scene, and further obtain a tree data structure data set corresponding to the service scene; and then selecting a power grid entity occupying too large memory, a power grid entity or field with low use frequency or a power grid entity or field with high repetition degree from the data set by setting a dynamic modeling condition, taking the selected power grid entity or field as a dynamically modelable power grid object, and finally modeling the dynamically modelable power grid object by adopting a JavaScript object representation method. According to the method and the device, the dynamic modeling is carried out on the dynamically modeled power grid object, so that the memory can be saved, and the processing efficiency of a calculation program can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first schematic flow chart of a modeling method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a data set corresponding to a service scenario provided in an embodiment of the present application;
FIG. 3 is a second flow chart of a modeling method provided by an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a modeling apparatus provided in an embodiment of the present application;
FIG. 5 is a block diagram of an electronic device used to implement a modeling method of an embodiment of the application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," "target," and "original" and the like in the description and the claims of the invention and the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a first flowchart of a modeling method provided in an embodiment of the present application, and the embodiment is applicable to a case of dynamically modeling power distribution network data. The modeling method provided by the embodiment of the present application may be executed by a modeling apparatus provided by the embodiment of the present application, and the apparatus may be implemented by software and/or hardware and integrated in an electronic device executing the method.
Referring to fig. 1, the method of the present embodiment includes, but is not limited to, the following steps:
s110, classifying a plurality of power grid entities in the power distribution network database based on the service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene.
The service scene refers to a specific application scene of the power distribution network in the operation process, for example, the service scene may be a power distribution network overhaul scene, a power consumption collection scene, and the like. The power grid entity refers to a set of certain data in a power distribution network database, comprises abstract entities such as conductive equipment, specific entities such as feeders, switches and transformers, topological entities such as endpoints and connection nodes, secondary equipment entities such as an acquisition device and a control terminal, and marketing entities such as users and electric energy metering. The necessary power grid entity is an important power grid entity which is essential for a certain service scene.
Optionally, the distribution network database may be a large-scale 10kV distribution network database, and the power network entities in the distribution network database may perform information management according to IEC61970 and IEC61968 standards.
In the embodiment of the application, the electronic device can label the service scene to obtain the corresponding scene label. And taking the scene labels as root nodes, classifying the power grid entities in the power distribution network database according to different scene labels, and determining the data sets of the tree-shaped data structures corresponding to different scene labels. Optionally, the structure type of the data set may be other data structures besides the tree data structure, and is not limited herein. The data set includes at least one necessary power grid entity corresponding to the service scenario, and the necessary power grid entity is used as a child node of the scenario label, that is, the necessary power grid entity is a child node under a root node (i.e., the scenario label).
Optionally, the necessary grid entity includes at least one necessary field, and the necessary field is used as a leaf node of the necessary grid entity, that is, the necessary field is a leaf node under a child node (i.e., the necessary grid entity). The essential fields are important fields that are essential for a certain grid entity.
Further, classifying a plurality of power grid entities in the power distribution network database based on the service scene to obtain a data set corresponding to the service scene, including: from the perspective of the requirement of a service scene on a power grid entity, determining at least one necessary power grid entity corresponding to the service scene from a plurality of power grid entities according to a first necessary principle based on the service scene; using and analyzing the fields of the power grid entity, performing requirement evaluation on each field in the necessary power grid entity according to a second necessary principle, and selecting at least one necessary field corresponding to the necessary power grid entity; and obtaining a data set corresponding to the service scene based on the at least one necessary power grid entity and the at least one necessary field. The first necessary principle refers to a set of entities with the least number necessary for completing a service corresponding to a service scenario. The second necessary principle refers to a set of fields with the least number of fields necessary to complete the service corresponding to the service scenario.
In the embodiment of the application, the root node of the tree data structure of the scene label is established based on the service scene. Traversing a plurality of power grid entities in a power distribution network database, evaluating whether the power grid entities are required by a scene according to a service scene, and if so, adding child nodes on a root node of the scene label. And traversing specific fields in the necessary power grid entities, evaluating whether the fields are necessary for the scenes according to the service scenes, and if so, adding leaf nodes on the child nodes of the model. In particular, information for record identification (such as record ID, record name, etc.) must be listed in necessary fields.
Fig. 2 is a schematic diagram of a data set corresponding to a service scenario, where the data set corresponding to the service scenario includes a scenario tag (i.e., a root node), at least one necessary grid entity (i.e., a child node), and at least one necessary field (i.e., a leaf node). The purpose of this setting is to appropriately cut IEC61970 and IEC61968 standards in the distribution network database, so as to generate a data set (such as a tree data structure) corresponding to a service scene, which is convenient for managing the distribution network database.
Alternatively, the data sets in different business scenarios may be used as E case Expressed, the necessary grid entities under all business scenarios can be represented by the following formula (1):
Figure BDA0003664487750000071
in the formula, E is a necessary power grid entity in all service scenarios, n is a reference number of a service scenario, Ecase, n is a necessary power grid entity in the nth service scenario, and U is a union set.
And S120, acquiring information records of necessary power grid entities from the power distribution grid database.
In the embodiment of the present application, the information record of a certain grid entity may be any information related to the grid entity, such as history information, website information, and the like. The electronic equipment sends an information acquisition request of a necessary power grid entity to the server, and the server receives and analyzes the information acquisition request and sends the information record of the necessary power grid entity to the electronic equipment.
And S130, determining a dynamically modelable power grid object from the data set corresponding to the service scene based on the information record.
The grid object may be a grid entity or a field. The dynamically modelable grid object may be a grid entity occupying too large memory, a grid entity or field with low frequency of use, or a grid entity or field with high repetition degree. For example, the dynamically modelable grid object may be all fields of a certain grid entity (i.e. the entire grid entity), and may be partial fields of a certain grid entity (i.e. the aforementioned fields).
In this embodiment of the application, after the information record is obtained from the distribution network database through the step S120, all contents in the information record are traversed, so as to determine whether to perform dynamic modeling processing, so as to obtain a dynamically modelable power grid object. Specifically, the occupied memory of the power grid entity can be determined according to the number of the information records, and whether the power grid entity needs to be subjected to dynamic modeling processing is judged according to the size of the occupied memory, for example, if the occupied memory of a certain power grid entity is too large, the dynamic modeling processing is performed on the certain power grid entity; the repetition degree of the field value may be statistically analyzed according to the field content of the information record to determine whether the field needs to be dynamically modeled, for example, if the field is frequently used or has a high repetition degree, the field is dynamically modeled.
Optionally, the dynamically modelable grid object in different service scenarios may use D case Expressed, a dynamically modelable grid object under all business scenarios can be represented by the following equation (2):
Figure BDA0003664487750000084
in the formula, D is a dynamically modelable power grid object under all service scenes, n is an index number of the service scene, and D case,n And U is a union set for the dynamically modeled power grid object in the nth service scene.
Further, after determining the dynamically modelable grid object from the data set corresponding to the service scenario based on the information record, the method further includes: taking a data set corresponding to a service scene as a complete set; taking a dynamically modeling object corresponding to a business scene as a subset; solving a complementary set of the subset based on the full set, and taking the complementary set as a static modeling-capable power grid object corresponding to the service scene; and constructing a model for the power grid object capable of being statically modeled by adopting a preset programming language to obtain a memory resident inherent model corresponding to the service scene. The power grid object capable of being statically modeled refers to a power grid entity or field with high use frequency and low repetition degree. A statically modelable grid object needs to satisfy the following equation (3):
Figure BDA0003664487750000081
in the formula (I), the compound is shown in the specification,
Figure BDA0003664487750000082
the method is characterized in that the method comprises the steps of providing a static modeling power grid object under all service scenes, providing a necessary power grid entity under all service scenes, providing a dynamic modeling power grid object under all service scenes,
Figure BDA0003664487750000083
indicating an empty set.
S140, a JavaScript object representation method is adopted to build a model for the dynamically modelable power grid object, and a memory resident dynamic model corresponding to the service scene is obtained.
The JavaScript Object Notation (Json) is a lightweight data exchange format, and is widely applied to asynchronous communication of application programs, for example, in communication between a Web client and a server. The data structure of the memory resident dynamic model is expressed in a Json data format and is independent of a programming language.
Further, a JavaScript object notation is adopted to build a model for the dynamically modelable object, and a memory resident dynamic model corresponding to the service scene is obtained, including: determining data characteristics of a dynamically modelable object; if the preset number of power grid objects in the dynamically modelable power grid objects have the same data characteristics, building a model for the preset number of power grid objects according to a first modeling mode; and constructing models for other power grid objects in the dynamically modelable power grid objects according to a second modeling mode so as to obtain a memory resident dynamic model corresponding to the service scene, wherein the other power grid objects are power grid objects except for the preset number of power grid objects in the dynamically modelable power grid objects. That is, the data structure of the built memory-resident dynamic model is different according to the data characteristics of the dynamically modelable object.
In this embodiment of the application, the first modeling manner is a modeling method for a power grid object with a large amount of repeated data, and the model building method may be that a field is defined as a data feature, and a field value is defined as a power grid object with the data feature. The second modeling mode is a modeling method for a power grid object without a large amount of repeated data, and the model building method may be that the power grid object is used as a field, and a field value is a data characteristic of the power grid object. Optionally, an empty memory resident dynamic model may be constructed as a reserved model for facilitating dynamic management in a subsequent operation process.
Further, after obtaining the memory resident dynamic model corresponding to the service scenario, the method further includes: extracting key fields (such as keyField) shared by the memory resident inherent model and the memory resident dynamic model; establishing a mapping relation between the memory resident inherent model and the memory resident dynamic model based on the key field; and splicing the memory resident inherent model and the memory resident dynamic model based on the mapping relation to obtain a complete model corresponding to the service scene.
According to the technical scheme provided by the embodiment, a plurality of power grid entities in a power distribution network database are classified based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene; acquiring information records of necessary power grid entities from a power distribution network database; determining a dynamically modelable power grid object from a data set corresponding to a business scene based on the information record; and adopting a JavaScript object representation method to build a model for the dynamically modelled power grid object to obtain a memory resident dynamic model corresponding to the service scene. The method includes the steps that a power distribution network database is classified and sorted based on a service scene to obtain necessary power grid entities and necessary fields corresponding to the service scene, and further obtain a tree data structure data set corresponding to the service scene; and then selecting a power grid entity occupying too large memory, a power grid entity or field with low use frequency or a power grid entity or field with high repetition degree from the data set by setting a dynamic modeling condition, taking the selected power grid entity or field as a dynamically modelable power grid object, and finally modeling the dynamically modelable power grid object by adopting a JavaScript object representation method. According to the method and the device, the dynamic modeling is carried out on the dynamically modeled power grid object, so that the memory can be saved, and the processing efficiency of a calculation program can be improved.
The modeling method provided by the embodiment of the present invention is further described below, and fig. 3 is a second flow chart of the modeling method provided by the embodiment of the present invention. The embodiment of the application is optimized on the basis of the embodiment, and specifically optimized as follows: the present embodiment explains the determination process of the dynamically modelable grid object and the adjustment process of the memory-resident dynamic model in detail.
Referring to fig. 3, the method of the present embodiment includes, but is not limited to, the following steps:
s210, classifying the multiple power grid entities in the power distribution network database based on the service scene to obtain a data set corresponding to the service scene.
The relevant content of this step is referred to step S110 in fig. 1, and is not described here again.
And S220, acquiring information records of necessary power grid entities from the power distribution grid database.
The relevant content of this step is referred to step S120 in the embodiment of fig. 1, and is not described here again.
S230, judging whether the necessary power grid entity has a first condition of dynamic modeling based on the number of the information records; and if so, acquiring a mapping table of at least one necessary field in the necessary power grid entity.
The first condition of the dynamic modeling is that the memory of the power grid entity is occupied within a preset standard.
In the embodiment of the application, after the information records are acquired from the power distribution network database, the number of the information records is counted. If the number of the information records is smaller than a preset value (for example, 100), it is determined that the necessary power grid entity does not cause the memory occupation to be too large, the first condition of dynamic modeling is not met, the dynamic modeling processing is not needed, and then the next necessary power grid entity is judged. If the number of the information records is greater than or equal to a preset value (for example, 100), it is considered that the necessary grid entity causes an excessively large memory occupation, has a first condition of dynamic modeling, and needs to perform dynamic modeling processing. The mapping table is used for recording field values of necessary fields, the number of key values of the field values and the number of times of repetition of the field values.
The mapping table establishing process may be: traversing fields of a power grid entity, establishing a field value-repetition number mapping table, and adding 1 to the repetition number of the value in the mapping table when the field value appears newly; when a field value already exists in the mapping table, the number of repetitions is increased by 1 in the mapping table every time it occurs.
S240, judging whether the number of the key values exceeds a first preset percentage of the number of the information records, and if not, selecting the maximum repetition times in the mapping table.
And the second condition of the dynamic modeling is that the number of key values and the repetition times of fields in the power grid entity are within preset standards. The number of key values is the number of categories of values taken.
In the embodiment of the application, after the mapping table of at least one necessary field in the necessary power grid entity is obtained, the number of key values in the mapping table is counted, if the number of key values is greater than a first preset percentage (for example, 33%) of the number of records, the field is considered to have no second condition for dynamic modeling, and then the next necessary field is judged. If the number of the key values is less than or equal to a first preset percentage (such as 33%) of the number of the records, selecting the number of times of repetition of the field values in the mapping table, and determining the maximum value of the number of times of repetition.
And S250, judging whether the maximum repetition frequency exceeds a second preset percentage of the information record, and if so, taking a necessary field corresponding to the maximum repetition frequency as a dynamically-modelable power grid object.
In the embodiment of the present application, after determining the maximum value of the repetition times, it is determined whether the maximum repetition times exceeds a second preset percentage (for example, 60%) of the information record, and if not, the field is considered to have no second condition for dynamic modeling, and then the next necessary field is determined. And if the current grid entity is not in the dynamic modeling list, the field is determined to have a second dynamic modeling condition, and the power grid entity and the field are listed in the dynamic modeling list.
S260, adopting a JavaScript object representation method to build a model for the dynamically modelable power grid object, and obtaining a memory resident dynamic model corresponding to the service scene.
The relevant content of this step is referred to step S140 in the embodiment of fig. 1, and is not described here again.
S270, when the memory resident dynamic model is operated, new information records of necessary power grid entities are obtained from the power distribution network database again; and evaluating the memory occupation of the memory resident dynamic model based on the new information record to obtain an evaluation result, and adjusting the memory resident dynamic model based on the evaluation result.
In the embodiment of the present application, after the memory resident dynamic model is obtained through the above steps, the memory resident dynamic model is further required to be adjusted. The method specifically comprises the following steps: when the memory resident dynamic model is operated, the information record of the power grid entity may be updated, so that a new information record of a necessary power grid entity needs to be obtained again from the power distribution network database, and the memory occupation of the memory resident dynamic model is evaluated according to the rules in the steps S230-S250 to obtain an evaluation result. And the evaluation result records the power grid entities or fields which no longer meet the dynamic modeling condition. If the memory occupation saving effect of the dynamic model is not obvious, a memory resident inherent model is constructed for the power grid entity or field which no longer meets the dynamic modeling condition according to the evaluation result in the next initialization work, so that the memory resident dynamic model is adjusted.
According to the technical scheme provided by the embodiment, a plurality of power grid entities in a power distribution network database are classified based on a service scene to obtain a data set corresponding to the service scene; acquiring information records of necessary power grid entities from a power distribution network database; judging whether the necessary power grid entity has a first condition for dynamic modeling based on the number of the information records; if yes, obtaining a mapping table of at least one necessary field in a necessary power grid entity; judging whether the number of the key values exceeds a first preset percentage of the number of the information records, and if not, selecting the maximum repetition times in the mapping table; judging whether the maximum repetition times exceed a second preset percentage of the information record or not, and if so, taking necessary fields corresponding to the maximum repetition times as a dynamically modelled power grid object; adopting a JavaScript object representation method to build a model for the dynamically modelled power grid object to obtain a memory resident dynamic model corresponding to a service scene; when the memory resident dynamic model is operated, new information records of necessary power grid entities are obtained from the power distribution network database again; and evaluating the memory occupation of the memory resident dynamic model based on the new information record to obtain an evaluation result, and adjusting the memory resident dynamic model based on the evaluation result. The method includes the steps that a power distribution network database is classified and sorted based on a service scene to obtain a necessary power grid entity and a necessary field corresponding to the service scene, and further obtain a tree data structure data set corresponding to the service scene; and then selecting a power grid entity occupying too large memory, a power grid entity or field with low use frequency or a power grid entity or field with high repetition degree from the data set by setting a dynamic modeling condition, taking the power grid entity or field as a power grid object capable of being dynamically modeled, and finally constructing a model by adopting a JavaScript object representation method to obtain a memory resident dynamic model, and adjusting the memory resident dynamic model. According to the method and the device, the dynamic modeling is carried out on the dynamically modeled power grid object, so that the memory can be saved, and the processing efficiency of a calculation program can be improved.
Fig. 4 is a schematic structural diagram of a modeling apparatus provided in an embodiment of the present application, and as shown in fig. 4, the apparatus 400 may include:
a data set determining module 410, configured to classify, based on a service scenario, a plurality of power grid entities in a power distribution network database, to obtain a data set corresponding to the service scenario, where the data set includes at least one necessary power grid entity corresponding to the service scenario;
an information obtaining module 420, configured to obtain information records of the necessary grid entities from the distribution grid database;
an object determination module 430, configured to determine, based on the information record, a dynamically modelable power grid object from a data set corresponding to the service scenario;
the model building module 440 is configured to build a model for the dynamically modelable power grid object by using a JavaScript object notation, so as to obtain a memory resident dynamic model corresponding to the service scene.
Optionally, the necessary grid entity comprises at least one necessary field.
Further, the data set determining module 410 may be specifically configured to: determining at least one necessary power grid entity corresponding to the service scene from the plurality of power grid entities according to a first necessary principle based on the service scene; performing demand evaluation on each field in the necessary power grid entity according to a second necessary principle, and selecting at least one necessary field corresponding to the necessary power grid entity; and obtaining a data set corresponding to the service scene based on the at least one necessary power grid entity and the at least one necessary field.
Further, the object determining module 430 may be specifically configured to: judging whether the necessary power grid entity has a first condition for dynamic modeling or not based on the number of the information records; if yes, obtaining a mapping table of the at least one necessary field in the necessary power grid entity; and determining necessary fields with second dynamic modeling conditions from the at least one necessary field based on the mapping table of the at least one necessary field, and using the necessary fields with second dynamic modeling conditions as the dynamically modelable grid object.
Optionally, the mapping table is used to record field values of the necessary fields, the number of key values of the field values, and the number of repetitions of the field values.
Further, the object determining module 430 may be further specifically configured to: judging whether the number of the key values exceeds a first preset percentage of the number of the information records, and if not, selecting the maximum repetition times in the mapping table; and judging whether the maximum repetition number exceeds a second preset percentage of the information record, and if so, taking the necessary field corresponding to the maximum repetition number as a dynamically-modeled power grid object.
Further, the model building module 440 may be specifically configured to: determining data characteristics of the dynamically modelable object; if the preset number of power grid objects in the dynamically modelable power grid objects have the same data characteristics, building a model for the preset number of power grid objects according to a first modeling mode; and constructing models for other power grid objects in the dynamically modelable power grid objects according to a second modeling mode so as to obtain a memory resident dynamic model corresponding to the service scene, wherein the other power grid objects are power grid objects except the preset number of power grid objects in the dynamically modelable power grid objects.
Further, the modeling apparatus may further include: a model adjustment module;
the model adjusting module is used for acquiring new information records of the necessary power grid entity from the power distribution network database again when the memory resident dynamic model is operated; and evaluating the memory occupation of the memory resident dynamic model based on the new information record to obtain an evaluation result, and adjusting the memory resident dynamic model based on the evaluation result.
Further, the object determining module 430 may be further specifically configured to: after a dynamically modellable power grid object is determined from the data set corresponding to the service scene based on the information record, taking the data set corresponding to the service scene as a full set; taking the dynamically modeling object corresponding to the business scene as a subset; solving a complementary set of the subset based on the full set, and taking the complementary set as a static modeling power grid object corresponding to the service scene; and constructing a model for the power grid object capable of being statically modeled by adopting a preset programming language to obtain a memory resident inherent model corresponding to the service scene.
Further, the model building module 440 may be further specifically configured to: after obtaining a memory resident dynamic model corresponding to the service scene, extracting a key field shared by the memory resident inherent model and the memory resident dynamic model; establishing a mapping relation between the memory resident inherent model and the memory resident dynamic model based on the key field; and splicing the memory resident inherent model and the memory resident dynamic model based on the mapping relation to obtain a complete model corresponding to the service scene.
The modeling device provided by the embodiment can be applied to the modeling method provided by any embodiment, and has corresponding functions and beneficial effects.
Fig. 5 is a block diagram of an electronic device for implementing a display method according to an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as a modeling method.
In some embodiments, the modeling method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the modeling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the modeling method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of this application, a computer readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution of the present application can be achieved, and the present invention is not limited thereto.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (11)

1. A modeling method, the method comprising:
classifying a plurality of power grid entities in a power distribution network database based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene;
acquiring information records of the necessary power grid entities from the power distribution grid database;
determining a dynamically modelable power grid object from a data set corresponding to the service scene based on the information record;
and adopting a JavaScript object representation method to build a model for the dynamically modelable power grid object to obtain a memory resident dynamic model corresponding to the service scene.
2. The modeling method of claim 1, wherein the necessary grid entities comprise at least one necessary field, and classifying the plurality of grid entities in the distribution grid database based on the service scenario to obtain the data set corresponding to the service scenario comprises:
determining at least one necessary power grid entity corresponding to the service scene from the plurality of power grid entities according to a first necessary principle based on the service scene;
performing demand evaluation on each field in the necessary power grid entity according to a second necessary principle, and selecting at least one necessary field corresponding to the necessary power grid entity;
and obtaining a data set corresponding to the service scene based on the at least one necessary power grid entity and the at least one necessary field.
3. The modeling method of claim 2, wherein the determining a dynamically modelable grid object from a data set corresponding to the business scenario based on the information record comprises:
judging whether the necessary power grid entity has a first condition for dynamic modeling or not based on the number of the information records; if yes, obtaining a mapping table of the at least one necessary field in the necessary power grid entity;
and determining necessary fields with second dynamic modeling conditions from the at least one necessary field based on the mapping table of the at least one necessary field, and using the necessary fields with second dynamic modeling conditions as the dynamically modelable grid object.
4. The modeling method according to claim 3, wherein the mapping table is used for recording field values of the necessary fields, the number of key values of the field values, and the number of repetitions of the field values, and the determining, based on the mapping table of the at least one necessary field, a necessary field with a second condition for dynamic modeling from the at least one necessary field, and using the necessary field with the second condition for dynamic modeling as a dynamically modelable grid object includes:
judging whether the number of the key values exceeds a first preset percentage of the number of the information records, and if not, selecting the maximum repetition times in the mapping table;
and judging whether the maximum repetition times exceed a second preset percentage of the information record, and if so, taking the necessary field corresponding to the maximum repetition times as a dynamically modelable power grid object.
5. The modeling method according to claim 1, wherein the modeling the dynamically modelable grid object by using a JavaScript object notation to obtain a memory resident dynamic model corresponding to the service scenario comprises:
determining data characteristics of the dynamically modelable object;
if the preset number of power grid objects in the dynamically modelable power grid objects have the same data characteristics, building a model for the preset number of power grid objects according to a first modeling mode;
and constructing models for other power grid objects in the dynamically modelable power grid objects according to a second modeling mode so as to obtain a memory resident dynamic model corresponding to the service scene, wherein the other power grid objects are power grid objects except the preset number of power grid objects in the dynamically modelable power grid objects.
6. The modeling method of claim 1, the method further comprising:
when the memory resident dynamic model is operated, new information records of the necessary power grid entity are obtained from the power distribution network database again;
and evaluating the memory occupation of the memory resident dynamic model based on the new information record to obtain an evaluation result, and adjusting the memory resident dynamic model based on the evaluation result.
7. The modeling method of claim 1, further comprising, after determining the dynamically modelable grid object from the data set corresponding to the business scenario based on the information record:
taking a data set corresponding to the service scene as a complete set;
taking the dynamically modeling object corresponding to the business scene as a subset;
solving a complementary set of the subset based on the full set, and taking the complementary set as a static modeling power grid object corresponding to the service scene;
and constructing a model for the power grid object capable of being statically modeled by adopting a preset programming language to obtain a memory resident inherent model corresponding to the service scene.
8. The modeling method according to claim 7, further comprising, after obtaining the memory resident dynamic model corresponding to the service scenario:
extracting a key field shared by the memory resident inherent model and the memory resident dynamic model;
establishing a mapping relation between the memory resident inherent model and the memory resident dynamic model based on the key field;
and splicing the memory resident inherent model and the memory resident dynamic model based on the mapping relation to obtain a complete model corresponding to the service scene.
9. A modeling apparatus, the apparatus comprising:
the data set determining module is used for classifying a plurality of power grid entities in a power distribution network database based on a service scene to obtain a data set corresponding to the service scene, wherein the data set comprises at least one necessary power grid entity corresponding to the service scene;
the information acquisition module is used for acquiring the information records of the necessary power grid entities from the power distribution grid database;
the object determining module is used for determining a dynamically modelable power grid object from a data set corresponding to the service scene based on the information record;
and the model building module is used for building a model for the dynamically modelable power grid object by adopting a JavaScript object representation method to obtain a memory resident dynamic model corresponding to the service scene.
10. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the modeling method of any of claims 1 to 8.
11. A computer-readable storage medium storing computer instructions for causing a processor to perform the modeling method of any one of claims 1 to 8 when executed.
CN202210589365.7A 2022-05-26 2022-05-26 Modeling method and device, electronic equipment and storage medium Pending CN114996930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210589365.7A CN114996930A (en) 2022-05-26 2022-05-26 Modeling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210589365.7A CN114996930A (en) 2022-05-26 2022-05-26 Modeling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114996930A true CN114996930A (en) 2022-09-02

Family

ID=83029690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210589365.7A Pending CN114996930A (en) 2022-05-26 2022-05-26 Modeling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114996930A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117435558A (en) * 2023-12-20 2024-01-23 杭州硕磐智能科技有限公司 Metadata management method, computing device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117435558A (en) * 2023-12-20 2024-01-23 杭州硕磐智能科技有限公司 Metadata management method, computing device and storage medium
CN117435558B (en) * 2023-12-20 2024-03-29 杭州硕磐智能科技有限公司 Metadata management method, computing device and storage medium

Similar Documents

Publication Publication Date Title
CN114065864A (en) Federal learning method, federal learning device, electronic device, and storage medium
CN112560461A (en) News clue generation method and device, electronic equipment and storage medium
CN115794578A (en) Data management method, device, equipment and medium for power system
CN115202847A (en) Task scheduling method and device
CN114996930A (en) Modeling method and device, electronic equipment and storage medium
CN115657968B (en) Storage method, device, equipment and medium of boundary representation model
CN115048352B (en) Log field extraction method, device, equipment and storage medium
CN115757304A (en) Log storage method, device and system, electronic equipment and storage medium
CN115409419A (en) Value evaluation method and device of business data, electronic equipment and storage medium
CN115563310A (en) Method, device, equipment and medium for determining key service node
CN115408546A (en) Time sequence data management method, device, equipment and storage medium
CN113052325A (en) Method, device, equipment, storage medium and program product for optimizing online model
CN114328047A (en) System test method, device, electronic equipment and storage medium
CN113961797A (en) Resource recommendation method and device, electronic equipment and readable storage medium
CN114742153A (en) Power utilization behavior analysis method based on one graph of power distribution network
CN115392733A (en) Distribution network planning project engineering quantity investment estimation method, device, equipment and storage medium
CN114065074A (en) Audience group acquisition method, and training method and device of user object matching model
CN115017145A (en) Data expansion method, device and storage medium
CN116204441A (en) Performance test method, device, equipment and storage medium of index data structure
CN117493690A (en) Data pushing method and device, electronic equipment and storage medium
CN115455019A (en) Search intention identification method, device and equipment based on user behavior analysis
CN115576830A (en) Method and device for determining quality of use case, electronic equipment and storage medium
CN115580010A (en) Topology identification method, device, equipment and storage medium for low-voltage distribution station area
CN117194498A (en) Data aggregation method and device, electronic equipment and storage medium
CN115964081A (en) Code scale determination method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination