Power data processing method and device, electronic equipment and storage medium

By constructing the sparse matrix and the calculated constraint matrix, the problem of high computing resources and time consumption of power data processing in the prior art is solved, and more efficient power data processing is achieved.

CN119853014APending Publication Date: 2025-04-18SHANSHU TECH (BEIJING) CO LTD +5
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510028175.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-18

Smart Images

  • Figure CN119853014A_ABST
    Figure CN119853014A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power data processing method and device, electronic equipment and a storage medium. Firstly, power data are acquired; constructing a sparse matrix based on the power data; wherein each non-zero element in the sparse matrix is used for representing a transfer distribution factor of each node in the power system; based on the sparse matrix and the power data, calculating to obtain a constraint matrix; wherein each element in the constraint matrix is used for representing section power flow values of different areas in the power system; the constraint matrix is calculated based on each non-zero element in the sparse matrix; and constructing a target model based on the constraint matrix. According to the method, the transfer distribution factor matrix is constructed by utilizing the sparse matrix, and only non-zero elements in the sparse matrix need to be considered in the calculation process of the constraint matrix, so that invalid calculation of a large number of zero elements is avoided, and resources and time required by model calculation can be remarkably reduced. In addition, due to the fact that the number of non-zero elements in the sparse matrix is small, the storage requirement for zero elements is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a power data processing method, device, electronic device and storage medium. Background Art

[0002] Sectional power flow constraint refers to the existence of a limit value for power flow transmission in a specific area or between several nodes with close electrical distances in the power system, especially in the power transmission process of the power grid.

[0003] At present, when obtaining the cross-sectional flow constraints in the power system, the index modeling method is often used. That is, in the existing technology, the relevant information of the power system is often stored in the form of a dense matrix, and then indexed and calculated. However, the proportion of non-zero elements in the dense matrix is ​​relatively high. When the number of equipment in the power system is complex and the network topology is complex, the data storage and calculation process consumes more resources and time. Summary of the invention

[0004] The embodiments of the present application provide a power data processing method, device, electronic device and storage medium to solve the problem that the calculation process of the existing power data processing method consumes a lot of resources and takes a long time.

[0005] On the one hand, an embodiment of the present application provides a method for processing power data, including: obtaining power data; constructing a sparse matrix based on the power data; wherein each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system; calculating a constraint matrix based on the sparse matrix and the power data; wherein each element in the constraint matrix is ​​used to characterize the section flow value of different areas in the power system; the constraint matrix is ​​calculated based on each non-zero element in the sparse matrix; each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system; and constructing a target model based on the constraint matrix.

[0006] In a possible embodiment, the constraint matrix is ​​calculated based on the sparse matrix and the power data, including: obtaining a target column vector based on the power data; at least part of the elements in the target column vector are used to characterize the output power of each node and / or generator in the power system; and multiplying the sparse matrix by the target column vector to obtain the constraint matrix.

[0007] In a possible embodiment, multiplying the sparse matrix with the target column vector to obtain the constraint matrix includes: multiplying the non-zero elements of each column of the mth row in the sparse matrix with the elements of the mth row in the target column vector respectively, and summing them to obtain the elements of the mth row in the constraint matrix; wherein m is an integer greater than zero.

[0008] In a possible embodiment, constructing the target model based on the constraint matrix includes: creating a solution environment; obtaining problem description information; wherein the problem description information includes at least: decision variables, the constraint matrix and the objective function; wherein the constraint matrix is ​​used to constrain the value range of the expression of the decision variable; using the problem description information, constructing the target model in the solution environment; wherein the objective function includes at least one of the following: a linear function and a quadratic function; and the expression form of the decision variable includes at least one of the following: a continuous type, an integer type, and a binary variable type.

[0009] In a possible embodiment, the method further includes: preprocessing the power data; wherein the preprocessing includes at least: format conversion processing; and constructing the sparse matrix using the preprocessed power data.

[0010] In a possible embodiment, the non-zero elements in the sparse matrix are set at specified positions of the constraint matrix; the specified positions include at least one of the following: a specified row, a specified column, and a specified diagonal.

[0011] In a possible embodiment, the method further includes: storing the correspondence between the non-zero elements in the sparse matrix and the position information of the non-zero elements; wherein the storage format of the sparse matrix includes at least one of the following: compressed sparse rows, compressed sparse columns, and coordinate lists.

