A data processing method and system for power system

By dynamically adjusting the dictionary capacity in power grid data compression and using subtype frequency and trend analysis to optimize dictionary capacity, the problem of low power grid data processing efficiency is solved and efficient data compression and processing are achieved.

CN118332035BActive Publication Date: 2024-08-27HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410777477.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-08-27
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

The existing technology fails to effectively dynamically adjust the dictionary capacity during the power grid data compression process, resulting in increased coding transmission and storage overhead and low efficiency.

Method used

By obtaining the subtype frequency and position ordinal number in the electrical parameter data sequence, the distribution density and distribution trend indicators are calculated, and the dictionary capacity is dynamically adjusted to optimize data processing efficiency.

Benefits of technology

It achieves efficient compression of power grid data, ensuring that the compressed data reflects the characteristics of the original data, reduces redundant information, and improves processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118332035B
    Figure CN118332035B
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to a data processing method and system for an electric power system. The method comprises: obtaining a data sequence and dictionary capacity of an electrical parameter in an initial dictionary, wherein the data sequence contains a plurality of subtypes and subdata corresponding to the subtypes; obtaining the frequency of occurrence of each subtype and the position ordinal of each subdata, and determining the distribution density and distribution trend index of each subtype in the data sequence; calculating the change trend factor of the subtype, wherein the change trend factor is proportional to the distribution trend index; calculating the preferred degree of each subtype, wherein the change trend factor and the distribution density are proportional to the preferred degree, and the preferred degree is proportional to the change trend factor and the distribution density; updating the dictionary capacity based on the preferred degree of the subtype in the initial dictionary, and processing the electrical parameters to be compressed based on the updated dictionary capacity, so as to effectively improve the efficiency of processing the electric power system data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data processing method and system for a power system. Background Art

[0002] The operation of the power grid system supports the normal operation of modern society and is one of the indispensable infrastructures in modern society. With the rapid development of the power industry, the power system has been widely used in life, including power supply, lighting, communications, transportation, industry and medical fields, and its operation has generated a large amount of data. Therefore, efficiently compressing and processing the data generated by the operation of the power system is a key link in supporting the operation and management of the power system.

[0003] The patent application document with publication number CN107835025A provides a method and system for adaptive compression of power load historical data. The method reduces the amount of compressed data by defining the system initial value, setting data pairs consisting of power load values ​​and time, calculating the average change of data over a period of time, adaptive sampling, adjusting the sampling period, selecting the optimal sampling period and correcting abnormal data, so as to achieve the purpose of improving the quality of compressed data.

[0004] The dictionary can reduce the file size by obtaining repeated data patterns in the compressed data during the compression process, and is an indispensable part of the data compression process. However, when the existing technology processes a large amount of data from the power grid system, it does not consider the impact of the changing characteristics of the data on the dictionary capacity in the process of reducing the amount of compressed data to improve the quality of the compressed data. If the dictionary capacity size in the algorithm coding remains fixed, when new repeated data patterns and changing trends appear in the data, the overhead of encoding transmission and storage may increase, resulting in low efficiency in processing power system data. Based on this, how to accurately and dynamically adjust the size of the dictionary capacity during the power grid data compression process is a problem that needs to be solved by those skilled in the art. Summary of the invention

[0005] In order to solve the technical problem of how to accurately and dynamically adjust the size of the dictionary capacity during the process of power grid data compression, the present invention provides a data processing method and system for a power system.

[0006] In a first aspect, the present invention provides a data processing method for a power system, which adopts the following technical solution:

[0007] A data processing method for a power system, comprising the steps of:

[0008] Obtain the data sequence and dictionary capacity of the electrical parameters in the initial dictionary, wherein the data sequence contains multiple subtypes and subdata corresponding to the subtypes; obtain the frequency of occurrence of each subtype and the position ordinal of each subdata, determine the distribution density of each subtype in the data sequence, and the distribution density is proportional to the frequency and the position ordinal; determine the distribution trend index of the subtype, and the distribution trend index is inversely proportional to the position ordinal; calculate the change trend factor of the subtype, and the change trend factor is proportional to the distribution trend index; calculate the preferred degree of each subtype, and the change trend factor and distribution density are proportional to the preferred degree, and the preferred degree is proportional to the change trend factor and distribution density; update the dictionary capacity based on the preferred degree of each subtype in the initial dictionary:

[0009] ;

[0010] In the formula, Indicates the updated dictionary capacity, Indicates the initial dictionary capacity, Indicates the number of subtypes in the initial dictionary, Indicates the first The preference of each subtype, The average value of the preference of all subtypes in the initial dictionary is represented, and the electrical parameters to be compressed are processed based on the updated dictionary capacity.

[0011] The effect is that by analyzing the distribution density and distribution trend indicators of each subtype in the electrical parameters in detail, the characteristics and rules of each subtype in the data sequence can be more accurately understood. This fine-grained analysis helps to accurately obtain the preference of the subtype. Obtaining the fluctuation of the preference of the subtype in the initial dictionary to dynamically adjust the dictionary capacity can ensure that the compressed data can reflect the main characteristics of the original data sequence and optimize the efficiency of power grid data processing.

[0012] According to a data processing method for a power system provided by the present invention, the distribution density of each subtype in the data sequence satisfies the relationship: ; In the formula, represents the distribution density of the ith subtype, represents the frequency of occurrence of the i-th subtype, Indicates the position ordinal number of the jth sub-data in the i-th sub-type in the data sequence, represents the position ordinal mean of all sub-data in the i-th sub-type, Indicates the number of sub-data in the i-th sub-type.

[0013] The effect is that the frequency of each subtype can directly reflect the importance or proportion of the subtype in the entire data sequence, and the mean based on the position ordinal can obtain an indicator reflecting the overall position of the subtype in the data sequence, which effectively improves the accuracy of the distribution density obtained based on this.

[0014] According to a data processing method for an electric power system provided by the present invention, the determination of the distribution trend index of a subtype includes: determining the position ordinal interval of each subdata in the subtype based on the position ordinal of each subdata and adjacent subdata in the data sequence; determining the distribution trend index of each subdata in the subtype based on the position ordinal interval of each subdata and adjacent subdata, the distribution trend index being inversely proportional to the position ordinal interval of the subdata.

[0015] The effect is that the position ordinal interval reflects the interval between sub-data, which can well analyze the dynamic changes and trends of sub-data, so as to more accurately determine its importance or representativeness in the data sequence, and provide a basis for increasing the capacity of sub-types with significant distribution trends in the subsequent dictionary compression process, while reducing the capacity of sub-types with unclear distribution trends or eliminating redundant sub-types.

[0016] According to a data processing method for a power system provided by the present invention, the determining of the position ordinal interval of each sub-data in the sub-type based on the position ordinal of each sub-data and the adjacent sub-data in the data sequence comprises: determining the position ordinal interval of each sub-data in the sub-type based on the difference between the position ordinal of each sub-data and the adjacent sub-data in the data sequence: ; In the formula, Indicates the position ordinal interval of the jth sub-data in the i-th sub-type, Indicates the position ordinal number of the jth sub-data in the i-th sub-type in the data sequence, Indicates the jth subtype in the i-th subtype The position ordinal number of each sub-data in the data sequence.

[0017] According to a data processing method for a power system provided by the present invention, the distribution trend index satisfies the relationship: ; In the formula, Represents the distribution trend indicator of the jth sub-data in the i-th sub-type, Indicates the position ordinal interval of the jth sub-data in the i-th sub-type, Indicates the jth subtype in the i-th subtype The position ordinal interval of each sub-data.

[0018] According to a data processing method for a power system provided by the present invention, the change trend factor satisfies the relationship:

[0019] ;

[0020] In the formula, represents the change trend factor of the i-th subtype, Represents the total number of distribution trend indicators of the i-th subtype, Indicates the number of distribution trend indicators not greater than 1 in the i-th subtype, Indicates the number of distribution trend indicators greater than 1 in the i-th subtype, Represents the normalization function.

