A multi-dimensional storage method and system for power material data based on big data

By directly returning the data storage address, the delay problem of the CPU in acquiring data is solved, direct communication between the user and the storage device is realized, the efficiency of data acquisition and the working efficiency of the CPU are improved, and the problem of low data storage efficiency in the power system is solved. .

CN115167783BActive Publication Date: 2024-10-25GUIZHOU TONGCHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210927735.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-03
Publication Date
2024-10-25
Estimated Expiration
2042-08-03

AI Technical Summary

Technical Problem

In the power system, the existing technology causes the CPU to frequently communicate with the storage device to obtain data and address information and copy it to the temporary register, which delays the CPU's work and reduces the CPU's work efficiency.

Method used

By directly returning the data storage address to the user, the user can directly communicate with the storage device and obtain the corresponding data in the storage device, thereby improving the efficiency of data acquisition and improving the working efficiency of the CPU.

Benefits of technology

It improves data acquisition efficiency and CPU work efficiency, reduces CPU waiting time when acquiring data, and improves overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115167783B_ABST
    Figure CN115167783B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data storage, and specifically discloses a multi-dimensional storage method and system for power material data based on big data, comprising the following steps: obtaining a user request, wherein the user request includes a read request or a write request, wherein the read request is used to read the first data, and the write request is used to write the second data; determining the user request type, and when the user request type is a read request, searching for the first storage address of the first data, and when the user request type is a write request, generating the second storage address of the second data; returning the first storage address or the second storage address to the user, and establishing a connection between the user and the first storage node or the second storage node. The present invention returns the storage address of the data directly to the user, enables the user to communicate directly with the storage device, and obtains the data corresponding to the storage address in the storage device, thereby improving the data acquisition efficiency and the CPU working efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention specifically relates to the technical field of data storage, and in particular to a multi-dimensional storage method and system for electric power material data based on big data. Background Art

[0002] With the rapid development of my country's economy, power grid construction has also entered the fast lane of development. Technologies such as smart grid, ultra-high voltage, direct current transmission, and new energy have been vigorously developed. At present, the installation and use of various types of equipment in the power system are increasing. At the same time, the work of reducing staff and increasing efficiency in power companies continues to advance. The practical needs of comprehensively strengthening the allocation efficiency and management level of power materials and improving the reliability and effectiveness of highly elastic power grids are gradually becoming clear. The management of power engineering materials is closely related to the final profit, so strengthening material management is the main way to improve the economic benefits of construction projects.

[0003] Since the material data in the power system is of various types and huge in quantity, when using the storage server in the existing technology for data storage, the CPU of the storage server needs to communicate continuously with the storage device to obtain the data in the storage device and the corresponding data storage address. The CPU needs to copy the data and address information obtained each time from the data source (storage device) to the temporary register, and then return them to the user. During this time, the CPU cannot be used for other work, which causes CPU work delays and reduces the CPU work efficiency. Summary of the invention

[0004] The purpose of the present invention is to provide a multi-dimensional storage method and system for power material data based on big data, so as to solve the problem proposed in the above background technology that the CPU copies the data and address information obtained each time from the data source (storage device) to the temporary register, and then returns them to the user. During this time, the CPU cannot be used for other work, thereby causing CPU work delays and reducing the CPU's work efficiency.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method and system for storing multiple power material data based on big data, comprising the following steps:

[0007] S10, obtaining a user request, where the user request includes a read request or a write request, where the read request is used to read first data, and the write request is used to write second data;

[0008] S20, determining the user request type, and when the user request type is a read request, searching for a first storage address of the first data; and when the user request type is a write request, generating a second storage address of the second data;

[0009] S30, returning the first storage address or the second storage address to the user, and establishing a connection between the user and the first storage node or the second storage node, the first storage node having the first storage address, and the second storage node having the second storage address;

[0010] S40: Send the first data or write the second data.

[0011] As a further solution of the present invention: in step S20, the method for searching the first storage address of the first data includes the following steps:

[0012] Step S201, obtaining the first data name in the read request;

[0013] Step S202: determine a data retrieval result based on the first data name, wherein the data retrieval result is target data that matches the first data name and a storage address corresponding to the target data, and the storage address corresponding to the target data is the first storage address.

[0014] As a further solution of the present invention: in step S20, the method for generating the second storage address of the second data includes the following steps:

[0015] Step S211, obtaining the remaining disk space and disk space usage rate of each storage node in the storage module;

