Disclosure of Invention
The embodiment of the application provides a database synchronization method, equipment and medium based on power data, aiming at improving the communication effect between the internal network and the external network of a power plant.
In one aspect, the present application provides a database synchronization method based on electric power data, where the database synchronization method based on electric power data is applied to a network isolation device, and each power plant terminal in an external network synchronizes electric power data to a power plant production control area in an internal network through the network isolation device, and the database synchronization method based on electric power data includes:
When receiving database synchronization instructions for a plurality of power plant terminals, acquiring the communication load capacity of the network isolation device;
when the communication load capacity is larger than the preset load capacity, acquiring the electric power data quantity to be synchronized in each power plant terminal and the power plant grade of the power plant where each power plant terminal is located;
determining a synchronization priority of each power plant terminal based on the power data amount and the power plant level;
and controlling the network isolation device, and sequentially synchronizing the power data to be synchronized in each power plant terminal to a power database in the power plant production control area according to the synchronization priority.
In some embodiments, the determining a synchronization priority for each power plant terminal based on the power data amount and the power plant class includes:
determining a first score corresponding to the amount of power data;
determining a second score corresponding to the power plant level;
taking the sum of the first score and the second score as a comprehensive score of the power plant terminal;
sequencing the plurality of power plant terminals according to the comprehensive scores to obtain the ranks of the plurality of power plant terminals;
based on the ranking of the plurality of power plant endpoints, a synchronization priority for each power plant endpoint is determined.
In some embodiments, the determining a first score corresponding to the amount of power data comprises:
acquiring a plurality of historical power data volumes of the network isolation device in historical synchronization and the historical synchronization time consumption corresponding to each historical power data volume;
determining a change relation between the data amount and the synchronization time based on the plurality of historical power data amounts and the historical synchronization time corresponding to each historical power data amount;
determining an expected synchronization time for the amount of power data based on a changing relationship between the amount of data and synchronization time;
and taking the expected synchronization time as a first score corresponding to the electric power data quantity.
In some embodiments, the synchronizing the power data to be synchronized in the plurality of power plant terminals with the same synchronizing priority is performed simultaneously, and the determining the synchronizing priority of each power plant terminal based on the ranks of the plurality of power plant terminals includes:
determining the residual communication load of the network isolation device based on the communication load of the network isolation device;
determining a target number of power plant terminals that can be synchronized simultaneously based on the remaining communication load;
and determining the synchronization priority of each power plant terminal in the ranking of the plurality of power plant terminals based on the target number, wherein the total number of the plurality of power plant terminals with the same synchronization priority is the target number.
In some embodiments, the electric power data to be synchronized includes a plurality of electric power data tables, and the obtaining the electric power data amount to be synchronized in each power plant terminal includes:
acquiring the occupied storage capacity of the power data to be synchronized in each power plant terminal, and acquiring the number of power data tables included in the power data to be synchronized in each power plant terminal;
determining a first score corresponding to the occupied storage capacity;
determining a second score corresponding to the number of the power data tables;
and determining the electric power data quantity to be synchronized in the power plant terminal based on the first score and the second score.
In some embodiments, the determining the amount of power data to be synchronized in the power plant terminal based on the first score and the second score comprises:
acquiring the table types of all power data tables in the power data to be synchronized in the power plant terminal, and acquiring the number of the table types contained in the power data to be synchronized in the power plant terminal;
correcting the second score based on the table type number to obtain a third score, wherein the third score is inversely related to the table type number;
and taking the sum of the first score and the third score as the electric power data quantity to be synchronized in the power plant terminal.
In some embodiments, the obtaining the power plant level of the power plant where each power plant terminal is located includes:
acquiring a plurality of historical power generation amounts of a power plant where each power plant terminal is located;
determining a power generation capacity value of a power plant where a power plant terminal is located based on the plurality of historical power generation amounts;
and determining the power plant grade of the power plant where the power plant terminal is located based on the power generation capacity value.
In some embodiments, the determining a power plant level of a power plant in which the power plant terminal is located based on the power generation capability value includes;
acquiring a power generation type of a power plant where a power plant terminal is located, wherein the power generation type comprises at least one of hydroelectric power generation, thermal power generation, wind power generation and photovoltaic power generation;
determining a weighting value corresponding to the power generation type;
weighting the power generation capacity value by adopting the weighting value to obtain a weighted power generation capacity value;
and determining the power plant grade of the power plant where the power plant terminal is located based on the weighted power generation capacity value.
On the other hand, the embodiment of the application provides a database synchronizer based on electric power data, and the database synchronizer based on electric power data is applied to network isolation device, and each power plant terminal in the outer net is through network isolation device, and synchronous electric power data to the power plant production control district in the intranet, and the database synchronizer based on electric power data includes:
The first acquisition module is used for acquiring the communication load capacity of the network isolation device when receiving database synchronization instructions for a plurality of power plant terminals;
the second acquisition module is used for acquiring the electric power data quantity to be synchronized in each power plant terminal and the power plant grade of the power plant where each power plant terminal is located when the communication load capacity is larger than the preset load capacity;
the determining module is used for determining the synchronous priority of each power plant terminal based on the power data amount and the power plant grade;
and the synchronization module is used for controlling the network isolation device and sequentially synchronizing the power data to be synchronized in each power plant terminal to the power database in the power plant production control area according to the synchronization priority.
In another aspect, the present application also provides a computer device, including:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in any of the power data based database synchronization methods.
In another aspect, the present application also provides a computer readable storage medium having stored thereon a computer program to be loaded by a processor to perform the steps in any of the power data based database synchronization methods.
The embodiment of the application provides a database synchronization method, equipment and medium based on power data, wherein the method comprises the following steps: when receiving database synchronization instructions for a plurality of power plant terminals, acquiring communication load capacity of a network isolation device; when the communication load capacity is larger than the preset load capacity, acquiring the electric power data quantity to be synchronized in each power plant terminal and the power plant grade of the power plant where each power plant terminal is located; determining a synchronization priority of each power plant terminal based on the power data amount and the power plant level; and the control network isolation device sequentially synchronizes the electric power data to be synchronized in each power plant terminal to an electric power database in a power plant production control large area according to the synchronization priority. According to the method and the device for synchronizing the power data, when the communication load capacity of the network isolation device is large, the synchronization priority of each power plant terminal is determined based on the power data quantity to be synchronized and the power plant grade, the power data to be synchronized in each power plant terminal are synchronized according to the synchronization priority, data blocking at the network isolation device is avoided, and the synchronization efficiency of the power data is improved.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In the description of the present application, it should be understood that the terms "center," "longitudinal," "transverse," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate an orientation or positional relationship based on that shown in the drawings, merely for convenience of description and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be configured and operated in a particular orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In this application, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been shown in detail to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
It should be noted that, since the method in the embodiment of the present application is executed in a computer device, the processing object of each computer device exists in the form of data or information, for example, time, which is essentially time information, it can be understood that in the subsequent embodiment, if the size, the number, the position, etc. are all corresponding data exist, so that the computer device can process the data, which is not described herein in detail.
The embodiment of the application provides a database synchronization method, equipment and medium based on power data, and the method, the equipment and the medium are respectively described in detail below.
Referring to fig. 1, in an embodiment, a database synchronization method based on power data is applied to a network isolation device, the method including:
101. when receiving database synchronization instructions for a plurality of power plant terminals, acquiring communication load capacity of a network isolation device;
in this embodiment, a plurality of power plants are provided in an external network (wide area network), each of which is provided with a corresponding power plant terminal, and the power plant may be at least one of a hydraulic power plant, a thermal power plant, a wind power plant, and a photovoltaic power plant. The intranet (local area network) is provided with a power plant production control large area, the production control large area refers to a safety area formed by a power monitoring system which has data acquisition and control functions and is longitudinally connected with a special network or a special channel, the power plant production control large area is provided with a power database, the power plant database is used for storing power data of each power plant, and the power data can comprise running state data, generating capacity data and the like of power equipment in each power plant. The network isolation device is a unidirectional isolation device, namely, each power plant terminal in the external network synchronizes power data to a power plant production control area in the internal network through the network isolation device so as to realize safe communication between the internal network and the external network.
In this embodiment, the database synchronization instruction for the plurality of power plant terminals may be actively initiated by a production control terminal in a power plant production control area in the intranet, or may be triggered at a fixed time, which is not limited herein.
In this embodiment, the communication load of the network isolation device refers to the communication data processing capability value that the network isolation device has used currently, and may also refer to the ratio of the communication data processing capability value that the network isolation device has used currently to the communication data processing maximum capability value of the network isolation device. For example, the communication load of the network isolation device may be at least one of a CPU occupancy rate, a memory occupancy rate, and a network bandwidth utilization rate of the network isolation device, and the communication load of the network isolation device may be further calculated from at least one of the CPU occupancy rate, the memory occupancy rate, and the network bandwidth utilization rate of the network isolation device, which is not limited herein.
102. When the communication load capacity is larger than the preset load capacity, acquiring the electric power data quantity to be synchronized in each power plant terminal and the power plant grade of the power plant where each power plant terminal is located;
in this embodiment, when the communication load capacity is greater than the preset load capacity, it is determined that the communication load of the network isolation device is greater, and data blocking may occur at the network isolation device, so that the electric power data amount to be synchronized in each power plant terminal and the power plant class of the power plant where each power plant terminal is located are obtained, so as to control the electric power data synchronization of the plurality of power plant terminals. And the power plant terminals are provided with corresponding electric power data to be synchronized. The refinement step of obtaining the amount of power data to be synchronized in the power plant terminal is detailed in the embodiment shown in fig. 3. The refinement step of obtaining the plant level of the plant where the plant terminal is located is detailed in the embodiment shown in fig. 4.
103. Determining a synchronization priority of each power plant terminal based on the power data amount and the power plant level;
in this embodiment, the synchronization priority of the power plant terminals, that is, the synchronization order of the power plant terminals, is positively correlated with the power data amount and the power plant level.
104. And the control network isolation device sequentially synchronizes the electric power data to be synchronized in each power plant terminal to an electric power database in a power plant production control large area according to the synchronization priority.
In this embodiment, the control network isolation device sequentially acquires power data to be synchronized from each power plant terminal according to the synchronization priority, and synchronizes to the power database in the power plant production control area, so as to avoid data blockage caused by simultaneous database synchronization of multiple power plants. The higher the synchronization priority is, the more the power plant terminals are synchronized with the power data.
In the technical scheme disclosed by the embodiment, when the communication load capacity of the network isolation device is large, the synchronization priority of each power plant terminal is determined based on the power data amount to be synchronized and the power plant grade, and the power data to be synchronized in each power plant terminal is synchronized according to the synchronization priority, so that the data blockage at the network isolation device is avoided, and the synchronization efficiency of the power data is improved.
In another embodiment, as shown in fig. 2, on the basis of the embodiment shown in fig. 1, 103 includes:
201. determining a first score corresponding to the amount of power data;
in some embodiments, determining a first score corresponding to the amount of power data may include: acquiring a plurality of historical power data volumes of the network isolation device in historical synchronization and the historical synchronization time consumption corresponding to each historical power data volume; determining a change relationship between the data amount and the synchronization time consumption based on the plurality of historical power data amounts and the historical synchronization time consumption corresponding to each historical power data amount; determining an expected synchronization time for the amount of power data based on a changing relationship between the amount of data and the synchronization time; the synchronization time consumption will be expected as the first score corresponding to the amount of power data. Wherein the first score is generally positively correlated with the amount of power data. The historical power data volume is the historical power data volume when the network isolation device synchronizes the power data of one power plant terminal in the historical period, and the historical power data volume when the power data of different power plant terminals in different historical periods are synchronized is recorded, so that the historical power data volumes can be obtained.
Because each power plant terminal in the external network and the power plant production control area in the internal network cannot be directly communicated, the network isolation device needs to adopt a freemaker technology, and the FTL template is utilized to generate corresponding data files for the power data to be synchronized, and then the data files are sent to the power plant production control area in the internal network, so that the synchronization of the power data is realized. The amount of the electric power data to be synchronized in the power plant terminal is generally large, the electric power data to be synchronized in the power plant terminal generally comprises a plurality of electric power data tables, and different electric power data tables have different table structures, main keys, table field attributes and other information, so that the time required for generating corresponding data files is different, namely the synchronization time consumption of different electric power data is also different, and therefore the expected synchronization time consumption of the electric power data amount can be predicted based on the change relation between the data amount and the synchronization time consumption. Wherein, freemaker is a template engine: i.e., a generic tool based on templates and data to be changed and used to generate output text (HTML web pages, email, configuration files, source code, etc.).
In some embodiments, determining a change relationship between the amount of data and the synchronization elapsed time based on the plurality of historical power data amounts and the historical synchronization elapsed time corresponding to each historical power data amount may include: taking each historical electric power data quantity as an abscissa, taking the historical synchronization time consumption corresponding to each historical electric power data quantity as an ordinate, and obtaining a plurality of coordinate points in a plane rectangular coordinate system; fitting a plurality of coordinate points in a plane rectangular coordinate system to obtain a change curve between the data volume and the synchronization time consumption, wherein the change curve records the change relation between the data volume and the synchronization time consumption. At present, a machine learning mode can also be adopted, taking a neural network model as an example, and a preset neural network model can be trained based on a plurality of historical electric power data amounts and historical synchronization time consumption corresponding to each historical electric power data amount as training samples, so that a model for predicting the synchronization time consumption is obtained, and the model for predicting the synchronization time consumption comprises a change relation between the data amount and the synchronization time consumption.
In some embodiments, determining an expected synchronization time for the amount of power data based on a changing relationship between the amount of data and the synchronization time may include: taking the electric power data quantity as an abscissa, and taking the numerical value of the electric power data quantity corresponding to the ordinate in the change curve as the expected synchronization time consumption of the electric power data quantity. Alternatively, determining the expected synchronization time for the amount of power data based on the changing relationship between the amount of data and the synchronization time may include: and inputting the electric power data quantity into the model for predicting the synchronization time consumption, and obtaining the expected synchronization time consumption output by the model for predicting the synchronization time consumption.
202. Determining a second score corresponding to the power plant level;
in this embodiment, the plant ranks may be generally categorized into primary, secondary, tertiary, etc., with different plant ranks corresponding to different second scores. In general, the second score is positively correlated to the plant class.
203. Taking the sum of the first score and the second score as the comprehensive score of the power plant terminal;
in this embodiment, each power plant terminal corresponds to a first score, a second score, and a composite score.
204. Sequencing the plurality of power plant terminals according to the comprehensive scores to obtain the ranks of the plurality of power plant terminals;
in this embodiment, among the ranks of the plurality of power plant endpoints, the higher the composite score, the higher the rank of the power plant endpoint.
205. Based on the ranking of the plurality of power plant endpoints, a synchronization priority for each power plant endpoint is determined.
In this embodiment, the higher the synchronization priority of the top ranked power plant terminals is, in general.
In some embodiments, at least two power plant terminals of the same synchronization priority may be present simultaneously among the plurality of power plant terminals. The control network isolation device sequentially synchronizes the power data to be synchronized in each power plant terminal to the power database in the power plant production control area according to the synchronization priority, and may include: and simultaneously synchronizing the power data to be synchronized of at least two power plant terminals with the same synchronization priority, so as to improve the synchronization efficiency of the power data to be synchronized in the plurality of power plant terminals. It can be understood that the synchronization of the power data may be limited not only by the data processing capability of the network isolation device, but also by the network bandwidth of each power plant terminal, so that the synchronization of the power data may be performed by at least two power plant terminals to be synchronized at the same time, so as to improve the synchronization efficiency of the power data, for example, when the network bandwidths of at least two power plant terminals with the same synchronization priority are smaller than the preset bandwidth, the synchronization of the power data to be synchronized by at least two power plant terminals with the same synchronization priority is performed at the same time.
In some embodiments, determining a synchronization priority for each power plant endpoint based on the ranks of the plurality of power plant endpoints may include: determining a remaining communication capacity of the network isolation device based on the communication capacity of the network isolation device; determining a target number of power plant terminals which can be synchronized simultaneously based on the remaining communication load, the target number being positively correlated with the remaining communication load; based on the target number, determining the synchronization priority of each power plant terminal in the ranking of the plurality of power plant terminals, wherein the total number of the plurality of power plant terminals with the same synchronization priority is the target number. Taking the target number as 2 as an example, determining the synchronization priority of each power plant terminal in the ranking of the plurality of power plant terminals based on the target number may include: the synchronization priority of both the first and second ranked power plant endpoints is set to the first level priority.
In the technical scheme disclosed by the embodiment, a first score corresponding to the electric power data amount is determined, a second score corresponding to the power plant grade is determined, the sum of the first score and the second score is used as the comprehensive score of the power plant terminals, and the plurality of power plant terminals are ranked according to the comprehensive score, so that more proper synchronous priorities of the plurality of power plant terminals are determined.
In yet another embodiment, as shown in fig. 3, based on the embodiment shown in any one of fig. 1 to 2, the obtaining, in step 102, the amount of power data to be synchronized in each power plant terminal includes:
301. acquiring the occupied storage capacity of the power data to be synchronized in each power plant terminal, and acquiring the number of power data tables included in the power data to be synchronized in each power plant terminal;
in this embodiment, by sending a query instruction of the power data to each power plant terminal, the occupied storage capacity of the power data to be synchronized and the number of the power data tables included in the power data to be synchronized, which are fed back by each power plant terminal, may be obtained. The power data to be synchronized is generally stored in a table form, that is, the power data to be synchronized includes a plurality of power data tables, and different power data tables may have different table structures, primary keys, table field attributes, and other information.
302. Determining a first score corresponding to the occupied storage capacity;
303. determining a second score corresponding to the number of the power data tables;
in this embodiment, the first score is inversely related to the occupied storage capacity and the second score is inversely related to the number of power data tables.
304. And determining the amount of power data to be synchronized in the power plant terminal based on the first score and the second score.
In some embodiments, the sum of the first score and the second score may be used as the amount of power data to be synchronized in the power plant terminal.
In some embodiments, determining the amount of power data to be synchronized in the power plant terminal based on the first score and the second score may include: acquiring the table types of all power data tables in the power data to be synchronized in the power plant terminal, and acquiring the number of the table types contained in the power data to be synchronized in the power plant terminal; correcting the second score based on the table type number to obtain a third score, wherein the third score is inversely related to the table type number; and taking the sum of the first score and the third score as the electric power data quantity to be synchronized in the power plant terminal. The table types of the power data table may include a current chronology, a history table, an entire table, a dictionary table, a metadata table, and the like of the power data, among others.
It should be noted that, when the electric data to be synchronized is synchronized to the electric database in the power plant production control area, each electric data table in the electric data to be synchronized is not compared with each electric data table in the electric database, so as to determine the corresponding electric data table and perform data synchronization, but based on the table types of the electric data tables in the electric data to be synchronized, the electric data tables with the same table types are searched in the electric database, and then the corresponding electric data tables are determined in the electric data tables with the same table types so as to perform data synchronization, so that the synchronization efficiency of the electric data is improved. Therefore, when the number of table types contained in the electric power data to be synchronized in the power plant terminal is larger, the number of table types contained in the electric power database is larger, and when the number of electric power data tables in the electric power database is fixed, the search range when the corresponding electric power data table is searched is smaller, and the search efficiency of the corresponding electric power data table is higher, therefore, when the second score is corrected based on the number of table types, the third score is obtained, and the calculated electric power data amount to be synchronized in the power plant terminal is more consistent with the actual situation and more accurate.
In the technical scheme disclosed in the embodiment, the occupied storage capacity of the power data to be synchronized in each power plant terminal is acquired, the number of the power data tables included in the power data to be synchronized in each power plant terminal is acquired, and the amount of the power data to be synchronized in the power plant terminal is determined based on the first score corresponding to the occupied storage capacity and the second score corresponding to the number of the power data tables, so that the determined amount of the power data is more accurate.
In yet another embodiment, as shown in fig. 4, based on the embodiment shown in any one of fig. 1 to 3, the step 102 of obtaining a power plant level of a power plant where each power plant terminal is located includes:
401. acquiring a plurality of historical power generation amounts of a power plant where each power plant terminal is located;
in this embodiment, a power plant where the power plant terminal is located corresponds to a historical power generation amount in each historical period, and the historical period may be one day, one month, one quarter, one year, or the like.
402. Determining a power generation capacity value of a power plant where a power plant terminal is located based on a plurality of historical power generation amounts;
in this embodiment, an average value of a plurality of historical power generation amounts may be used as the power generation capacity value of the power plant where the power plant terminal is located.
403. And determining the power plant grade of the power plant where the power plant terminal is located based on the power generation capacity value.
In some embodiments, the power plant level of the power plant at which the power plant terminal is located is directly related to the power generation capacity value of the power plant at which the power plant terminal is located. For example, a power generation capacity value interval of a power plant where the power plant terminal is located may be determined, and a power plant class associated with the power generation capacity value interval in advance is used as the power plant class of the power plant where the power plant terminal is located.
In some embodiments, determining the power plant level of the power plant at which the power plant terminal is located based on the power generation capacity value may include: acquiring the power generation type of a power plant where a power plant terminal is located, wherein the power generation type comprises at least one of hydroelectric power generation, thermal power generation, wind power generation and photovoltaic power generation; determining a weighting value corresponding to the power generation type, wherein in general, the weighting value corresponding to the photovoltaic power generation is larger than the weighting value corresponding to the hydroelectric power generation, the weighting value corresponding to the hydroelectric power generation is larger than the weighting value corresponding to the wind power generation, and the weighting value corresponding to the wind power generation is larger than the weighting value corresponding to the thermal power generation; weighting the power generation capacity value by adopting a weighting value to obtain a weighted power generation capacity value; and determining the power plant grade of the power plant where the power plant terminal is located based on the weighted power generation capacity value. Therefore, the power data of the power plants of partial power generation type are preferentially synchronized, and the power data synchronization sequence among the power plants is more reasonable.
In some embodiments, determining the power plant level of the power plant at which the power plant terminal is located based on the weighted power generation capability values may include: and determining a power generation capacity numerical value interval in which the weighted power generation capacity value is positioned, and taking the power plant grade which is pre-associated with the power generation capacity numerical value interval as the power plant grade of the power plant in which the power plant terminal is positioned. The power plant class of the power plant where the power plant terminal is located is positively correlated with the weighted power generation capacity value.
In the technical scheme disclosed by the embodiment, a plurality of historical power generation amounts of the power plant where each power plant terminal is located are obtained, and the power generation capacity value of the power plant where the power plant terminal is located is determined based on the plurality of historical power generation amounts, so that the power plant level of the power plant where the power plant terminal is located is determined.
In order to better implement the database synchronization method based on the power data in the embodiment of the present application, on the basis of the database synchronization method based on the power data, the embodiment of the present application further provides a database synchronization device based on the power data, as shown in fig. 5, a database synchronization device 500 based on the power data includes a first obtaining module 501, a second obtaining module 502, a determining module 503, and a synchronization module 504, which are specifically as follows:
the first obtaining module 501 is configured to obtain a communication load amount of the network isolation device when receiving database synchronization instructions for a plurality of power plant terminals;
The second obtaining module 502 is configured to obtain, when the communication load capacity is greater than a preset load capacity, an amount of power data to be synchronized in each power plant terminal and a power plant level of a power plant where each power plant terminal is located;
a determining module 503, configured to determine a synchronization priority of each power plant terminal based on the power data amount and the power plant level;
and the synchronization module 504 is used for controlling the network isolation device and sequentially synchronizing the power data to be synchronized in each power plant terminal to the power database in the power plant production control area according to the synchronization priority.
According to the database synchronization device based on the power data, when the communication load capacity of the network isolation device is large, the synchronization priority of each power plant terminal is determined based on the power data quantity to be synchronized and the power plant grade, the power data to be synchronized in each power plant terminal is synchronized according to the synchronization priority, data blocking at the network isolation device is avoided, and the synchronization efficiency of the power data is improved. In some embodiments of the present application, the determining module 503 is specifically configured to:
determining a first score corresponding to the amount of power data;
determining a second score corresponding to the power plant level;
taking the sum of the first score and the second score as the comprehensive score of the power plant terminal;
Sequencing the plurality of power plant terminals according to the comprehensive scores to obtain the ranks of the plurality of power plant terminals;
based on the ranking of the plurality of power plant endpoints, a synchronization priority for each power plant endpoint is determined.
In some embodiments of the present application, the determining module 503 is specifically configured to:
acquiring a plurality of historical power data volumes of the network isolation device in historical synchronization and the historical synchronization time consumption corresponding to each historical power data volume;
determining a change relationship between the data amount and the synchronization time consumption based on the plurality of historical power data amounts and the historical synchronization time consumption corresponding to each historical power data amount;
determining an expected synchronization time for the amount of power data based on a changing relationship between the amount of data and the synchronization time;
the synchronization time consumption will be expected as the first score corresponding to the amount of power data.
In some embodiments of the present application, the determining module 503 is specifically configured to:
determining a remaining communication capacity of the network isolation device based on the communication capacity of the network isolation device;
determining a target number of power plant terminals that can be synchronized simultaneously based on the remaining communication load;
based on the target number, determining the synchronization priority of each power plant terminal in the ranking of the plurality of power plant terminals, wherein the total number of the plurality of power plant terminals with the same synchronization priority is the target number.
In some embodiments of the present application, the second obtaining module 502 is specifically configured to:
acquiring the occupied storage capacity of the power data to be synchronized in each power plant terminal, and acquiring the number of power data tables included in the power data to be synchronized in each power plant terminal;
determining a first score corresponding to the occupied storage capacity;
determining a second score corresponding to the number of the power data tables;
and determining the amount of power data to be synchronized in the power plant terminal based on the first score and the second score.
In some embodiments of the present application, the second obtaining module 502 is specifically configured to:
acquiring the table types of all power data tables in the power data to be synchronized in the power plant terminal, and acquiring the number of the table types contained in the power data to be synchronized in the power plant terminal;
correcting the second score based on the table type number to obtain a third score, wherein the third score is inversely related to the table type number;
and taking the sum of the first score and the third score as the electric power data quantity to be synchronized in the power plant terminal.
In some embodiments of the present application, the second obtaining module 502 is specifically configured to:
acquiring a plurality of historical power generation amounts of a power plant where each power plant terminal is located;
determining a power generation capacity value of a power plant where a power plant terminal is located based on a plurality of historical power generation amounts;
And determining the power plant grade of the power plant where the power plant terminal is located based on the power generation capacity value.
In some embodiments of the present application, the second obtaining module 502 is specifically configured to:
acquiring the power generation type of a power plant where a power plant terminal is located, wherein the power generation type comprises at least one of hydroelectric power generation, thermal power generation, wind power generation and photovoltaic power generation;
determining a weighting value corresponding to the power generation type;
weighting the power generation capacity value by adopting a weighting value to obtain a weighted power generation capacity value;
and determining the power plant grade of the power plant where the power plant terminal is located based on the weighted power generation capacity value.
The embodiment of the application also provides computer equipment which integrates any database synchronization device based on the power data. As shown in fig. 6, a schematic structural diagram of a computer device according to an embodiment of the present application is shown, specifically:
the computer device may include one or more processing cores 'processors 601, one or more computer-readable storage media's memory 602, power supply 603, and input unit 604, among other components. Those skilled in the art will appreciate that the computer device architecture shown in fig. 6 is not intended to be limiting of the computer device, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
Processor 601 is the control center of the computer device and connects the various parts of the overall computer device using various interfaces and lines to perform various functions and process data of the computer device by running or executing software programs and/or modules stored in memory 602 and invoking data stored in memory 602. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 601.
The memory 602 may be used to store software programs and modules, and the processor 601 may execute various functional applications and data processing by executing the software programs and modules stored in the memory 602. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 601.
The computer device further includes a power supply 603 for powering the various components, preferably, the power supply 603 can be logically coupled to the processor 601 through a power management system, such that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 603 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 604, which input unit 604 may be used to receive entered numerical or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 601 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 executes the application programs stored in the memory 602, so as to implement various functions as follows:
When receiving database synchronization instructions for a plurality of power plant terminals, acquiring communication load capacity of a network isolation device;
when the communication load capacity is larger than the preset load capacity, acquiring the electric power data quantity to be synchronized in each power plant terminal and the power plant grade of the power plant where each power plant terminal is located;
determining a synchronization priority of each power plant terminal based on the power data amount and the power plant level;
and the control network isolation device sequentially synchronizes the electric power data to be synchronized in each power plant terminal to an electric power database in a power plant production control large area according to the synchronization priority.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium, which may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like. On which a computer program is stored, which is loaded by a processor to perform the steps of any of the power data based database synchronization methods provided by the embodiments of the present application. For example, the loading of the computer program by the processor may perform the steps of:
When receiving database synchronization instructions for a plurality of power plant terminals, acquiring communication load capacity of a network isolation device;
when the communication load capacity is larger than the preset load capacity, acquiring the electric power data quantity to be synchronized in each power plant terminal and the power plant grade of the power plant where each power plant terminal is located;
determining a synchronization priority of each power plant terminal based on the power data amount and the power plant level;
and the control network isolation device sequentially synchronizes the electric power data to be synchronized in each power plant terminal to an electric power database in a power plant production control large area according to the synchronization priority.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of one embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of other embodiments, which are not described herein again.
In the implementation, each unit or structure may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit or structure may be referred to the foregoing method embodiments and will not be repeated herein.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The foregoing describes in detail a database synchronization method, apparatus and medium based on electric power data provided in the embodiments of the present application, and specific examples are applied herein to illustrate the principles and implementations of the present application, where the foregoing description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.