[0021] The effect is that the distribution trend of the subtype is determined by its distribution trend index. If the distribution trend of the subtype is increasing as a whole, it means that the importance or frequency of some subtypes in the data has changed significantly, so it is necessary to assign a larger change trend factor to obtain a larger dictionary capacity to accommodate these changes. On the contrary, if the distribution trend of the subtype is decreasing as a whole, it can be considered to reduce the dictionary capacity by assigning a smaller change trend factor to save storage space. In this way, the dictionary capacity can be adjusted dynamically to ensure that the compressed data can reflect the main characteristics of the original data and optimize the efficiency of data processing.

[0022] According to a data processing method for a power system provided by the present invention, the preference degree of each subtype satisfies the relationship: ; In the formula, represents the preference of the ith subtype, represents the distribution density of the ith subtype, Represents the change trend factor of the i-th subtype.

[0023] The effect is that it provides an accurate method for calculating the degree of preference, which can accurately obtain the degree of preference of each subtype.

[0024] In a second aspect, the present invention provides a data processing system for a power system, which adopts the following technical solution:

[0025] A data processing system for an electric power system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned data processing method for an electric power system is implemented.

[0026] By adopting the above technical solution, the above-mentioned data processing method for the power system is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is made according to the memory and the processor for easy use.

[0027] Based on the above technical solution, when processing the data of the power system, by analyzing the distribution density and distribution trend indicators of each subtype in the electrical parameters in detail, the characteristics and rules of each subtype in the data sequence can be more accurately understood. This fine-grained analysis helps to accurately obtain the preference of the subtype. The dictionary is dynamically updated according to the preference of the subtype and the capacity of the initial dictionary to ensure that the most representative and important subtypes are stored in the dictionary, which helps to reduce redundant information in the dictionary while maintaining the compactness and efficiency of the dictionary. When compressing, less space is used to represent the same amount of data, thereby achieving efficient data compression. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.

[0029] Figure 1 A flow chart of a data processing method for a power system provided by an embodiment of the present invention;

[0030] Figure 2 A schematic flow chart of a method for determining a distribution trend index of a subtype provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0032] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0033] The embodiment of the present invention discloses a data processing method for a power system, please refer to Figure 1 , Figure 1 A flow chart of a data processing method for a power system provided by an embodiment of the present invention includes the following steps S1 to S6:

[0034] S1: Obtain the data sequence and dictionary capacity of the electrical parameters in the initial dictionary.

[0035] The data sequence includes multiple subtypes, and each subtype corresponds to multiple sub-data.

[0036] For example, the electrical parameters may be current, voltage, frequency, temperature, humidity, etc., which may be set according to actual needs, and the embodiments of the present invention do not impose too many restrictions on them.

[0037] The data sequence for obtaining the electrical parameters can be collected in the power system by sensors corresponding to the electrical parameters.

[0038] For example, when the electrical parameter is current, the subtype is the type of various current values ​​appearing in the data sequence, such as 0.2A, 0.4A, 0.7A, etc., wherein the sub-data corresponding to the subtype 0.2A is each 0.2A appearing in the data sequence.

[0039] Based on the above method, the electrical parameters in the initial dictionary can be obtained. However, when processing the new change trend in the electrical parameters based on the capacity of the initial dictionary, if the initial dictionary capacity is too large, it will lead to excessive memory consumption, and if the initial dictionary capacity is too small, it will lead to the inability to correctly and effectively compress the data, and the flexibility of the dictionary capacity is poor. In order to effectively improve the flexibility of the dictionary capacity, thereby effectively improving the efficiency of processing power system data, an embodiment of the present invention proposes a data processing method for a power system. When processing the data of the power system, by obtaining the data sequence of the electrical parameters in the initial dictionary, based on the distribution density and distribution trend of each subtype in the existing data sequence, the preference degree of each subtype is determined to achieve dynamic adjustment of the dictionary capacity, that is, perform the following steps:

[0040] S2: Obtain the frequency of occurrence of each subtype and the position ordinal of each sub-data, and determine the distribution density of each subtype in the data sequence.

[0041] Among them, the distribution density is positively proportional to the frequency and position ordinal.