[0016] Step S212, calculate the remaining amount ratio based on the remaining amount of the disk space and calculate the usage ratio based on the disk space usage, select a target storage node according to the calculation results, and the storage address of the target storage node is the second storage address.

[0017] As a further solution of the present invention: in step S212, the proportion of the remaining disk space of the i-th storage node to the remaining storage space of the data storage module is:

[0018]

[0019] The ratio of the disk space usage of the i-th storage node to the storage space usage of the data storage module is:

[0020]

[0021] Where: n represents the number of storage nodes, P i represents the remaining disk space of the ith data node, Q i Indicates the disk space usage of the i-th data node;

[0022] The method for selecting the target storage node according to the calculation results is to build a storage node selection model:

[0023]

[0024] Wherein: k represents the weight, k (0≤k≤1), and the storage node i that satisfies the storage node selection model is the required second storage address.

[0025] As a further solution of the present invention: it also includes step S50, and the step S50 is used to determine the type of the second data, and delete or retain the second data based on the determination result.

[0026] As a further solution of the present invention: in step S50, the method for determining the second data type includes the following steps:

[0027] S51, constructing a type code database, wherein the type code database includes at least one type code for distinguishing data types;

[0028] S52, obtaining second data in the write request, where the second data includes a feature type code;

[0029] S53, comparing the characteristic type code with the type code in the type code database one by one, and determining the data type of the second data based on the comparison result;

[0030] S54: Perform a data operation based on the data type of the second data, wherein the data operation is deleting the data or retaining the data.

[0031] As a further solution of the present invention: the type codes stored in the type code database include: a first type code representing timed storage data, a second type code representing permanent storage data, and a third type code representing random storage data.

[0032] A multi-storage system for power material data based on big data, comprising:

[0033] The user module is used to send a read request, the read request is used to read the first data, and the read request includes the first data name; and is also used to send a write request, the write request is used to write the second data, and the write request includes the second data; and

[0034] Reading first data according to a first storage address or writing second data according to a second storage address;

[0035] A data access module, configured to obtain a first storage address of first data based on a read request, and send the first storage address to a user module; and to obtain a second storage address of second data based on a write request, and send the second storage address to the user module;

[0036] A data processing module, used to retrieve a first storage address of the first data and generate a second storage address of the second data; and also used to determine the data type of the second data and perform data operations based on the determination result;

[0037] The data storage module includes at least one data storage node, and the data storage node is used to store the first data and / or the second data.

[0038] As a further solution of the present invention: the data access module includes:

[0039] A receiving unit, configured to receive a read request or a write request; and further configured to receive a first storage address and a second storage address;

[0040] A sending unit, used to send a read request or a write request; and also used to send the first storage address and the second storage address to the user module;

[0041] The data temporary storage unit is used to store the first storage address and the second storage address.

[0042] As a further solution of the present invention: the data processing module includes:

[0043] A data acquisition unit, used to acquire a search condition for the first data, the search condition being the name of the first data; and also used to acquire the second data;

[0044] a determination unit, configured to determine a data retrieval result according to a retrieval condition of the first data, wherein the data retrieval result is target data in the data storage module that meets the retrieval condition and a storage address of the target data, wherein the target data is the first data and the storage address of the target data is the first storage address; and further configured to generate a second storage address of the second data;

[0045] a determination module, used for determining a data type of the second data, generating and executing an operation instruction based on a determination result, wherein the operation instruction is used for retaining or deleting the stored second data;

[0046] The data sending unit is used to send the first storage address and the second data.

[0047] Compared with the prior art, the beneficial effect of the present invention is that the present invention directly returns the storage address of the data to the user, allowing the user to communicate directly with the storage device and obtain the data of the corresponding storage address in the storage device, thereby improving the data acquisition efficiency and the CPU working efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The figure is a flow chart of a multivariate storage method for power material data based on big data.

[0049] Figure 2 This is a flow chart of step S20 in the multivariate storage method for electric power material data based on big data.

[0050] Figure 3 This is a further flow chart of step S20 in the multivariate storage method for electric power material data based on big data.

[0051] Figure 4 This is a flow chart of step S50 in the multivariate storage method for electric power material data based on big data.

[0052] Figure 5 This is a structural block diagram of the multi-storage system for power material data based on big data. DETAILED DESCRIPTION

[0053] 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] See also Figures 1 to 4 In an embodiment of the present invention, a multi-dimensional storage method for power material data based on big data is applied to a material data storage server of a power system, comprising the following steps:

[0055] S10, obtaining a user request, wherein the user request includes a read request or a write request, wherein the read request is used to read first data and includes a name of the first data, and the write request is used to write second data and includes the second data;

[0056] S20, determining the user request type, and when the user request type is a read request, searching for a first storage address of the first data; and when the user request type is a write request, generating a second storage address of the second data;

[0057] S30, returning the first storage address or the second storage address to the user, and establishing a connection between the user and the first storage node or the second storage node, the first storage node having the first storage address, and the second storage node having the second storage address;

[0058] S40: Send the first data or write the second data.

[0059] Since the material data in the power system is of various types and huge in quantity, when using the storage server in the prior art for data storage, the CPU of the storage server needs to communicate with the storage device continuously to obtain the data in the storage device and the corresponding data storage address. The CPU needs to copy the data and address information obtained each time from the data source (storage device) to the temporary register, and then return them to the user. During this time, the CPU cannot be used for other work, which causes CPU work delays and reduces the CPU's work efficiency. The present invention returns the storage address of the data directly to the user, allowing the user to communicate directly with the storage device to obtain the data corresponding to the storage address in the storage device, thereby improving the data acquisition efficiency and the CPU's work efficiency at the same time;

[0060] In step S20 of the embodiment of the present invention, the method for searching the first storage address of the first data includes the following steps:

[0061] Step S201, obtaining the first data name in the read request;

[0062] Step S202: determining a data retrieval result based on the first data name, wherein the data retrieval result is target data that matches the first data name and a storage address corresponding to the target data. It can be understood that the target data is the first data, and the storage address is the first storage address;

[0063] Further, in step S20 of the embodiment of the present invention, the method for generating the second storage address of the second data includes the following steps:

[0064] Step S211, obtaining the remaining disk space and disk space usage rate of each storage node in the storage module;

[0065] Step S212: Calculate the remaining amount ratio based on the remaining amount of the disk space and the utilization ratio based on the utilization ratio of the disk space, and select a target storage node according to the calculation result. The target storage node is the storage location of the second data, and the storage address of the target node is the second storage address.

[0066] Furthermore, in step S212, the ratio of the remaining disk space of the i-th storage node to the remaining storage space of the data storage module is expressed as:

[0067]

[0068] The ratio of the disk space usage of the i-th storage node to the storage space usage of the data storage module is expressed as:

[0069]

[0070] Where: n represents the number of storage nodes, Pi represents the remaining disk space of the ith data node, Q i Indicates the disk space usage of the i-th data node;

[0071] The method for selecting the target storage node based on the calculation results is to build a storage node selection model:

[0072]

[0073] Where: k represents the weight, k (0≤k≤1).

[0074] In the embodiment of the present invention, step S50 is further included, wherein step S50 is used to determine the type of the second data, and delete or retain the second data based on the determination result;

[0075] In addition, in step S50 of the embodiment of the present invention, the method for determining the second data type includes the following steps:

[0076] S51, constructing a type code database, wherein the type code database includes at least one type code for distinguishing data types;

[0077] S52, obtaining second data in the write request, where the second data includes a feature type code;

[0078] S53, comparing the characteristic type code with the type code in the type code database one by one, and determining the data type of the second data based on the comparison result;

[0079] S54, performing a data operation based on the data type of the second data, wherein the data operation is deleting the data or retaining the data;

[0080] Further, in an embodiment of the present invention, the type codes stored in the type code database include: a first type code representing timed storage data, a second type code representing permanent storage data, and a third type code representing random storage data, wherein the timed storage data is data with a deletion time T1 set by the user, the random storage data is data with a deletion time T2 set by the system, and the permanent storage data is data that is permanently retained, as shown in Table 1:

[0081] Table 1

[0082]

[0083] A user module 100, the user module 100 is used to send a read request, the read request is used to read the first data, the read request includes the first data name; and is also used to send a write request, the write request is used to write the second data, the write request includes the second data; and

[0084] Reading first data according to a first storage address or writing second data according to a second storage address;

[0085] A data access module 200, the data access module 200 is used to obtain a first storage address of first data based on a read request, and send the first storage address to the user module 100; and is also used to obtain a second storage address of second data based on a write request, and send the second storage address to the user module 100;

[0086] A data processing module 300, the data processing module 300 is used to retrieve a first storage address of the first data and generate a second storage address of the second data; and is also used to determine the data type of the second data and perform data operations based on the determination result;

[0087] The data storage module 400 includes at least one data storage node, and the data storage node is used to store the first data and / or the second data.