[0012] On the one hand, an embodiment of the present application provides a power data processing device, which includes: a power data acquisition module for acquiring power data; a sparse matrix construction module for constructing a sparse matrix based on the power data; wherein each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system; a constraint matrix calculation module for calculating a constraint matrix based on the sparse matrix and the power data; wherein each element in the constraint matrix is ​​used to characterize the section flow value of different areas in the power system; the constraint matrix is ​​calculated based on each non-zero element in the sparse matrix; and a target model construction module for constructing a target model based on the constraint matrix.

[0013] On the one hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes any one of the above-mentioned power data processing methods.

[0014] On the one hand, the present application provides a computer-readable storage medium, which includes a program code. When the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any of the above-mentioned power data processing methods.

[0015] The beneficial effects of this application are as follows:

[0016] The present application provides a method, device, electronic device and storage medium for processing electric power data. The present application obtains electric power data, calculates a constraint matrix, and uses the constraint matrix to construct a target model. The constraint matrix is ​​obtained based on a sparse matrix; each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system. Specifically, since the calculation process of the existing constraint matrix contains a large number of transfer distribution factors of 0, there is a sparse characteristic, and the prior art often uses a dense matrix for calculation, and it is necessary to consider each element in the matrix. However, the present application uses a sparse matrix to construct a transfer distribution factor matrix. In the calculation process of the constraint matrix, only the non-zero elements in the sparse matrix need to be considered, thereby avoiding invalid calculations of a large number of zero elements, so that the resources and time required for model calculation can be significantly reduced. In addition, since there are fewer non-zero elements in the sparse matrix, the storage requirements for zero elements are reduced.

[0017] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0019] Figure 1 A schematic diagram of a flow chart of a power data processing method in an embodiment of the present application;

[0020] Figure 2 This is a schematic diagram of the structure of a power data processing device in an embodiment of the present application;

[0021] Figure 3 A schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0023] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0024] At present, with the advancement of the market-oriented reform of electricity, the construction of the electricity spot market has gradually been put on the agenda. In the electricity market environment, the traditional power generation plan is transformed into the calculation of power transactions between buyers and sellers, that is, the clearing of the electricity market. The traditional power generation plan aims to minimize the power generation cost, while in the electricity market, the objective function is to minimize the total power purchase cost. Therefore, the main functions of the power market trading algorithm are: the trading center receives the quotation curve declared by the power generator, and arranges the power generation plan and clearing price of the unit in each period of the next day according to the priority of the power sales quotation from low to high, and considers the constraints such as meeting the system load requirements and the unit's own limitations, so as to complete the market clearing.

[0025] In the market clearing calculation, the construction and solution process of the Security-Constrained Unit Commitment (SCUC) and Security-Constrained Economic Dispatch takes over the transaction declaration and connects the security verification and result release links. The time window for the above model building and optimization calculation is very narrow. Therefore, the efficiency of model construction and calculation solution is crucial.

[0026] In the existing technical solutions, when constructing the safety constraint unit combination problem, the mixed integer linear programming model (MILP) is usually used for modeling. The SCUC problem needs to decide whether the generator set is turned on or off, which is a typical integer decision problem. In the model, binary variables (0 or 1) can be used to represent the start and stop status of the unit. In addition, many constraints in the SCUC problem, such as the output limit of the generator, the transmission limit of the power grid, the voltage limit, etc., are linear. MILP can effectively describe the above variables and constraints.

[0027] In the SCUC model, cross-sectional power flow constraints are an important type of constraints, which include a large number of equipment variables, such as units and tie lines. Specifically, cross-sectional power flow constraints refer to the limit value of power flow transmission between a specific area or several nodes with close electrical distances in the power system, especially in the power transmission process of the power grid. This limit value is determined by the maximum power flow that the channel composed of transmission lines or transformers can withstand. When the power flow exceeds this limit value, it may cause the transmission line to overload, affecting the safe and stable operation of the power grid.

[0028] In the prior art, in order to obtain the cross-sectional flow constraints, an index modeling method is used. Although the description is closer to the actual state, that is, each device is modeled and calculated separately, and a cyclic calculation is required. However, this is not conducive to data storage, modification, and modeling indexing, and has the disadvantages of high data memory usage and high modeling time overhead.