[0042] It should be noted that the preference of a subtype in a data sequence can reflect the importance of the subtype in the data sequence. The more important the subtype is, the more priority it needs to be given when performing compression processing based on the dictionary. Based on this, in order to accurately determine the preference of a subtype in a data sequence, the preference of a subtype can be analyzed by combining the distribution trend and distribution density of the subtype, effectively avoiding the error caused by determining the preference of a single factor.

[0043] The steps to determine the distribution density of subtypes are described in detail below:

[0044] For example, in the embodiment of the present invention, when determining the distribution density of each subtype in the data sequence, the frequency of occurrence of the subtype can be determined based on the ratio of the number of subdata in each subtype to the total number of subdata in all subtypes in the data sequence; and the distribution density of each subtype in the data sequence is determined based on the frequency of occurrence of the subtype, the position ordinal number of each subdata in the data sequence, and the average position ordinal number of all subdata in the subtype in the data sequence. For details, see the formula:

[0045] ;

[0046] In the formula, represents the distribution density of the ith subtype, represents the frequency of occurrence of the i-th subtype, Indicates the position ordinal number of the jth sub-data in the i-th sub-type in the data sequence, It represents the ordinal mean of the positions of all sub-data in the i-th sub-type in the data sequence. Indicates the number of sub-data in the i-th sub-type.

[0047] Among them, if the frequency of a subtype is higher, it means that the subtype appears more times in the data sequence; It represents the average difference between the position ordinal of the jth sub-data in the ith sub-type and the position ordinal of all sub-data in the ith sub-type. The higher the value, the more dispersed the distribution of the sub-data in the ith sub-type in the data sequence. If the frequency of occurrence of a sub-type is higher and the distribution of the sub-data in the sub-type in the data sequence is more dispersed, it means that the density of the sub-type in the data sequence is greater and the importance of the sub-type in the entire data sequence is higher.

[0048] For example, in the embodiment of the present invention, in order to more accurately obtain the preference degree of the subtype, it is also necessary to obtain the distribution trend index of each subtype to analyze the distribution trend of the subtype in the data sequence.

[0049] S3: Determine the distribution trend indicators of subtypes.

[0050] Among them, the distribution trend index is inversely proportional to the position ordinal.

[0051] To better understand the distribution trend index calculation method provided by the embodiment of the present invention, please refer to Figure 2 As shown, Figure 2 A schematic flow chart of a method for determining a distribution trend index of a subtype provided by an embodiment of the present invention, the method comprising the following steps S301-S302:

[0052] S301: Determine the position ordinal interval of each sub-data in a sub-type based on the position ordinal of each sub-data and adjacent sub-data in the data sequence.

[0053] For example, in the embodiment of the present invention, the position ordinal interval of each sub-data in the sub-type is determined, and the specific formula is as follows:

[0054] ;

[0055] In the formula, Indicates the position ordinal interval of the jth sub-data in the i-th sub-type, Indicates the position ordinal number of the jth sub-data in the i-th sub-type in the data sequence, Indicates the jth subtype in the i-th subtype The position ordinal number of each sub-data in the data sequence.

[0056] It should be noted that, in the embodiment of the present invention, when determining the position ordinal interval based on the position ordinal of the sub-data, the current sub-data is compared with the previous sub-data of the current sub-data, so as to better reflect the distribution trend of each sub-type in the data sequence. When determining the position ordinal interval of the first sub-data, there is no previous data point to compare, so the first sub-data is not processed, that is, j cannot be 1 in the formula of the above step S301.

[0057] For example, the subtype is 0.2A, and there are 4 sub-data in the data sequence, whose position ordinal numbers are 3, 5, 8, and 13 respectively. Then the position ordinal interval of the 4th sub-data is 5, the position ordinal interval of the 3rd sub-data is 3, and the position ordinal interval of the 2nd sub-data is 2.

[0058] S302: Determine a distribution trend index of each sub-data in a sub-type based on the position ordinal interval between each sub-data and adjacent sub-data.

[0059] Among them, the distribution trend index is inversely proportional to the position ordinal interval of the sub-data.