[0088] In the embodiment of the present invention, when the user module 100 accesses a file (sends a read request to read the first data), the access request containing the file name is first sent to the data access module 200, and the data access module 200 searches for the storage address information of the file through the data processing module 300, and then the data access module 200 feeds back the address information to the user module 100, and then the user module 100 directly establishes a connection with the corresponding data storage node and performs specific file reading and writing operations, thereby realizing direct connection between the user module 100 and the data storage node;

[0089] Furthermore, in the embodiment of the present invention, the data access module 200 includes:

[0090] The receiving unit 210 is used to receive a read request or a write request sent by the user module 100; and is also used to receive a first storage address and a second storage address sent by the data processing module 300;

[0091] The sending unit 220 is used to send a read request or a write request to the data processing module 300 to obtain the first storage address and the second storage address returned by the data processing module 300; and is also used to send the first storage address and the second storage address to the user module 100;

[0092] The data temporary storage unit 230 is used to store the first storage address and the second storage address.

[0093] In the embodiment of the present invention, the data processing module 300 includes:

[0094] The data acquisition unit 310 is used to acquire a search condition for the first data, where the search condition is the name of the first data; and is also used to acquire the second data;

[0095] The determining unit 320 is used to determine a data retrieval result according to the retrieval condition of the first data, wherein the data retrieval result is the target data in the data storage module 400 that meets the retrieval condition and the storage address of the target data, wherein the target data is the first data and the storage address of the target data is the first storage address; and is also used to generate a second storage address of the second data;

[0096] The judgment unit 330 is used to judge the data type of the second data, generate and execute an operation instruction based on the judgment result, and the operation instruction is used to retain or delete the stored second data. It should be noted that in the embodiment of the present invention, the deletion operation is not to delete directly, but to delete after saving for a period of time T. When executing the deletion operation, it is necessary to judge whether the storage time of the file reaches the deletion time T, and then delete it after reaching it. In this embodiment, the deletion time T1 is set by the user, and the deletion time T2 is set by the system, which is generally a shorter time value;

[0097] A data sending unit 340, configured to send a first storage address and second data;

[0098] Further, in an embodiment of the present invention, a method for generating a second storage address of second data is:

[0099] Assume that there are n storage nodes in the data storage module 400, P i represents the remaining disk space of the ith data node, Q i Indicates the disk space usage of the i-th data node;

[0100] Then, the proportion of the remaining disk space of the i-th storage node to the remaining storage space of the data storage module 400 is expressed as:

[0101]

[0102] The proportion of the disk space usage of the i-th storage node to the storage space usage of the data storage module 400 is expressed as:

[0103]

[0104] In order to maximize the disk usage, the larger the remaining disk space of the i-th storage node, the smaller the resource usage of the storage node. That is, the larger the remaining resource of the storage node, the greater the probability that the file data uploaded by the user will be allocated to the storage node. In order to make the influence of the remaining disk space of the storage node and the system resource occupancy rate controllable, the weight k (0≤k≤1) is set. Then, the comprehensive ratio of the remaining disk space and the disk space usage of the i-th storage node is:

[0105]

[0106] From the above formula, we can know that when k is smaller, the remaining amount of disk space of the i-th storage node has less influence on the remaining proportion of comprehensive space, and the disk space usage of the storage node has a greater influence on the remaining proportion of comprehensive disk space; conversely, when k is larger, the remaining amount of disk space of the i-th storage node has a greater influence on the remaining proportion of comprehensive space, and the disk space usage of the storage node has a smaller influence on the remaining proportion of comprehensive disk space. Therefore, the weight k can be used to adjust the influence of system occupancy and disk space remaining amount. Select a random number random, and satisfy 1≤random≤100, then the selection condition of i is:

[0107]

[0108] i that satisfies the above formula is the storage node with the best condition currently selected, and the address of the storage node is the second storage address.

[0109] In summary, the present invention returns the storage address of data directly to the user, allowing the user to communicate directly with the storage device and obtain the data corresponding to the storage address in the storage device, thereby improving data acquisition efficiency and improving the working efficiency of the CPU.