[0029] In order to solve the above problems, this application provides a power data processing method, which uses the sparse matrix constructed by the transfer distribution factor to calculate the constraint matrix, that is, the zero elements can be skipped, and only the non-zero elements in the sparse matrix need to be calculated, so that the number of loop calculations can be reduced, thereby reducing resource consumption. For details, please refer to Figure 1 ,like Figure 1 As shown, the method specifically includes:

[0030] S101, obtaining power data.

[0031] Specifically, the present application does not specifically limit the source of power data, which can be sent by other devices or read. Among them, the power data is related to the equipment included in the power system, which at least includes but is not limited to at least one of the following: generators and nodes. Among them, the generator is used to provide electrical energy to the power system, and the node can be understood as a load node in the power system, that is, it is used to connect the power system and electrical equipment (such as televisions, electric lights). Depending on the different equipment in the power system, the power data includes but is not limited to at least one of the following: the output power of the engine, the power of the interconnection line, the load value of the node, and the transfer distribution factor of the node.

[0032] S102, based on the sparse matrix and the power data, a constraint matrix is ​​calculated; based on the power data, a sparse matrix is ​​constructed; wherein each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system.

[0033] In this step, after obtaining the power data, the sparse matrix can be calculated, and the subsequent constraint matrix can be obtained through the sparse matrix. Among them, the sparse matrix can be understood as a transfer distribution factor matrix, which can include multiple zero elements and non-zero elements, and the proportion of zero elements is often higher than that of non-zero elements.

[0034] S103, based on the sparse matrix and the power data, a constraint matrix is ​​calculated; wherein each element in the constraint matrix is ​​used to characterize the cross-sectional flow value in different areas of the power system; the constraint matrix is ​​calculated based on each non-zero element in the sparse matrix.

[0035] The constraint matrix can be understood as the cross-section power flow constraint in a specific area. Specifically, the power system can be divided into multiple areas according to actual conditions, and each element in the constraint matrix represents the cross-section constraint value of different areas.

[0036] Among them, the cross-section constraint value is related to the output power of nodes, engines, tie lines, etc. in the area, and the specific relationship can be satisfied as follows:

[0037] P s =∑ i G s-i P i +∑ j G s-j P j +∑ k G s-k D k ;

[0038] L s ≤P s ≤U s ;

[0039] Among them, S is the cross section set, P s represents the section constraint value of section s, G s-i P represents the generator output power transfer distribution factor of the node where the generator i is located to the section s, i represents the output power of generator i, G s-j P represents the power transfer distribution factor of the generator output at the node of tie line j to section s. j represents the power of tie line j, G s-k Denotes the generator output power transfer distribution factor of node k to section s, D k represents the load value of node k. s and U s They respectively represent the upper and lower limits of the section flow that ensures safe operation.

[0040] As can be seen from the above formula, the cross-section constraint value is obtained by the transfer distribution factor, generator power, and node power. Based on this, the present application converts the above relationship into:

[0041] Ax=b

[0042] Where A is a sparse matrix of nodes and generators contained in all sections (the elements contained therein are transfer distribution factors), x is a target column vector, and at least some of the elements in the target column vector are used to characterize the output power of the nodes in the power system. b is a constraint matrix, and each element in b is a section flow constraint. In other words, most of the elements in A are 0. Therefore, there is no need to allocate space for these zero values ​​when storing. The dense matrix in the prior art allocates space for each element, regardless of whether its value is zero. In contrast, a sparse matrix only stores non-zero elements and their position information, thereby greatly reducing the required storage space. When performing the subsequent matrix operation (i.e., the step of obtaining the constraint matrix), these zero values ​​can be skipped to reduce unnecessary calculations, thereby indirectly saving memory resources that may be consumed by calculating zero values.

[0043] It should be understood that the present application does not specifically limit the specific position of the non-zero elements in the sparse matrix. Specifically, in practical applications, users can allocate the distribution mode of the transfer distribution factor in the sparse matrix according to the actual situation, thereby changing the constraints on different nodes. In this way, the flexibility of model construction can be improved. Preferably, the non-zero elements in the sparse matrix are set at the specified position of the constraint matrix; the specified position includes at least one of the following: a specified row, a specified column, and a specified diagonal. In this way, a suitable storage method can be selected according to different application scenarios and requirements. Placing the non-zero elements at the specified position of the constraint matrix provides greater flexibility for the storage and calculation of the matrix. Moreover, by placing the non-zero elements at the specified position of the constraint matrix, it can be clearly indicated which elements are subject to the constraints. Further, if the non-zero elements of a matrix are mainly concentrated in a specific position, a storage format that is more suitable for this distribution can be selected to reduce the demand for storage space.