[0060] For example, in the embodiment of the present invention, the distribution trend index of each sub-data in the sub-type is determined, and the specific formula can be referred to:

[0061] ;

[0062] In the formula, Represents the distribution trend indicator of the jth sub-data in the i-th sub-type, Indicates the position ordinal interval of the jth sub-data in the i-th sub-type, Indicates the jth subtype in the i-th subtype The position ordinal interval of each sub-data.

[0063] It should be noted that the distribution trend index of each sub-data in the sub-type is determined based on the ratio of the position ordinal interval of the current sub-data to the position ordinal interval of the previous sub-data of the current sub-data. This calculation process requires at least 3 sub-data to be calculated. Therefore, in the embodiment of the present invention, the sub-type for calculating the priority needs to include at least three sub-data. The sub-type corresponding to less than three sub-data is considered to have little demand for dictionary capacity, and is not included in the scope of calculating the priority in order to reduce the calculation cost. When calculating the distribution trend index of the sub-data in this step, since there is not enough position ordinal interval for comparison between the first and second sub-data, the distribution trend index of the first and second sub-data is not calculated.

[0064] For example, the position ordinals of the four sub-data are 3, 5, 8, and 13, respectively, that is, the position ordinal interval of the fourth sub-data is 5, the position ordinal interval of the third sub-data is 3, and the position ordinal interval of the second sub-data is 2. At this time, the distribution trend index of the fourth sub-data is the ratio between the position ordinal interval of the fourth sub-data and the position ordinal interval of the third sub-data, that is, 5 / 3, and the distribution trend index of the third sub-data is the ratio between the position ordinal interval of the third sub-data and the position ordinal interval of the second sub-data, that is, 3 / 2.

[0065] After the distribution trend index of the subtype is determined based on the above steps S301 and S302, the distribution trend of the subtype can be determined based on the distribution trend index:

[0066] For example, the distribution trend of each subtype in the data sequence can be determined based on the number of distribution trend indicators whose distribution trend indicators are not greater than 1 and the number of distribution trend indicators whose distribution trend indicators are greater than 1 in each subtype.

[0067] Specifically, the distribution trend index of each sub-data in the subtype is compared with 1, the number of distribution trend indicators whose distribution trend indicators are not greater than 1 and the number of distribution trend indicators whose distribution trend indicators are greater than 1 in the subtype are determined, and the distribution trend of the subtype in the data sequence is determined based on the number of distribution trend indicators.

[0068] Among them, the number of distribution trend indicators in the subtype whose distribution trend indicators are not greater than 1 can be determined by referring to the formula:

[0069] ;

[0070] In the formula, Indicates the number of distribution trend indicators in the i-th subtype whose distribution trend indicators are not greater than 1. Represents the distribution trend indicator of the jth sub-data in the i-th sub-type, Represents the total number of distribution trend indicators in the i-th subtype.

[0071] It is understandable that if , indicating that in the ith subtype, the position ordinal interval of the jth sub-data in the ith subtype is greater than or equal to the position ordinal interval of the j-1th sub-data, that is, the position ordinal interval of the subtype in the data sequence may be increasing or equally spaced.

[0072] To determine the number of distribution trend indicators in the subtype whose distribution trend indicators are greater than 1, refer to the formula:

[0073] ;

[0074] In the formula, Indicates the number of distribution trend indicators in the i-th subtype whose distribution trend indicators are greater than 1. Represents the distribution trend indicator of the jth sub-data in the i-th sub-type, Represents the total number of distribution trend indicators in the i-th subtype.

[0075] Similarly, if , indicating that in the i-th subtype, the position ordinal interval of the j-th sub-data in the i-th subtype is smaller than the position ordinal interval of the j-1-th sub-data.

[0076] Based on the above steps, the number of distribution trend indicators whose distribution trend indicators are not greater than 1 and the number of distribution trend indicators whose distribution trend indicators are greater than 1 in each subtype can be obtained. Based on the number of distribution trend indicators whose distribution trend indicators are not greater than 1 and the number of distribution trend indicators whose distribution trend indicators are greater than 1 in the subtype, the distribution trend of the subtype in the data sequence can be determined:

[0077] For example, in an embodiment of the present invention, based on the number of distribution trend indicators of the subtypes whose distribution trend indicators are not greater than 1 and the number of distribution trend indicators of the subtypes whose distribution trend indicators are greater than 1 obtained in the above steps, there are the following three possible situations:

[0078] In one case, if , indicating that the position ordinal interval in the subtype is generally increasing or equally spaced, and the subtype is more likely to appear in the new electrical parameter data sequence obtained subsequently.

[0079] In another case, if , indicating that the position ordinal interval in the subtype is decreasing as a whole, and the probability of this subtype appearing in the new electrical parameter data sequence obtained subsequently is small.

[0080] In another case, if , indicating that the change trend of the position ordinal interval in the subtype is not obvious.

[0081] Based on the above steps, the distribution trend of each subtype can be obtained, but the distribution trend can only reflect the general trend of the subtype, and cannot accurately obtain the preference degree of the subtype. Based on this, in order to obtain an accurate preference value, after determining the distribution trend of the subtype, the specific situation of the distribution trend of the subtype can be analyzed, and different distribution trend types can be assigned different change trend factors, so as to accurately determine the preference degree of each subtype:

[0082] S4: Calculate the change trend factor of the subtype.

[0083] Among them, the change trend factor is positively correlated with the distribution trend index.

[0084] For example, in the embodiment of the present invention, the change trend factor of the subtype can be determined by referring to the formula:

[0085] ;

[0086] In the formula, represents the change trend factor of the i-th subtype, Represents the total number of distribution trend indicators of the i-th subtype, Indicates the number of distribution trend indicators in the i-th subtype whose distribution trend indicators are not greater than 1. Indicates the number of distribution trend indicators in the i-th subtype whose distribution trend indicators are greater than 1. Represents the normalization function.

[0087] It should be noted that, based on the above steps, the distribution trend of the subtype is determined by the distribution trend index of the subtype. If the distribution trend of the subtype is increasing as a whole, it means that the importance or frequency of some subtypes in the data has changed significantly, so it is necessary to assign a larger change trend factor to obtain a larger dictionary capacity to accommodate these changes. On the contrary, if the distribution trend of the subtype is decreasing as a whole, it can be considered to reduce the dictionary capacity by assigning a smaller change trend factor to save storage space. In this way, the dictionary capacity can be adjusted dynamically to ensure that the compressed data can reflect the main characteristics of the original data and optimize the efficiency of data processing.

[0088] Therefore, in the above formula, if , indicating that the subtype is more likely to appear in the data sequence of new electrical parameters acquired subsequently. Therefore, it is necessary to increase the preference of the subtype in the dictionary during compression processing.

[0089] like , indicating that the probability of this subtype appearing in the new electrical parameter data sequence subsequently acquired is small. Therefore, it is necessary to reduce the preference of this subtype in the dictionary during compression processing.

[0090] like , indicating that the change trend of the position ordinal interval in the subtype is not obvious, and the demand for dictionary capacity does not change much, so no additional processing is performed.

[0091] After obtaining the distribution density and change trend factor of each subtype based on the above steps, the preference degree of each subtype can be obtained based on the distribution density and change trend factor of each subtype. That is, perform the following steps:

[0092] S5: Calculate the preference level of each subtype.

[0093] The degree of preference is positively correlated with both the change trend factor and the distribution density, and the degree of preference is used to characterize the importance of each subtype in the data sequence.

[0094] For example, in an embodiment of the present invention, the distribution density of the subtype in the data sequence may be corrected based on the change trend factor of the subtype, thereby determining the preference degree of the subtype.

[0095] The specific determination of the preference degree of each subtype can be made by referring to the following formula:

[0096] ;

[0097] In the formula, represents the preferred value of the i-th subtype, represents the distribution density of the ith subtype, Represents the change trend factor of the i-th subtype.

