Modeling method, device, electronic device and storage medium
By classifying business scenarios and building JavaScript object representation model for distribution network databases, the problems of excessive memory usage and low computing efficiency caused by the huge scale of distribution networks are solved, and memory savings and computing efficiency are achieved.
Patent Information
- Application Number
- CN202210589365.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2042-05-26
AI Technical Summary
The large scale of the distribution network has caused difficulties in various analysis and calculations of the distribution network, such as excessive memory usage and slow computing process efficiency.
By classifying multiple grid entities in the distribution network database based on business scenarios, obtaining information records of necessary grid entities, and using JavaScript object representation to build a model of dynamically modeled grid objects, obtaining the memory residency dynamic model corresponding to the business scenario.
This method can save memory, improve the processing efficiency of computing programs, and is suitable for dynamic modeling requirements of distribution networks.
Smart Images

Figure CN114996930B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to a modeling method, apparatus, electronic device, and storage medium. Background Art
[0002] In recent years, with the rapid improvement of China's national economy, the distribution network has developed rapidly in response to electricity demand, and its scale and power supply quality requirements are also getting higher and higher. Under such conditions, various analysis and calculations are required for the distribution network to complete daily operations such as maintenance and power supply adjustment of the distribution network without affecting power supply. However, due to the large scale of the distribution network, it is difficult to perform various analysis and calculations on the distribution network. For example, on the one hand, the modeling of the distribution network needs to meet various calculations, and detailed modeling causes excessive memory occupation. On the other hand, due to the large scale and scattered data, the processing efficiency of the calculation program is slow. Summary of the Invention
[0003] This application provides a modeling method, apparatus, electronic device, and storage medium, which can save memory and improve the processing efficiency of the calculation program.
[0004] In a first aspect, this application provides a modeling method, which includes:
[0005] Classify multiple grid entities in the distribution network database based on the business scenario to obtain a data set corresponding to the business scenario, where the data set includes at least one necessary grid entity corresponding to the business scenario;
[0006] Obtain the information records of the necessary grid entities from the distribution network database;
[0007] Determine the grid objects that can be dynamically modeled from the data set corresponding to the business scenario based on the information records;
[0008] Build a model for the grid objects that can be dynamically modeled using the JavaScript object notation to obtain a memory-resident dynamic model corresponding to the business scenario.
[0009] In a second aspect, this application provides a modeling apparatus, which includes:
[0010] A data set determination module, configured to classify multiple grid entities in the distribution network database based on the business scenario to obtain a data set corresponding to the business scenario, where the data set includes at least one necessary grid entity corresponding to the business scenario;
[0011] An information acquisition module, configured to obtain the information records of the necessary grid entities from the distribution network database;
[0012] An object determination module, configured to determine power grid objects that can be dynamically modeled from the dataset corresponding to the service scenario based on the information record;
[0013] A model construction module, configured to construct a model for the power grid objects that can be dynamically modeled by using the JavaScript Object Notation to obtain the in-memory resident dynamic model corresponding to the service scenario.
[0014] In a third aspect, the present application provides an electronic device, which includes:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the modeling method according to any embodiment of the present application.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer instructions for causing a processor to implement the modeling method according to any embodiment of the present application when executed.
[0019] The embodiments of the present application provide a modeling method, apparatus, electronic device, and storage medium. The method includes: classifying a plurality of power grid entities in a distribution network database based on a service scenario to obtain a dataset corresponding to the service scenario, where the dataset includes at least one necessary power grid entity corresponding to the service scenario; obtaining an information record of the necessary power grid entity from the distribution network database; determining power grid objects that can be dynamically modeled from the dataset corresponding to the service scenario based on the information record; and constructing a model for the power grid objects that can be dynamically modeled by using the JavaScript Object Notation to obtain the in-memory resident dynamic model corresponding to the service scenario. The present application classifies and organizes the distribution network database based on the service scenario to obtain the necessary power grid entities and necessary fields corresponding to the service scenario, and further obtains a tree-shaped data structure dataset corresponding to the service scenario; then, by setting dynamic modeling conditions, power grid entities with excessive memory occupancy, power grid entities or fields with low usage frequency, or power grid entities or fields with high repetition degree are selected from the dataset as power grid objects that can be dynamically modeled, and finally, a model is constructed for the power grid objects that can be dynamically modeled by using the JavaScript Object Notation. The present application performs dynamic modeling on the power grid objects that can be dynamically modeled, which can save memory and improve the processing efficiency of the calculation program.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become readily understood through the following description. Description of the Drawings
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0022] Figure 1 The first flowchart of a modeling method provided by an embodiment of the present application;
[0023] Figure 2 The schematic diagram of the data set corresponding to the business scenario provided by an embodiment of the present application;
[0024] Figure 3 The second flowchart of a modeling method provided by an embodiment of the present application;
[0025] Figure 4 The structural schematic diagram of a modeling device provided by an embodiment of the present application;
[0026] Figure 5 The block diagram of an electronic device for implementing a modeling method according to an embodiment of the present application. Detailed Embodiments
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", "target", "original", etc. in the description, claims and the above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising", "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] Figure 1 FIG. 1 is a first flowchart of a modeling method provided by an embodiment of the present application. This embodiment is applicable to the situation of dynamically modeling distribution network data. The modeling method provided by this embodiment can be executed by a modeling device provided by the embodiment of the present application. The device can be implemented in software and / or hardware and integrated in an electronic device that executes this method.
[0030] See Figure 1 , the method of this embodiment includes but is not limited to the following steps:
[0031] S110. Classify multiple power grid entities in the distribution network database based on the business scenario to obtain a data set corresponding to the business scenario. The data set includes at least one necessary power grid entity corresponding to the business scenario.
[0032] Among them, the business scenario refers to a specific application scenario in the operation of the distribution network. For example, the business scenario can be a distribution network maintenance scenario, a power consumption collection scenario, etc. The power grid entity refers to a set of certain types of data in the distribution network database. The power grid entity includes abstract entities such as conductive devices, specific entities such as feeders, switches, and transformers, topological entities such as endpoints and connection nodes, secondary equipment entities such as acquisition devices and control terminals, and also includes marketing entities such as users and power metering. The necessary power grid entity refers to an important power grid entity that is essential for a certain business scenario.
[0033] Optionally, the distribution network database can be a large-scale 10kV distribution network database, and the information management of the power grid entities in the distribution network database can comply with the IEC61970 and IEC61968 standards.
[0034] In an embodiment of the present application, an electronic device may annotate a service scenario to obtain a corresponding scenario tag. Taking the scenario tag as the root node, the power grid entities in the distribution network database are classified according to different scenario tags, and a data set of a tree data structure corresponding to different scenario tags is determined. Optionally, in addition to the tree data structure, the structure type of the data set may also be other data structures, which are not limited herein. The data set includes at least one necessary power grid entity corresponding to the service scenario. The necessary power grid entity is used as a child node of the scenario tag. That is, the necessary power grid entity is a child node under the root node (i.e., the scenario tag).
[0035] Optionally, the necessary power grid entity includes at least one necessary field. The necessary field is used as a leaf node of the necessary power grid entity. That is, the necessary field is a leaf node under the child node (i.e., the necessary power grid entity). The necessary field refers to an important field that is essential for a certain power grid entity.
[0036] Furthermore, classifying multiple power grid entities in the distribution network database based on the service scenario to obtain a data set corresponding to the service scenario includes: from the perspective of the requirements of the service scenario for power grid entities, determining at least one necessary power grid entity corresponding to the service scenario from multiple power grid entities based on the service scenario according to the first necessary principle; then analyzing the use of the fields of the power grid entities, evaluating the requirements of each field in the necessary power grid entity according to the second necessary principle, and selecting at least one necessary field corresponding to the necessary power grid entity; obtaining a data set corresponding to the service scenario based on at least one necessary power grid entity and at least one necessary field. The first necessary principle refers to the set of entities with the least quantity necessary to complete the service corresponding to the service scenario. The second necessary principle refers to the set of fields with the least quantity necessary to complete the service corresponding to the service scenario.
[0037] In an embodiment of the present application, a root node of a tree data structure of a scenario tag is established based on the service scenario. Traverse multiple power grid entities in the distribution network database, and evaluate whether the power grid entity is necessary for the scenario according to the service scenario. If it is necessary, add a child node to the root node of the scenario tag. Traverse the specific fields in the necessary power grid entity, and evaluate whether the field is necessary for the scenario according to the service scenario. If it is necessary, add a leaf node to the child node of the model. In particular, the identified information (such as record ID, record name, etc.) must be included in the necessary fields.
[0038] Such as Figure 2It is a schematic diagram of the dataset corresponding to the business scenario. The dataset corresponding to the business scenario includes scenario tags (i.e., root nodes), at least one necessary power grid entity (i.e., child nodes), and at least one necessary field (i.e., leaf nodes). The purpose of such a setting is to appropriately trim the IEC61970 and IEC61968 standards in the distribution network database to generate a dataset corresponding to the business scenario (such as a tree data structure), which is convenient for managing the distribution network database.
[0039] Optionally, the datasets under different business scenarios can be expressed by E case The necessary power grid entities under all business scenarios can be represented by the following formula (1):
[0040]
[0041] In the formula, E is the necessary power grid entity under all business scenarios, n is the index number of the business scenario, Ecase,n is the necessary power grid entity under the nth business scenario, and U is the union.
[0042] S120. Obtain the information record of the necessary power grid entity from the distribution network database.
[0043] In the embodiment of the present application, the information record of a certain power grid entity can be any information related to the power grid entity, such as historical information, website information, etc. The electronic device sends a request for obtaining the information of the necessary power grid entity to the server, and the server receives and parses the information acquisition request, and sends the information record of the necessary power grid entity to the electronic device.
[0044] S130. Determine the power grid objects that can be dynamically modeled from the dataset corresponding to the business scenario based on the information record.
[0045] Among them, the power grid object can be a power grid entity or a field. The power grid object that can be dynamically modeled can be a power grid entity with excessive memory occupation, a power grid entity or field with low usage frequency, or a power grid entity or field with a high degree of repetition. For example, the power grid object that can be dynamically modeled can be all fields of a certain power grid entity (i.e., the entire power grid entity), or part of the fields of a certain power grid entity (i.e., the aforementioned fields).
[0046] In the embodiment of the present application, after obtaining the information record from the distribution network database in the above S120 step, all the contents in the information record are traversed to determine whether dynamic modeling processing is to be performed, so as to obtain a power grid object that can be dynamically modeled. Specifically, the memory occupied by the power grid entity can be determined according to the number of information records, and whether the power grid entity is to be dynamically modeled is judged according to the size of the occupied memory. For example, if a certain power grid entity occupies too much memory, dynamic modeling processing is performed on it; it is also possible to statistically analyze the degree of repetition of the field values according to the field content of the information record to judge whether the field is to be dynamically modeled. For example, if the usage frequency of a certain field is low or the degree of repetition is high, dynamic modeling processing is performed on it.
[0047] Optionally, the power grid objects that can be dynamically modeled under different business scenarios can be represented by D case and all the power grid objects that can be dynamically modeled under all business scenarios can be represented by the following formula (2):
[0048]
[0049] In the formula, D is the power grid object that can be dynamically modeled under all business scenarios, n is the index number of the business scenario, D case,n is the power grid object that can be dynamically modeled under the nth business scenario, and U is to take the union.
[0050] Further, after determining the power grid object that can be dynamically modeled from the dataset corresponding to the business scenario based on the information record, it further includes: taking the dataset corresponding to the business scenario as the universal set; taking the power grid object that can be dynamically modeled corresponding to the business scenario as the subset; finding the complement of the subset based on the universal set and taking the complement as the power grid object that can be statically modeled corresponding to the business scenario; constructing a model for the power grid object that can be statically modeled using a preset programming language to obtain the in-memory resident native model corresponding to the business scenario. The power grid object that can be statically modeled refers to a power grid entity or field with a high usage frequency and a low degree of repetition. The power grid object that can be statically modeled needs to satisfy the following formula (3):
[0051]
[0052] In the formula, is the power grid object that can be statically modeled under all business scenarios, E is the necessary power grid entity under all business scenarios, D is the power grid object that can be dynamically modeled under all business scenarios, represents the empty set.
[0053] S140. Use the JavaScript object notation to construct a model for the power grid object that can be dynamically modeled to obtain the in-memory resident dynamic model corresponding to the business scenario.
[0054] Among them, JavaScript Object Notation (Json) is a lightweight data interchange format widely used in asynchronous communication of applications, such as in the communication between Web clients and servers. The data structure of the in-memory resident dynamic model is expressed in Json data format and is independent of programming languages.
[0055] Furthermore, the JavaScript Object Notation is used to build a model for the dynamically modelable object to obtain the in-memory resident dynamic model corresponding to the business scenario, including: determining the data characteristics of the dynamically modelable object; if a preset number of power grid objects among the dynamically modelable power grid objects have the same data characteristic, building a model for the preset number of power grid objects according to the first modeling method; building a model for other power grid objects among the dynamically modelable power grid objects according to the second modeling method, so as to obtain the in-memory resident dynamic model corresponding to the business scenario, where other power grid objects are power grid objects other than the preset number of power grid objects among the dynamically modelable power grid objects. That is, according to the different data characteristics of the dynamically modelable object, the data structure of the constructed in-memory resident dynamic model is also different.
[0056] In the embodiment of the present application, the first modeling method is a modeling method for power grid objects with a large amount of repeated data, and the model building method can be using the data characteristic as the field and the power grid object with the data characteristic as the field value. The second modeling method is a modeling method for power grid objects without a large amount of repeated data, and the model building method can be using the power grid object as the field and the data characteristic of the power grid object as the field value. Optionally, an empty in-memory resident dynamic model can be built as a reservation for subsequent dynamic management during operation.
[0057] Furthermore, after obtaining the in-memory resident dynamic model corresponding to the business scenario, it further includes: extracting the common key fields (such as keyField) in the in-memory resident inherent model and the in-memory resident dynamic model; establishing a mapping relationship between the in-memory resident inherent model and the in-memory resident dynamic model based on the key fields; splicing the in-memory resident inherent model and the in-memory resident dynamic model based on the mapping relationship to obtain the complete model corresponding to the business scenario.
[0058] The technical solution provided in this embodiment classifies multiple power grid entities in the distribution network database based on the service scenario, obtains the data set corresponding to the service scenario, and the data set includes at least one necessary power grid entity corresponding to the service scenario; obtains the information records of the necessary power grid entities from the distribution network database; determines the power grid objects that can be dynamically modeled from the data set corresponding to the service scenario based on the information records; constructs a model for the power grid objects that can be dynamically modeled using the JavaScript Object Notation to obtain the in-memory resident dynamic model corresponding to the service scenario. This application classifies and organizes the distribution network database based on the service scenario, obtains the necessary power grid entities and necessary fields corresponding to the service scenario, and further obtains the tree-shaped data structure data set corresponding to the service scenario; then, by setting the dynamic modeling conditions, selects the power grid entities with excessive memory occupation, the power grid entities or fields with low usage frequency, or the power grid entities or fields with high repetition degree from the data set as the power grid objects that can be dynamically modeled, and finally constructs a model for the power grid objects that can be dynamically modeled using the JavaScript Object Notation. Dynamically modeling the power grid objects that can be dynamically modeled in this application can save memory and improve the processing efficiency of the calculation program.
[0059] The modeling method provided in the embodiments of the present invention will be further described below. Figure 3 This is the second process schematic diagram of a modeling method provided in an embodiment of this application. The embodiment of this application is optimized based on the above embodiment, specifically optimized as: this embodiment explains in detail the determination process of the power grid objects that can be dynamically modeled and the adjustment process of the in-memory resident dynamic model.
[0060] See Figure 3 , the method of this embodiment includes but is not limited to the following steps:
[0061] S210. Classify multiple power grid entities in the distribution network database based on the service scenario to obtain the data set corresponding to the service scenario.
[0062] For the relevant content of this step, see Figure 1 Step S110 of the embodiment, which will not be elaborated here.
[0063] S220. Obtain the information records of the necessary power grid entities from the distribution network database.
[0064] For the relevant content of this step, see Figure 1 Step S120 of the embodiment, which will not be elaborated here.
[0065] S230. Judge whether the necessary power grid entities meet the first condition for dynamic modeling based on the number of information records; if so, obtain the mapping table of at least one necessary field in the necessary power grid entities.
[0066] Among them, the first condition for dynamic modeling is that the memory occupancy of the power grid entity is within the preset standard.
[0067] In the embodiment of the present application, after obtaining the information record from the distribution network database, the number of information records is counted. If the number of information records is less than the preset value (such as 100), it is considered that the necessary power grid entity will not cause excessive memory occupancy, does not meet the first condition for dynamic modeling, and there is no need to perform dynamic modeling processing, and then the next necessary power grid entity is judged. If the number of information records is greater than or equal to the preset value (such as 100), it is considered that the necessary power grid entity will cause excessive memory occupancy, meets the first condition for dynamic modeling, and dynamic modeling processing is required. At this time, it is also necessary to judge which fields in the necessary power grid entity need dynamic modeling processing, so it is necessary to obtain the mapping table of at least one necessary field in the necessary power grid entity. Among them, the mapping table is used to record the field value of the necessary field, the key value quantity of the field value, and the repetition times of the field value.
[0068] The establishment process of the mapping table can be: traverse the fields of the power grid entity, establish a mapping table of field value - repetition times. When a new field value appears, the repetition times of this value in the mapping table is incremented by 1; when the field value already exists in the mapping table, each time it appears, the repetition times in the mapping table is incremented by 1.
[0069] S240. Judge whether the key value quantity exceeds the first preset percentage of the number of information records. If not, select the maximum repetition times in the mapping table.
[0070] Among them, the second condition for dynamic modeling is that the key value quantity and the repetition times of the fields in the power grid entity are within the preset standard. The key value quantity is the number of types of values taken by the field value.
[0071] In the embodiment of the present application, after obtaining the mapping table of at least one necessary field in the necessary power grid entity, the key value quantity in the mapping table is counted. If the key value quantity is greater than the first preset percentage (such as 33%) of the number of records, it is considered that the field does not meet the second condition for dynamic modeling, and then the next necessary field is judged. If the key value quantity is less than or equal to the first preset percentage (such as 33%) of the number of records, the repetition times of the field value in the mapping table is selected to determine the maximum value of the repetition times.
[0072] S250. Judge whether the maximum repetition times exceeds the second preset percentage of the information records. If it exceeds, the necessary field corresponding to the maximum repetition times is used as the power grid object that can be dynamically modeled.
[0073] In an embodiment of the present application, after determining the maximum number of repetitions, it is determined whether the maximum number of repetitions exceeds a second preset percentage (such as 60%) of the information record. If it does not exceed, it is considered that the field does not meet the second condition for dynamic modeling, and then the next necessary field is determined. If it exceeds, it is considered that the field meets the second condition for dynamic modeling, and the power grid entity and the field are included in the list of entities that can be dynamically modeled.
[0074] S260. Use the JavaScript Object Notation to build a model for the power grid object that can be dynamically modeled, and obtain the in-memory resident dynamic model corresponding to the business scenario.
[0075] For the relevant content of this step, see Figure 1 Step S140 of the embodiment, which will not be elaborated here.
[0076] S270. When running the in-memory resident dynamic model, re-obtain the new information record of the necessary power grid entity from the distribution network database; evaluate the memory occupancy of the in-memory resident dynamic model based on the new information record to obtain an evaluation result, and adjust the in-memory resident dynamic model based on the evaluation result.
[0077] In an embodiment of the present application, after obtaining the in-memory resident dynamic model through the above steps, the in-memory resident dynamic model needs to be adjusted. Specifically, when running the in-memory resident dynamic model, since the information record of the power grid entity may be updated, it is necessary to re-obtain the new information record of the necessary power grid entity from the distribution network database, and evaluate the memory occupancy of the in-memory resident dynamic model according to the rules in steps S230 - S250 to obtain an evaluation result. The evaluation result records the power grid entities or fields that no longer meet the dynamic modeling conditions. If the memory saving effect of the dynamic model is not obvious, then according to the evaluation result, when initializing the work next time, build an in-memory resident inherent model for the power grid entities or fields that no longer meet the dynamic modeling conditions, so as to adjust the in-memory resident dynamic model.
[0078] The technical solution provided in this embodiment classifies multiple power grid entities in the distribution network database based on the service scenario to obtain a data set corresponding to the service scenario; obtains the information records of the necessary power grid entities from the distribution network database; determines whether the necessary power grid entities meet the first condition for dynamic modeling based on the number of information records; if so, obtains the mapping table of at least one necessary field in the necessary power grid entities; determines whether the number of key values exceeds the first preset percentage of the number of information records, and if not, selects the maximum number of repetitions in the mapping table; determines whether the maximum number of repetitions exceeds the second preset percentage of the number of information records, and if so, uses the necessary field corresponding to the maximum number of repetitions as the power grid object that can be dynamically modeled; constructs a model for the power grid object that can be dynamically modeled using the JavaScript object notation to obtain a memory-resident dynamic model corresponding to the service scenario; when running the memory-resident dynamic model, re-obtains the new information records of the necessary power grid entities from the distribution network database; evaluates the memory occupancy of the memory-resident dynamic model based on the new information records to obtain an evaluation result, and adjusts the memory-resident dynamic model based on the evaluation result. This application classifies and organizes the distribution network database based on the service scenario to obtain the necessary power grid entities and necessary fields corresponding to the service scenario, and then obtains a tree-shaped data structure data set corresponding to the service scenario; then, by setting the dynamic modeling conditions, selects the power grid entities with excessive memory occupancy, low usage frequency, or fields or power grid entities or fields with high repetition degree from the data set as the power grid objects that can be dynamically modeled, and finally constructs a model using the JavaScript object notation to obtain a memory-resident dynamic model, and can also adjust the memory-resident dynamic model. This application can save memory by dynamically modeling the power grid objects that can be dynamically modeled, and can also improve the processing efficiency of the calculation program.
[0079] Figure 4 FIG. is a schematic structural diagram of a modeling device provided in an embodiment of the present application, as Figure 4 shown. The device 400 may include:
[0080] A data set determination module 410, configured to classify multiple power grid entities in the distribution network database based on the service scenario to obtain the data set corresponding to the service scenario, where the data set includes at least one necessary power grid entity corresponding to the service scenario;
[0081] An information acquisition module 420, configured to acquire the information records of the necessary power grid entities from the distribution network database;
[0082] An object determination module 430, configured to determine the power grid object that can be dynamically modeled from the data set corresponding to the service scenario based on the information records;
[0083] A model construction module 440, which is used to construct a model for the dynamically modelable power grid object by using the JavaScript Object Notation to obtain the in-memory resident dynamic model corresponding to the service scenario.
[0084] Optionally, the necessary power grid entities include at least one necessary field.
[0085] Furthermore, the above-mentioned dataset determination module 410 may specifically be used to: determine at least one necessary power grid entity corresponding to the service scenario from the multiple power grid entities according to the first necessary principle based on the service scenario; perform a requirement assessment on each field in the necessary power grid entity according to the second necessary principle, and select at least one necessary field corresponding to the necessary power grid entity; obtain the dataset corresponding to the service scenario based on the at least one necessary power grid entity and the at least one necessary field.
[0086] Furthermore, the above-mentioned object determination module 430 may specifically be used to: determine whether the necessary power grid entity meets the first condition for dynamic modeling based on the number of information records; if it meets, obtain the mapping table of the at least one necessary field in the necessary power grid entity; determine the necessary field that meets the second condition for dynamic modeling from the at least one necessary field based on the mapping table of the at least one necessary field, and use the necessary field that meets the second condition for dynamic modeling as the dynamically modelable power grid object.
[0087] Optionally, the mapping table is used to record the field values of the necessary fields, the number of key values of the field values, and the number of repetitions of the field values.
[0088] Furthermore, the above-mentioned object determination module 430 may also specifically be used to: determine whether the number of key values exceeds the first preset percentage of the number of information records, and if not, select the largest number of repetitions in the mapping table; determine whether the largest number of repetitions exceeds the second preset percentage of the information records, and if it exceeds, use the necessary field corresponding to the largest number of repetitions as the dynamically modelable power grid object.
[0089] Furthermore, the above-mentioned model construction module 440 may specifically be used to: determine the data characteristics of the dynamically modelable object; if a preset number of power grid objects in the dynamically modelable power grid object have the same data characteristic, construct a model for the preset number of power grid objects according to the first modeling method; construct a model for other power grid objects in the dynamically modelable power grid object according to the second modeling method, so as to obtain the in-memory resident dynamic model corresponding to the service scenario, where the other power grid objects are the power grid objects in the dynamically modelable power grid object except the preset number of power grid objects.
[0090] Furthermore, the above-mentioned modeling device may also include: a model adjustment module;
[0091] The model adjustment module is used to reacquire new information records of the necessary power grid entities from the distribution network database when running the memory-resident dynamic model; evaluate the memory occupancy of the memory-resident dynamic model based on the new information records to obtain an evaluation result, and adjust the memory-resident dynamic model based on the evaluation result.
[0092] Furthermore, the object determination module 430 can also be specifically used to: after determining the dynamically modelable power grid object from the data set corresponding to the business scenario based on the information record, use the data set corresponding to the business scenario as the full set; use the dynamically modelable object corresponding to the business scenario as a subset; find the complement of the subset based on the full set, and use the complement as the statically modelable power grid object corresponding to the business scenario; use a preset programming language to construct a model for the statically modelable power grid object to obtain a memory-resident inherent model corresponding to the business scenario.
[0093] Furthermore, the above-mentioned model building module 440 can also be specifically used to: after obtaining the memory-resident dynamic model corresponding to the business scenario, extract the key fields common to the memory-resident intrinsic model and the memory-resident dynamic model; establish a mapping relationship between the memory-resident intrinsic model and the memory-resident dynamic model based on the key fields; splice the memory-resident intrinsic model and the memory-resident dynamic model based on the mapping relationship to obtain a complete model corresponding to the business scenario.
[0094] The modeling device provided in this embodiment can be applied to the modeling method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0095] Figure 5 This is a block diagram of an electronic device for implementing a display method of an embodiment of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0096] If Figure 5 As shown, 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, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate 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 required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0097] Multiple 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, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0098] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the modeling method.
[0099] In some embodiments, the modeling method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can 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 the RAM 13 and executed by the processor 11, one or more steps of the modeling method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the modeling method in any other appropriate way (for example, by means of firmware).
[0100] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0101] The computer programs for implementing the methods of this application can be written in any combination of one or more programming languages. These computer programs can 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 / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0102] In the context of this application, a computer-readable storage medium can 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. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can 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.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the 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 input, voice input, or tactile input).
[0104] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0105] A computing system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0106] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved, and no limitation is made herein.
[0107] The above specific implementation manners do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of this application shall be included within the protection scope of this application.
Claims
1. A modeling method, characterized in that: The method comprises: Classifying multiple power grid entities in the distribution network database based on business scenarios to obtain a data set corresponding to the business scenarios, wherein the data set includes at least one necessary power grid entity corresponding to the business scenario; Acquire information records of the necessary power grid entities from the power distribution network database; Determine whether the necessary power grid entity meets the first condition for dynamic modeling based on the number of the information records; if so, obtain a mapping table of at least one necessary field in the necessary power grid entity; Based on the mapping table, a field value of the necessary field, a number of key values of the field value, and a number of repetitions of the field value are recorded; Determine whether the number of key values exceeds a first preset percentage of the number of information records, and if not, select the maximum number of repetitions in the mapping table; Determine whether the maximum number of repetitions exceeds a second preset percentage of the information record; if so, use the necessary fields corresponding to the maximum number of repetitions as a dynamically modeled power grid object; use JavaScript object representation to build a model for the dynamically modeled power grid object to obtain a memory-resident dynamic model corresponding to the business scenario.
2. The modeling method according to claim 1, characterized in that: The necessary power grid entity includes at least one necessary field, and the classification of multiple power grid entities in the distribution network database based on the business scenario to obtain a data set corresponding to the business scenario includes: Determine at least one necessary power grid entity corresponding to the business scenario from the multiple power grid entities according to a first necessary principle based on the business scenario; Performing a demand assessment on each field in the necessary grid entity according to the second necessary principle, and selecting at least one necessary field corresponding to the necessary grid entity; A data set corresponding to the business scenario is obtained based on the at least one necessary power grid entity and the at least one necessary field.
3. The modeling method according to claim 1, characterized in that: The method of constructing a model of the dynamically modelable power grid object using JavaScript object notation to obtain a memory-resident dynamic model corresponding to the business scenario includes: Determining data characteristics of the dynamically modelable object; If a preset number of power grid objects in the dynamically modelable power grid objects have the same data feature, constructing models for the preset number of power grid objects according to a first modeling method; Models of other power grid objects in the power grid objects that can be dynamically modeled are constructed according to the second modeling method to obtain a memory-resident dynamic model corresponding to the business scenario. The other power grid objects are power grid objects in the power grid objects that can be dynamically modeled except for the preset number of power grid objects.
4. The modeling method according to claim 1, characterized in that: The method further comprises: When running the memory-resident dynamic model, reacquiring new information records of the necessary power grid entities from the power distribution network database; The memory occupancy of the memory-resident dynamic model is evaluated based on the new information record to obtain an evaluation result, and the memory-resident dynamic model is adjusted based on the evaluation result.
5. The modeling method according to claim 1, characterized in that: After determining the dynamically modelable power grid object from the data set corresponding to the business scenario based on the information record, the method further includes: Taking the data set corresponding to the business scenario as the full set; Taking the dynamically modelable objects corresponding to the business scenario as a subset; Finding the complement of the subset based on the full set, and using the complement as a statically modelable power grid object corresponding to the business scenario; A preset programming language is used to construct a model for the statically modelable power grid object to obtain a memory-resident inherent model corresponding to the business scenario.
6. The modeling method according to claim 5, characterized in that: After obtaining the memory-resident dynamic model corresponding to the business scenario, the method further includes: Extracting key fields common to the memory-resident intrinsic model and the memory-resident dynamic model; Establishing a mapping relationship between the memory-resident intrinsic model and the memory-resident dynamic model based on the key field; Based on the mapping relationship, the memory-resident inherent model and the memory-resident dynamic model are spliced to obtain a complete model corresponding to the business scenario.
7. A modeling device, characterized in that: The device comprises: A data set determination module, configured to classify a plurality of power grid entities in a distribution network database based on a business scenario, and obtain a data set corresponding to the business scenario, wherein the data set includes at least one necessary power grid entity corresponding to the business scenario; An information acquisition module, used for acquiring information records of the necessary power grid entities from the distribution network database; An object determination module, configured to determine a power grid object that can be dynamically modeled from a data set corresponding to the business scenario based on the information record; A model building module, used to build a model for the dynamically modelable power grid object using JavaScript object notation to obtain a memory-resident dynamic model corresponding to the business scenario; Wherein, the object determination module is specifically used for: Determine whether the necessary power grid entity meets the first condition for dynamic modeling based on the number of the information records; if so, obtain a mapping table of at least one necessary field in the necessary power grid entity; Determine, based on the mapping table of the at least one necessary field, a necessary field that meets the second condition for dynamic modeling from the at least one necessary field, and use the necessary field that meets the second condition for dynamic modeling as a power grid object that can be dynamically modeled; The mapping table is used to record the field value of the necessary field, the number of key values of the field value, and the number of repetitions of the field value. The object determination module is also used to: Determine whether the number of key values exceeds a first preset percentage of the number of information records, and if not, select the maximum number of repetitions in the mapping table; It is determined whether the maximum number of repetitions exceeds a second preset percentage of the information record; if so, the necessary fields corresponding to the maximum number of repetitions are used as power grid objects that can be dynamically modeled.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the modeling method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the modeling method described in any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Power secondary system modeling method and system
CN103825755A
Electrical power grid modeling
US20210406537A1