[0044] For example, A can be expressed as:

[0045]

[0046] Specifically, in the process of calculating the constraint matrix, the non-zero elements in the mth row of A are multiplied by the elements in the mth row of x, and the sum is calculated to obtain the elements in the mth row of b; where m is an integer greater than zero. For example, the first row element P in b s1 You can use G S-I *P I +G S-I *P J +G S-I *D k get.

[0047] It should be noted that in the calculation process of the above constraint matrix, this application does not need to obtain the value of each element in the sparse matrix, but only needs to obtain the value of the non-zero element in the sparse matrix (for example, G S-I , G S-J), and multiply each non-zero element with each element in the target column vector and sum them. That is to say, when storing a sparse matrix, the present application only needs to store the values ​​of the non-zero elements in the sparse matrix, and the corresponding relationship between the position information of the non-zero elements. Especially when the area covered by the power system is large and the nodes are large, the size of the sparse matrix also increases. Since there is no need to allocate storage space for the zero elements that occupy a large number when storing a sparse matrix, only the non-zero elements that occupy a small number and their position information need to be stored, which greatly reduces the demand for storage space, thereby saving a lot of memory space. In addition, since the storage method of some sparse matrices allows dynamic addition or deletion of zero elements, and there is no need to reallocate the entire memory space, it not only improves flexibility, but also further reduces the waste of memory.

[0048] Among them, the present application does not specifically limit the storage format of the sparse matrix. The storage format of the sparse matrix may be related to the distribution of its non-zero elements, and the storage format of the sparse matrix includes at least one of the following: compressed sparse rows, compressed sparse columns, and coordinate lists. Exemplarily, when the distribution of non-zero elements in the sparse matrix is ​​irregular, the compressed sparse row format can be used to store the sparse matrix.

[0049] S104: construct a target model based on the constraint matrix.

[0050] After obtaining the constraint matrix, it can be understood that the constraint conditions for the target model are obtained. Among them, the constraint matrix can be used to constrain the expression of decision variables in the process of building the model. Among them, this application does not specifically limit the purpose of building the target model. Specifically, the target model can be used to obtain the allocation plan with the lowest power consumption, or it can be used to obtain the safest allocation plan. The specific method can be determined according to the actual situation, and this application does not limit it here.

[0051] The specific process of building the target model may include the following S1041-S1043:

[0052] S1041, create a solution environment.

[0053] Specifically, in this step, the solution environment is used to provide the computing resources and infrastructure necessary to solve the optimization problem. This includes but is not limited to hardware resources such as processors, memory, and storage devices, as well as software resources such as operating systems, programming languages, and optimization libraries. These resources together constitute the computing platform for solving the problem, enabling the target model to be constructed and solved.

[0054] The present application does not specifically limit the tools used in the solution environment, including but not limited to at least one of the following: COPT, GAMS, LINGO.

[0055] S1042, obtaining problem description information; wherein the problem description includes at least: decision variables, the constraint matrix and the objective function; wherein the constraint matrix is ​​used to constrain the value range of the expression of the decision variables.

[0056] Specifically, the decision variables can be understood as the problems to be solved, such as allocation quotas, production volume, etc. The elements in the constraint matrix usually represent the relationship between the decision variables and the constraints. For example, in linear programming, the elements of the constraint matrix can be understood as the constraints of the decision variables in practical applications, that is, the expressions used to constrain the decision variables. Among them, the expression form of the decision variables includes at least one of the following: continuous, integer, and binary variable. The objective function is usually an entity function, and its independent variable is the aforementioned decision variable, wherein the objective function includes at least one of the following: linear function and quadratic function. Different types of decision variables and objective functions can be selected according to the different goals of building the model. For example, when it is necessary to reduce the active power loss on the line by adjusting the output of the generator, the power of the generator can be selected as a continuous decision variable.

[0057] S1043, constructing the target model in the solution environment using the problem description information;

[0058] Based on the above problem description information, the target model can be built in the solution environment.