[0098] It is understandable that the preference of each subtype reflects the distribution density and change trend of each subtype in the initial dictionary, but the preference of each subtype is not static. As the acquired data sequence changes, the preference value of the subtype also changes with the distribution density and distribution trend of the subtype in the data sequence. Therefore, it is necessary to combine the preference of the subtype and the fluctuation trend of the preference to jointly determine the dictionary capacity update value. If the preference of the subtype is high, the fluctuation trend of the preference of the subtype with a higher priority needs to be considered during the compression process to dynamically adjust the capacity of the initial dictionary, that is, execute the following step S6:

[0099] S6: updating the dictionary capacity based on the preference level of each subtype in the initial dictionary, and processing the electrical parameters to be compressed based on the updated dictionary capacity.

[0100] When updating the initial dictionary, it is necessary to fully consider the preference level and fluctuation trend of each subtype in the initial dictionary, so that the capacity of the initial dictionary can be reasonably expanded or reduced, thereby effectively reducing the waste of resources caused by invalid operations during memory operation.

[0101] For example, in the embodiment of the present invention, the dictionary capacity may be updated based on the capacity of the initial dictionary, the number of subtypes in the initial dictionary, and the preference of the subtypes in the initial dictionary. For details, see the following formula:

[0102] ;

[0103] In the formula, Indicates the updated dictionary capacity, Indicates the initial dictionary capacity, Indicates the number of subtypes in the initial dictionary, Indicates the first The preference of each subtype, represents the mean preference of all subtypes in the initial dictionary, Indicates the round-up symbol.

[0104] in, Indicates the variance of the preference of all subtypes in the initial dictionary. The larger the value, the greater the fluctuation of the preference values ​​of all subtypes in the initial dictionary, that is, the preference differences of all data values ​​in the initial dictionary are large, which means that there are many different important subtypes in the dictionary, and the dictionary is usually constructed based on the repeated patterns that frequently appear in the subtypes. These subtypes with large fluctuations are likely to appear later, but the subtypes that appear later cannot match the repeated patterns already in the dictionary. Therefore, the capacity of the initial dictionary needs to be increased to accommodate the subsequent subtype repeated patterns to ensure that the most representative and important subtypes are stored in the dictionary. On the contrary, the smaller the value, the smaller the fluctuation of the preference values ​​of all data values ​​in the initial dictionary, that is, the preference differences of all subtypes in the initial dictionary are small, so the capacity of the initial dictionary can be reduced, and subtypes with particularly small preference differences contribute less to the compression effect and can be directly eliminated, thereby saving memory and improving compression speed.

[0105] After obtaining the updated dictionary capacity based on the above steps, other data sequences of electrical parameters to be compressed can be further compressed based on the updated dictionary capacity to achieve processing of power system data.

[0106] It can be seen that in an embodiment of the present invention, when processing data of an electric power system, a data sequence and a dictionary capacity of electrical parameters in an initial dictionary can be obtained, wherein the data sequence includes multiple subtypes and subdata corresponding to the subtypes; the frequency of occurrence of each subtype and the position ordinal of each subdata are obtained, and the distribution density of each subtype in the data sequence is determined, and the distribution density is positively proportional to the frequency and the position ordinal; a distribution trend index of the subtype is determined, and the distribution trend index is inversely proportional to the position ordinal; a change trend factor of the subtype is calculated, and the change trend factor is positively proportional to the distribution trend index; the preference degree of each subtype is calculated, and the change trend factor and the distribution density are positively proportional to the preference degree; the dictionary capacity is updated based on the preference degree of each subtype in the initial dictionary, and the electrical parameters to be compressed are processed based on the updated dictionary capacity.

[0107] In this way, by obtaining the distribution density and distribution trend of each subtype in the initial dictionary, determining the preference of the subtype in the initial dictionary based on the distribution density and distribution trend, and based on the fluctuation between the preference levels of each subtype in the initial dictionary, the capacity of the initial dictionary during compression is dynamically adjusted, which can effectively improve the efficiency of processing power system data.

[0108] It should be noted that the acquisition of the preference level of the subtypes in the initial dictionary recorded in the above embodiment is carried out in real time, and the dictionary capacity needs to be dynamically adjusted based on the changes in the preference level of the subtypes until all the current power system data that needs to be compressed is processed.