[0110] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0111] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A multi-dimensional storage method for power material data based on big data, characterized in that: The following steps are involved: S10, obtaining a user request, where the user request includes a read request or a write request, where the read request is used to read first data, and the write request is used to write second data; S20, determining the user request type, and when the user request type is a read request, searching for a first storage address of the first data, and when the user request type is a write request, generating a second storage address of the second data; The method for generating a second storage address of second data comprises the following steps: Step S211, obtaining the remaining disk space and disk space usage rate of each storage node in the storage module; Step S212: Calculate the remaining amount ratio based on the remaining amount of the disk space and calculate the usage ratio based on the disk space usage ratio, select a target storage node according to the calculation results, and the storage address of the target storage node is the second storage address, wherein the ratio of the remaining amount of the disk space of the i-th storage node to the remaining amount of the storage space of the data storage module is: The ratio of the disk space usage of the i-th storage node to the storage space usage of the data storage module is: Where: n represents the number of storage nodes, P i represents the remaining disk space of the ith data node, Q i Indicates the disk space usage of the i-th data node; The method of selecting a target storage node according to the calculation result includes: Calculate the comprehensive ratio of the remaining disk space and the disk space usage of the i-th storage node. The calculation formula is: Constructing a storage node selection model: Where: random is a random number, k represents a weight, k (0≤k≤1), and the storage node i that satisfies the storage node selection model is the second storage address required; S30, returning the first storage address or the second storage address to the user, and establishing a connection between the user and the first storage node or the second storage node, the first storage node having the first storage address, and the second storage node having the second storage address; S40: Send the first data or write the second data.

2. The multi-dimensional storage method for power material data based on big data according to claim 1 is characterized in that: In step S20, the method for searching the first storage address of the first data includes the following steps: Step S201, obtaining the first data name in the read request; Step S202: determine a data retrieval result based on the first data name, wherein the data retrieval result is target data that matches the first data name and a storage address corresponding to the target data, and the storage address corresponding to the target data is the first storage address.

3. The multi-dimensional storage method for power material data based on big data according to claim 1 is characterized in that: The method further includes step S50, wherein step S50 is used to determine the type of the second data, and delete or retain the second data based on the determination result.

4. The method for storing electric power material data in multiple dimensions based on big data according to claim 1, characterized in that: In addition, in step S50, the method for determining the second data type includes the following steps: S51, constructing a type code database, wherein the type code database includes at least one type code for distinguishing data types; S52, obtaining second data in the write request, where the second data includes a feature type code; S53, comparing the characteristic type code with the type code in the type code database one by one, and determining the data type of the second data based on the comparison result; S54: Perform a data operation based on the data type of the second data, wherein the data operation is deleting the data or retaining the data.

5. The method for storing electric power material data in multiple dimensions based on big data according to claim 4 is characterized in that: The type codes stored in the type code database include: a first type code representing timed storage data, a second type code representing permanent storage data, and a third type code representing random storage data.

6. A multi-dimensional storage system for power material data based on big data, characterized in that: The system is used to execute the steps of the multivariate storage method of power material data based on big data according to any one of claims 1 to 5, and the system comprises: The user module is used to send a read request, the read request is used to read the first data, and the read request includes the first data name; and is also used to send a write request, the write request is used to write the second data, and the write request includes the second data; and Reading first data according to a first storage address or writing second data according to a second storage address; A data access module, configured to obtain a first storage address of first data based on a read request, and send the first storage address to a user module; and to obtain a second storage address of second data based on a write request, and send the second storage address to the user module; A data processing module, used to retrieve a first storage address of the first data and generate a second storage address of the second data; and also used to determine the data type of the second data and perform data operations based on the determination result; The data storage module includes at least one data storage node, and the data storage node is used to store the first data and / or the second data.

7. The multi-dimensional storage system for electric power material data based on big data according to claim 6 is characterized in that: The data access module includes: A receiving unit, configured to receive a read request or a write request; and further configured to receive a first storage address and a second storage address; A sending unit, used to send a read request or a write request; and also used to send the first storage address and the second storage address to the user module; The data temporary storage unit is used to store the first storage address and the second storage address.

8. The multi-dimensional storage system for electric power material data based on big data according to claim 7 is characterized in that: The data processing module comprises: A data acquisition unit, used to acquire a search condition for the first data, the search condition being the name of the first data; and also used to acquire the second data; a determination unit, configured to determine a data retrieval result according to a retrieval condition of the first data, wherein the data retrieval result is target data in the data storage module that meets the retrieval condition and a storage address of the target data, wherein the target data is the first data and the storage address of the target data is the first storage address; and further configured to generate a second storage address of the second data; a determination module, used for determining a data type of the second data, generating and executing an operation instruction based on a determination result, wherein the operation instruction is used for retaining or deleting the stored second data; The data sending unit is used to send the first storage address and the second data.