[0059] In summary, the present application obtains power data, calculates the constraint matrix, and uses the constraint matrix to construct the target model. The constraint matrix is ​​obtained based on a sparse matrix; each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system. Specifically, since the calculation process of the existing constraint matrix contains a large number of transfer distribution factors of 0, there is a sparse characteristic, and the prior art often uses dense matrices for calculation, and it is necessary to consider each element in the matrix. However, the present application uses a sparse matrix to construct a transfer distribution factor matrix. In the calculation process of the constraint matrix, only the non-zero elements in the sparse matrix need to be considered, thereby avoiding invalid calculations of a large number of zero elements. In this way, the resources and time required for model calculation can be significantly reduced. In addition, since there are fewer non-zero elements in the sparse matrix, the storage requirements for zero elements are reduced.

[0060] Among them, after obtaining the power data, the power data can also be preprocessed, wherein the preprocessing includes at least format conversion processing. Specifically, the power data in the power data can be displayed and stored in the form of a column vector (i.e., the target column vector is obtained), so as to facilitate subsequent calculations. Furthermore, the preprocessing can also include filtering processing, that is, removing obviously abnormal data in the power data, thereby reducing errors in the subsequent constraint matrix calculation process. After completing the preprocessing, the processed power data can be used to obtain the target column vector and sparse matrix.

[0061] It should be noted that the present application does not specifically limit the acquisition method of the above-mentioned sparse matrix. Specifically, the sparse matrix can be constructed using the database for constructing the target model. In this way, the resources consumed by data transmission can be reduced. Other devices can also be used to construct the sparse model, that is, the database for constructing the target model can be imported into the constraints of the entire set at one time, without the need for multiple, batch imports.

[0062] The above is a method for processing power data provided by the present application. The above embodiments can be freely combined according to actual conditions, and the present application does not limit them here.

[0063] In addition, the present application also provides a power data processing device 200, for details, please refer to Figure 2 ,like Figure 2 As shown, the device specifically includes:

[0064] The power data acquisition module 201 is used to acquire power data.

[0065] The sparse matrix construction module 202 is used to construct a sparse matrix based on the power data; wherein each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system.

[0066] The constraint matrix calculation module 203 is used to calculate the constraint matrix based on the sparse matrix and the power data; wherein each element in the constraint matrix is ​​used to characterize the section flow value in different areas of the power system; the constraint matrix is ​​calculated based on each non-zero element in the sparse matrix.

[0067] The target model building module 204 is used to build a target model based on the constraint matrix.

[0068] In an illustrative embodiment, the power data processing device 200 is also configured to obtain a target column vector based on the power data; at least some elements in the target column vector are used to characterize the output power of each node and / or generator in the power system; and the sparse matrix is ​​multiplied by the target column vector to obtain the constraint matrix.

[0069] In an illustrative embodiment, the power data processing device 200 is further configured to multiply the non-zero elements of each column of the mth row in the sparse matrix by the elements of the mth row in the target column vector, and sum them to obtain the elements of the mth row in the constraint matrix; wherein m is an integer greater than zero.

[0070] In an illustrative embodiment, the power data processing device 200 is also configured to create a solution environment; obtain problem description information; wherein the problem description information at least includes: decision variables, the constraint matrix and the objective function; wherein the constraint matrix is ​​used to constrain the value range of the expression of the decision variable; use the problem description information to construct the target model in the solution environment; wherein the objective function includes at least one of the following: linear function, quadratic function; the expression form of the decision variable includes at least one of the following: continuous type, integer type, binary variable type.

[0071] In an illustrative embodiment, the power data processing device 200 is further configured to pre-process the power data; wherein the pre-processing at least includes: format conversion processing; and constructing the sparse matrix using the pre-processed power data.

[0072] In an illustrative embodiment, the power data processing device 200 is also configured to store the correspondence between the non-zero elements in the sparse matrix and the position information of the non-zero elements; wherein the storage format of the sparse matrix includes at least one of the following: compressed sparse rows, compressed sparse columns, and coordinate lists.

[0073] In an illustrative embodiment, the power data processing device 200 is further configured to set the non-zero elements in the sparse matrix at specified positions of the constraint matrix; the specified positions include at least one of the following: a specified row, a specified column, and a specified diagonal.

[0074] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the functions of the aforementioned power data processing method and device, referring to Figure 3 , the electronic device comprises:

[0075] At least one processor 301, and a memory 302 connected to the at least one processor 301. The specific connection medium between the processor 301 and the memory 302 is not limited in the embodiment of the present application. Figure 3 In the example, the processor 301 and the memory 302 are connected via the bus 300. The bus 300 is connected to the memory 302 via the bus 300. Figure 3 The bus 300 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 300 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 301 can also be called a controller, and there is no limitation on the name.