[0109] An embodiment of the present invention further discloses a data processing system for a power system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a data processing method for a power system provided by the present invention is implemented.

[0110] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0111] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM, a dynamic random access memory DRAM, a static random access memory SRAM, an enhanced dynamic random access memory EDRAM, a high bandwidth memory HBM, a hybrid storage cube HMC, etc., or any other medium that may be used to store the required information and may be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Although this specification has shown and described a number of embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, modifications and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the process of practicing the present invention, various alternatives to the embodiments of the present invention described herein may be adopted.

[0112] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data processing method for a power system, characterized in that: include: Acquire a data sequence of electrical parameters in an initial dictionary and a dictionary capacity, wherein the data sequence includes a plurality of subtypes and subdata corresponding to the subtypes; Obtain the frequency of occurrence of each subtype and the position ordinal of each sub-data, determine the distribution density of each subtype in the data sequence, and satisfy the relationship: ; In the formula, represents the distribution density of the ith subtype, represents the frequency of occurrence of the i-th subtype, Indicates the position ordinal number of the jth sub-data in the i-th sub-type in the data sequence, represents the position ordinal mean of all sub-data in the i-th sub-type, Indicates the number of sub-data in the i-th sub-type; the distribution density is proportional to both the frequency and the position ordinal; determines the distribution trend index of the sub-type, which is inversely proportional to the position ordinal; calculates the change trend factor of the sub-type, which is proportional to the distribution trend index; calculates the preference degree of each sub-type, which is proportional to the change trend factor and the distribution density; updates the dictionary capacity based on the preference degree of each sub-type in the initial dictionary: ; In the formula, Indicates the updated dictionary capacity, Indicates the initial dictionary capacity, Indicates the number of subtypes in the initial dictionary, Indicates the first The preference of each subtype, The method further comprises: representing an average of the preference levels of all subtypes in the initial dictionary; and processing the electrical parameters to be compressed based on the updated dictionary capacity.

2. A data processing method for a power system according to claim 1, characterized in that: The determination of the distribution trend indicator of the subtype includes: Determine the position ordinal interval of each sub-data in the sub-type based on the position ordinal of each sub-data and the adjacent sub-data in the data sequence; Based on the position ordinal interval between each sub-data and adjacent sub-data, a distribution trend index of each sub-data in the sub-type is determined, and the distribution trend index is in inverse proportion to the position ordinal interval of the sub-data.

3. A data processing method for a power system according to claim 2, characterized in that: The determining the position ordinal interval of each sub-data in the sub-type based on the position ordinal of each sub-data and the adjacent sub-data in the data sequence includes: Based on the difference between the position ordinal numbers of each sub-data and the adjacent sub-data in the data sequence, the position ordinal interval of each sub-data in the sub-type is determined: ; In the formula, Indicates the position ordinal interval of the jth sub-data in the i-th sub-type, Indicates the position ordinal number of the jth sub-data in the i-th sub-type in the data sequence, Indicates the jth subtype in the i-th subtype The position ordinal number of each sub-data in the data sequence.

4. A data processing method for a power system according to claim 2 or 3, characterized in that: The distribution trend index satisfies the relationship: ; In the formula, Represents the distribution trend indicator of the jth sub-data in the i-th sub-type, Indicates the position ordinal interval of the jth sub-data in the i-th sub-type, Indicates the jth subtype in the i-th subtype The position ordinal interval of each sub-data.

5. A data processing method for a power system according to claim 1, characterized in that: The change trend factor satisfies the relationship: ; In the formula, represents the change trend factor of the i-th subtype, Represents the total number of distribution trend indicators of the i-th subtype, Indicates the number of distribution trend indicators not greater than 1 in the i-th subtype, Indicates the number of distribution trend indicators greater than 1 in the i-th subtype, Represents the normalization function.

6. A data processing method for a power system according to claim 1, characterized in that: The preference degree of each subtype satisfies the relationship: ; In the formula, represents the preference of the ith subtype, represents the distribution density of the ith subtype, Represents the change trend factor of the i-th subtype.

7. A data processing system for a power system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a data processing method for a power system according to any one of claims 1 to 6 is implemented.