[0076] In the embodiment of the present application, the memory 302 stores instructions that can be executed by at least one processor 301. The at least one processor 301 can execute the power data processing method discussed above by executing the instructions stored in the memory 302. The processor 301 can implement Figure 3 The functions of each module in the device shown.

[0077] Among them, the processor 301 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 302 and calling data stored in the memory 302, the various functions of the device and process data, the device can be monitored as a whole.

[0078] In one possible design, the processor 301 may include one or more processing units, and the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 301. In some embodiments, the processor 301 and the memory 302 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0079] The processor 301 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the power data processing method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0080] The memory 302 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 302 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 302 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 302 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0081] By designing and programming the processor 301, the code corresponding to the power data processing method described in the above embodiment can be fixed into the chip, so that the chip can execute the power data processing method when it is running. Figure 1 The steps of the power data processing method of the embodiment shown are as follows: How to design and program the processor 301 is a technology well known to those skilled in the art and will not be described in detail here.

[0082] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the power data processing method discussed above.

[0083] In some possible implementations, various aspects of the power data processing method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a device, the program code is used to enable the control device to execute the steps of the power data processing method according to various exemplary implementations of the present application described above in this specification.

[0084] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0085] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0088] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: The method comprises: Obtain power data; Based on the power data, a sparse matrix is ​​constructed; wherein each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system; Based on the sparse matrix and the power data, a constraint matrix is ​​calculated; wherein each element in the constraint matrix is ​​used to characterize the cross-sectional flow value of different areas in the power system; the constraint matrix is ​​calculated based on each non-zero element in the sparse matrix; Based on the constraint matrix, a target model is constructed.

2. The method according to claim 1, characterized in that: The step of calculating a constraint matrix based on the sparse matrix and the power data includes: Based on the power data, a target column vector is obtained; at least some elements in the target column vector are used to represent the output power of each node and / or generator in the power system; The sparse matrix is ​​multiplied by the target column vector to obtain the constraint matrix.

3. The method according to claim 2, characterized in that: The step of multiplying the sparse matrix by the target column vector to obtain the constraint matrix includes: The non-zero elements in each column of the mth row in the sparse matrix are multiplied with the elements in the mth row in the target column vector respectively, and the sum is calculated to obtain the elements in the mth row in the constraint matrix; wherein m is an integer greater than zero.

4. The method according to claim 1, characterized in that: The step of constructing a target model based on the constraint matrix includes: Create a solution environment; Acquire problem description information; wherein the problem description information at least includes: decision variables, the constraint matrix and the objective function; wherein the constraint matrix is ​​used to constrain the value range of the expression of the decision variables; Using the problem description information, construct the target model in the solution environment; Wherein, the objective function includes at least one of the following: a linear function, a quadratic function; The expression form of the decision variable includes at least one of the following: continuous type, integer type, and binary variable type.

5. The method according to claim 1, characterized in that: The step of calculating a constraint matrix based on the sparse matrix and the power data includes: Preprocessing the power data; wherein the preprocessing at least includes: format conversion processing; The sparse matrix is ​​constructed using the preprocessed power data.

6. The method according to claim 1, characterized in that: The non-zero elements in the sparse matrix are set at specified positions of the sparse matrix; the specified positions include at least one of the following: a specified row, a specified column, and a specified diagonal.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The corresponding relationship between the non-zero elements in the sparse matrix and the position information of the non-zero elements is stored; wherein the storage format of the sparse matrix includes at least one of the following: compressed sparse rows, compressed sparse columns, and coordinate lists.

8. A power data processing device, characterized in that: The device comprises: A power data acquisition module, used for acquiring power data; A sparse matrix construction module, used to construct a sparse matrix based on the power data; wherein each non-zero element in the sparse matrix is ​​used to characterize the transfer distribution factor of each node in the power system; A constraint matrix calculation module, used to calculate a constraint matrix based on the sparse matrix and the power data; wherein each element in the constraint matrix is ​​used to characterize the cross-sectional flow value of different areas in the power system; and the constraint matrix is ​​calculated based on each non-zero element in the sparse matrix; The target model building module is used to build the target model based on the constraint matrix.

9. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes any one of the methods in claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium comprises a program code, and when the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute any one of the methods described in claims 1 to 7.