A multivariate big data storage method
Through diversified strategies for allocating and storing data in big data storage methods, combined with encryption and blockchain technology, the problems of complex operations, poor data security and data consistency in existing big data storage methods are solved, achieving high efficiency and security. and consistent data storage.
Patent Information
- Application Number
- CN202411288659.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-14
AI Technical Summary
The existing big data storage methods are complex in operation, poor data security, large access delays, and cannot effectively ensure the consistency of data between different nodes.
Adopting a multi-dimensional big data storage method, by obtaining user ID numbers and data characteristics, allocate data into hot data, read temperature data, write temperature data and cold data, and allocate storage locations for hot data according to server parameters, using encryption and blockchain Technology ensures data security and consistency.
It improves the efficiency and security of data storage, reduces data access latency, supports dynamic expansion of storage capacity and computing resources, and ensures data consistency among different storage nodes.
Smart Images

Figure CN118796137B_ABST
Abstract
Description
Technical Field
[0001] The present invention discloses a multivariate big data storage method, which relates to the field of data storage. Background Art
[0002] Existing big data storage methods have the following shortcomings:
[0003] Complex operation: Most existing big data storage methods involve local storage, which requires manual adjustment based on the remaining storage size of the local server. There is a high demand for professionals and there is a certain dependence on hardware or software.
[0004] Data security and access delay: In the process of distributed storage, the existing big data storage methods have a simple division logic of data distribution storage nodes and a small number of nodes, which makes data easy to be stolen and transferred, which is not conducive to the long-term storage of data. At the same time, too many nodes will also cause certain delays in data access.
[0005] Data consistency: Existing big data storage methods cannot ensure the consistency of data transmission between different nodes, and require complex data synchronization and coordination mechanisms. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention aims to provide a multivariate big data storage method to solve the problem of low data storage efficiency.
[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions: A multivariate big data storage method includes:
[0008] Step S1: Obtain the user ID number of the data to be stored, and obtain the number of data to be stored corresponding to each user ID number; obtain the data size, access times and modification times corresponding to each data to be stored, and obtain allocation parameters; according to the allocation parameters, divide the data to be stored into hot data, read temperature data, write temperature data and cold data;
[0009] Step S2: Obtain the number of local servers, obtain the remaining memory size, network bandwidth and CPU main frequency of each server, and obtain server parameters;
[0010] Allocate servers for hot data according to server parameters, store the hot data in local servers, and determine whether the local servers can store all the hot data;
[0011] If possible, all hot data and part of the warm write data are encrypted and stored in the local server, and the other part of the warm write data is used as the remaining write data;
[0012] If not, part of the hot data is encrypted and stored in the local server, and the other part of the hot data is used as hot redundant data;
[0013] Step S3: Summarize the hot surplus data, write surplus data and read temperature data as unstored data; create two spaces in the cloud data platform, namely space a and space b; store the unstored data in space a, store the index of the unstored data in space b, return the access interface of space b to the local server, and encrypt the interface number of the access interface with the user ID number;
[0014] Encrypt and split the cold data and construct a Merkle tree; store the cold data in the blockchain according to the node structure of the Merkle tree;
[0015] Step S4: Continuously obtain the data to be stored, and update the data to be stored stored in the local server and the cloud server.
[0016] Furthermore, the specific steps of step S1 are as follows:
[0017] Step S11: Count the number of user ID numbers, denoted as so;
[0018] Step S12: dividing the data to be stored corresponding to the first user ID number into hot data, read temperature data, write temperature data and cold data;
[0019] Step S13: Process the data to be stored corresponding to the 2nd to soth user ID numbers and divide them into hot data, read temperature data, write temperature data and cold data, and enter step S2.
[0020] Furthermore, the specific steps of step S12 are as follows:
[0021] Step S121: The data to be stored corresponding to the first user ID number is used as the data to be classified; the number of the data to be classified is counted, and recorded as fn;
[0022] Get the size of each data to be classified, denoted as b1, b2~b fn ;
[0023] Among them, b1 represents the size of the first data to be classified; b2 represents the size of the second data to be classified; and so on. fn Indicates the size of the fnth data to be classified;
[0024] Step S122: Obtain the number of accesses and the number of modifications of the data to be classified;
[0025] Summarize the number of accesses and modifications of the 1st to fnth data to be classified, and record them as r1, r2 to r fn and w1, w2~w fn ;
[0026] Among them, r1 and w1 represent the number of accesses and modifications of the first data to be classified, respectively; r2 and w2 represent the number of accesses and modifications of the second data to be classified, respectively; and so on. fn and w fn , respectively represent the number of accesses and modifications of the fnth data to be classified;
[0027] Step S123: Summarize the data obtained in steps S121 to S122 as allocation parameters; and divide the data to be classified into hot data, warm data and cold data according to the allocation parameters;
[0028] Step S124: Calculate r1~r fn The average value is denoted as ar; calculate w1~w fn The average value of b1~b fn The average value of is denoted as ab;
[0029] Extract r1~r fn The maximum value in is denoted as r max , the minimum value is denoted as r min ;
[0030] Extract w1~w fn The maximum value in is denoted as w max , the minimum value is denoted as w min ;
[0031] Definition of relation 1: (r i +w i )×b i ≥ (ar×aw) 1 / 2 ×ab; where i is a positive integer, and the value range of i is: 1~fn; r i represents the number of accesses to the i-th data to be classified, w i Indicates the number of times the i-th data to be classified has been modified; b i Indicates the size of the i-th data to be classified;
[0032] Step S125: r1~r fn and w1~w fn , substitute into equation 1;
[0033] Summarize the data to be classified that do not satisfy equation 1 as cold data; count the number of cold data, recorded as cmn;
[0034] The data to be classified that satisfies equation 1 are summarized as non-cold data.
[0035] Furthermore, the subsequent steps of step S125 are as follows:
[0036] Step S126: Define relation 2: (r j +r min )>2×ar;
[0037] Definition of relation 3: (w j +w min )>2×aw;
[0038] Wherein, j is a positive integer, and the value range of j is: 1~(fn-cmn); w j represents the number of accesses to the jth non-cold data; r j Indicates the number of modifications of the jth non-cold data;
[0039] Substitute the access count and modification count corresponding to non-cold data into equations 2 and 3;
[0040] Summarize the non-cold data that satisfies both equation 2 and equation 3 as hot data; count the number of hot data, recorded as wmn;
[0041] Only the non-cold data that satisfies equation 2 are summarized as data a; the number of statistical data a is recorded as nn;
[0042] Only the non-cold data that satisfy equation 3 are summarized as data b; the number of statistical data b is recorded as ny;
[0043] Step S127: Define equation 4: (w p +w max )>2×aw;
[0044] Definition of relation 5: (r q +r max )>2×ar;
[0045] Where p is a positive integer, and the value range of p is: 1~nn; w p Indicates the number of times the pth data a is modified;
[0046] q is a positive integer, and the value range of q is: 1~ny; r q Indicates the number of accesses to the qth data b;
[0047] Step S128: Substitute the modification times corresponding to data a into equation 4, and substitute the access times corresponding to data b into equation 5;
[0048] The data a that meets the relational expression 4 is summarized as the read temperature data, and the data a that does not meet the relational expression 4 is summarized as the write temperature data.
[0049] The data b that meets the relational expression 5 is summarized as the write temperature data, and the data b that does not meet the relational expression 5 is summarized as the read temperature data;
[0050] The number of temperature reading data is recorded as smn, and the number of temperature writing data is recorded as snn.
[0051] Furthermore, the specific steps of step S2 are as follows:
[0052] Step S21: Obtain the number of local servers, denoted as se;
[0053] Get the remaining memory size corresponding to each local server, recorded as fm1, fm2~fm se ;
[0054] Network bandwidth, denoted as ba1, ba2~ba se ;
[0055] CPU main frequency, recorded as df1, df2~df se ;
[0056] Among them, fm1, ba1 and df1 respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the first local server; fm2, ba2 and df2 respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the second local server; and so on. se ,ba se and df se , respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the se-th local server;
[0057] Summarize fm1~fm se ,ba1~ba se and df1~df se , as server parameters;
[0058] Step S22: Calculate the performance parameter of the first local server, denoted as pp(1). The calculation formula of pp(1) is as follows:
[0059] pp(1) = (ba1 × df1) 1 / 2 ×fm1;
[0060] Calculate the performance parameter of the second local server, denoted as pp(2). The calculation formula of pp(2) is as follows:
[0061] pp(2) = (ba2 × df2) 1 / 2 ×fm2;
[0062] Similarly, the performance parameter of the se-th local server is calculated, recorded as pp(se), and the calculation formula of pp(se) is as follows:
[0063] pp(se)=(ba se ×df se )1 / 2 ×fm se ;
[0064] Step S23: Arrange the local servers in descending order of pp(1) to pp(se) to obtain a server sequence;
[0065] Calculate fm1~fm se The sum of is denoted as afm;
[0066] Summarize the total size of the hot data corresponding to the 1st to the soth user ID numbers, recorded as ab1, ab2~ab so ;
[0067] Where ab1 represents the total size of the hot data corresponding to the first user ID number;
[0068] ab2 represents the total size of the hot data corresponding to the second user ID number;
[0069] By analogy, ab se Indicates the total size of the hot data corresponding to the so-th user ID number.
[0070] Furthermore, the subsequent steps of step S23 are as follows:
[0071] Step S24: Calculate ab1~ab so The sum of is recorded as abb; determine the size of afm and abb;
[0072] If afm>abb, the hot data corresponding to the 1st to the soth user ID numbers are encrypted using the RAS algorithm, and the hot data are stored in the local server, and the process goes to step S25;
[0073] If afm≤abb, a portion of the hot data is encrypted using the RAS algorithm, and according to the server sequence, a portion of the hot data is stored in the local server; the other portion of the hot data is used as hot residual data, and the process proceeds to step S26;
[0074] Step S25: taking the hot data corresponding to the first user ID number as the hot data to be encrypted; and encrypting the hot data to be encrypted using the RAS algorithm;
[0075] All encrypted hot data and part of the warm write data are stored in the local server, and the other part of the warm write data is used as the remaining write data;
[0076] Step S26: Define the relation 22: ; Where q is a positive integer, and the value range of q is: 2~eo; ab i represents the total size of hot data corresponding to the ith user ID number; ab(1-q) represents the cumulative sum of the total size of hot data corresponding to the 1st to qth user ID numbers;
[0077] ab1~ab so Substitute into equation 22, find the first user ID number that does not satisfy equation 22, denoted as bso;
[0078] Repeat the same steps of storing all encrypted hot data in the local server, and store the 1st to bso-th write temperature data in the local server; take the hot data corresponding to the (bso+1)th to so-th user ID numbers as hot residual data, and enter step S3.
[0079] Furthermore, the specific steps of step S25 are as follows:
[0080] Step S251: Use the hash algorithm to process the first user ID number to obtain the hash value of the first user ID number, denoted as hn;
[0081] Step S252: using the Mersenne Twister algorithm, randomly generate two positive prime numbers, denoted as pr1 and pe2;
[0082] pr1 and pe2 meet the following conditions:
[0083] {lim[(pr1+pe2) / hn]→1}∩(pr1+pe2) min ;
[0084] Step S253: Calculate the Euler number of hn, denoted as φ(hn), φ(hn)=(pr1-1)×(pr2-1);
[0085] Randomly generate an integer e less than φ(hn) such that gcd(e, φ(hn)) = 1 (i.e., e and φ(hn) are mutually prime), and e is the public key; where gcd represents the greatest common divisor;
[0086] Calculate the modular inverse d of e with respect to φ(hn), d = e (φ(hn)-2) , d is the private key;
[0087] Step S254: encrypt the hot data to be encrypted using the public key e to obtain an encrypted hot data set 1;
[0088] Step S255: repeat the same steps of encrypting the hot data of the first user ID number, encrypt the hot data corresponding to the second to the osth user ID numbers, and obtain encrypted hot data set 2 to encrypted hot data set os;
[0089] Step S256: Calculate the data size corresponding to the encrypted hot data set 1 to the encrypted hot data set os, denoted as bj1, bj2~bj os; where bj1 represents the sum of the data sizes in encrypted hot dataset 1; bj2 represents the sum of the data sizes in encrypted hot dataset 2; and so on, bj os Represents the sum of the data sizes in the encrypted hot dataset os;
[0090] Transfer encrypted hot dataset 1 to encrypted hot dataset os according to bj1~bj os Arrange in descending order to obtain the sequence A to be stored;
[0091] The encrypted hot data sets corresponding to the sequence A to be stored are stored in the local server in sequence according to the server sequence;
[0092] Step S257: Summarize the total size of the temperature writing data corresponding to the 1st to the soth user ID numbers, and record them as bb1, bb2~bb so ;
[0093] Among them, bb1 represents the total size of the temperature writing data corresponding to the first user ID number;
[0094] bb2 indicates the total size of the temperature write data corresponding to the second user ID number;
[0095] By analogy, bb se Indicates the total size of the temperature write data corresponding to the so-th user ID number;
[0096] Define relation 21: ; Where p is a positive integer, and the value range of p is: 2~eo; bb i represents the total size of the temperature writing data corresponding to the i-th user ID number; bb(1-p) represents the cumulative sum of the total size of the temperature writing data corresponding to the 1st to the pth user ID numbers;
[0097] Step S258: bb1~bb so Substitute it into equation 21, find the first user ID number that does not satisfy equation 21, and record it as aso;
[0098] Repeat steps S251 to S256, store the 1st to asoth temperature writing data in the local server; and use the temperature writing data corresponding to the (aso+1)th to soth user ID numbers as the remaining writing data.
[0099] Furthermore, the specific steps of step S3 are as follows:
[0100] Step S31: Summarize the thermal residual data, the write residual data and the temperature reading data as unstored data;
[0101] Create two spaces in the cloud data platform, namely space a and space b; store the temperature reading data in the cloud data platform;
[0102] Step S32: Repeat the same step of storing the temperature reading data in the cloud data platform, and store the hot surplus data and the write surplus data in the cloud data platform;
[0103] Step S33: Decentralize and segment the cold data, and construct a Merkle tree; store the cold data in the blockchain according to the node structure of the Merkle tree, and provide the local server with an access interface to the blockchain.
[0104] Furthermore, the specific steps of step S31 are as follows:
[0105] Step S311: Obtain the network bandwidth of each local server, recorded as ba1, ba2~ba se ; se represents the number of local servers;
[0106] The extracted maximum value is recorded as bam, the minimum value is recorded as bal, and the mode is recorded as baz;
[0107] Define the relationship 31: (lim (ba i / bam)) → 1;
[0108] Relation 32: (lim (ba i / bal)) → 1;
[0109] Relation 33: (lim (ba i / baz)) → 1;
[0110] Where i is a positive integer, and the value range of i is: 1~se; ba i represents the network bandwidth of each local server of the ith server;
[0111] Change ba1~ba se Substituting into equations 31 to 33, count the number of equations that satisfy equation 31, denoted as baa; the number of equations that satisfy equation 32, denoted as bab; the number of equations that satisfy equation 33, denoted as bac;
[0112] Step S312: Calculate the maximum value proportion coefficient, denoted as a1, a1=baa / se; the minimum value proportion coefficient, denoted as a2, a2=bab / se; the mode proportion coefficient, denoted as a3, a3=bac / se;
[0113] Calculate ba1~ba se The average value is denoted as aba;
[0114] The weighted bandwidth of the local server is recorded as qba; the size of a3 and 0.5 is determined to determine the value of qba;
[0115] If qba<0.5, the calculation formula of qba is as follows:
[0116] ;
[0117] If qba ≥ 0.5, the value of qba is baz;
[0118] Step S313: record the first user ID number as the target ID; record the temperature reading data corresponding to the first user ID number as the target data;
[0119] According to qba, the target data is stored in space a, and the index corresponding to the target data is stored in space b;
[0120] Get the length of the target ID, recorded as sl;
[0121] Let the square root of sl be sr, and perform continuous square root operations on sl until the result of sr is in the interval (0,10), and sr is rounded up;
[0122] Step S314: Divide the target data into sr units of data;
[0123] Randomly select an address with empty storage space in space a as target address 1; store the first unit data into the space corresponding to target address 1;
[0124] Create a linked list structure in space b, recorded as chain L; store the address value of target address 1 into the first node in chain L; the predecessor of the first node is null;
[0125] Step S315: record the address value of target address 1 as adi(1);
[0126] The address value in the judgment space a is (adi(1)±y×2 sr ) is empty;
[0127] If it is not empty, the address value is (adi(1)±y×2 sr ) as the target address 2, and store the second unit data into the space corresponding to the target address 2; and store the address value corresponding to the target address 2 into the second node in the chain L. The successor of the first node is: the address value corresponding to the target address 2, and the predecessor of the second node is: adi (1);
[0128] If it is empty, y is incremented by 1, and the address of an empty storage space in space a is continued to be searched as the target address 2;
[0129] Wherein, y represents the surge coefficient, y is a natural number, and the initial value of y is 1.
[0130] Furthermore, the subsequent steps of step S315 are as follows:
[0131] Step S316: record the address value of target address 2 as adi(2);
[0132] The address value in the judgment space a is (adi(2)±y×2 sr ) is empty;
[0133] If it is not empty, the address value is (adi(2)±y×2 sr ) as the target address 3, and store the third unit data into the space corresponding to the target address 3; and store the address value corresponding to the target address 3 into the third node in the chain L, the successor of the second node is: the address value corresponding to the target address 3, and the predecessor of the third node is: adi (2);
[0134] If it is empty, y is incremented by 1, and the address of an empty storage space in space a is continued to be searched as the target address 3;
[0135] Step S317: repeat steps S315 to S316, store the 4th to srth unit data in space a, the predecessor of the srth node in chain L is: the address value storing the (sr-1)th unit data in space a, and the successor of the srth node is: null;
[0136] Step S318: Return the access interface of space b to the local server, and encrypt the interface number of the access interface using the DES encryption algorithm with the target ID as the key;
[0137] Determine the data transmission rate between the 1st to srth unit data;
[0138] Step S3181: Set the data transmission rate of the first unit data to the local server to: qba;
[0139] Get the fastest data transmission rate of the cloud data platform, recorded as dtv1; the slowest data transmission rate, recorded as dtv2;
[0140] Calculate the change in the unit data transmission rate of the cloud data platform, recorded as Δdtv, and the calculation formula of Δdtv is as follows:
[0141] Δdtv=(dtv1-dtv2) 1 / sr ;
[0142] Step S3182: Assume that the storage address value of the i-th unit data in space a is adi(i), where i is a positive integer and the value range of y is: i~sr;
[0143] Assume that the data transmission rate of the i-th unit data to the local server is: dtv(i), and the calculation formula of dtv(i) is as follows:
[0144] ;The maximum value of dtv(i) is dtv1.
[0145] Compared with the prior art, the present invention has the following beneficial effects:
[0146] Efficiency and scalability: The present invention adopts a distributed storage architecture that can efficiently process large-scale data and improve data access efficiency; at the same time, the present invention supports dynamic expansion of storage capacity and computing resources to adapt to the rapid growth of data volume, and new storage nodes can be added without downtime.
[0147] Flexibility: The present invention can support multi-user data storage. During the data storage process, the data is divided according to the user's data usage habits and stored in different storage methods, which ensures data security without affecting the user's daily use.
[0148] Data consistency and integrity: The present invention utilizes a synchronization mechanism to manage data stored in the cloud platform, ensuring data consistency across different storage nodes and avoiding erroneous decisions caused by inconsistent data. BRIEF DESCRIPTION OF THE DRAWINGS
[0149] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0150] Figure 1 It is a schematic diagram of the method of the present invention;
[0151] Figure 2 It is a data schematic diagram of the present invention;
[0152] Figure 3 A logical schematic diagram is stored for the present invention. DETAILED DESCRIPTION
[0153] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0154] See also Figure 1 A multivariate big data storage method includes:
[0155] It should be noted that because the method of "directly scanning the user's PC to obtain data" will infringe the user's privacy, the present invention adopts the method of "user authorized scanning" to obtain data;
[0156] The implementation steps of the "User Authorization Scan" method are as follows:
[0157] Step Ⅰ: The user creates a folder named "Files to be stored" on the PC and saves the absolute path of the "Files to be stored (folder)";
[0158] Step II: The user stores the user ID number and the data or files to be protected by the present invention in the "files (folders) to be stored" as data to be classified;
[0159] User ID number: used to distinguish the data source of the data to be classified;
[0160] Step III: The present invention automatically searches for the "file (folder) to be stored" through the absolute path, and then reads the data or files in the "file (folder) to be stored" to obtain the data to be classified;
[0161] Step S1: Obtain the user ID number of the data to be stored, and obtain the number of data to be stored corresponding to each user ID number; obtain the data size, access times and modification times corresponding to each data to be stored, and obtain allocation parameters; according to the allocation parameters, divide the data to be stored into hot data, read temperature data, write temperature data and cold data;
[0162] The specific steps of step S1 are as follows:
[0163] Step S11: Count the number of data sources of the data to be classified (i.e., the number of user ID numbers in the "files (folders) to be stored"), recorded as so;
[0164] Step S12: dividing the data to be stored corresponding to the first user ID number into hot data, read temperature data, write temperature data and cold data;
[0165] Step S121: The data to be stored corresponding to the first user ID number is used as the data to be classified; the number of the data to be classified is counted, and recorded as fn;
[0166] Get the size of each data to be classified, denoted as b1, b2~b fn ;
[0167] Among them, b1 represents the size of the first data to be classified; b2 represents the size of the second data to be classified; and so on. fn Indicates the size of the fnth data to be classified;
[0168] Step S122: load the io library; use the IOException module in the io library to obtain the number of accesses and the number of modifications of the data to be classified;
[0169] Summarize the number of accesses and modifications of the 1st to fnth data to be classified, and record them as r1, r2 to r fn and w1, w2~w fn ;
[0170] Among them, r1 and w1 represent the number of accesses and modifications of the first data to be classified, respectively; r2 and w2 represent the number of accesses and modifications of the second data to be classified, respectively; and so on. fn and w fn , respectively represent the number of accesses and modifications of the fnth data to be classified;
[0171] Step S123: Summarize the data obtained in steps S121 to S122 as allocation parameters; and divide the data to be classified into hot data, warm data and cold data according to the allocation parameters;
[0172] Step S124: Calculate r1~r fn The average value is denoted as ar; calculate w1~w fn The average value of b1~b fn The average value of is denoted as ab;
[0173] Extract r1~r fn The maximum value in is denoted as r max , the minimum value is denoted as r min ;
[0174] Extract w1~w fn The maximum value in is denoted as w max , the minimum value is denoted as w min ;
[0175] Definition of relation 1: (r i +w i )×b i ≥ (ar×aw) 1 / 2 ×ab; where i is a positive integer, and the value range of i is: 1~fn; r i represents the number of accesses to the i-th data to be classified, w i Indicates the number of times the i-th data to be classified has been modified; b i Indicates the size of the i-th data to be classified;
[0176] Step S125: r1~r fn and w1~w fn , substitute into equation 1;
[0177] Summarize the data to be classified that do not satisfy equation 1 as cold data; count the number of cold data, recorded as cmn;
[0178] Summarize the data to be classified that satisfy equation 1 as non-cold data;
[0179] Step S126: Define relation 2: (r j +r min)>2×ar;
[0180] Definition of relation 3: (w j +w min )>2×aw;
[0181] Wherein, j is a positive integer, and the value range of j is: 1~(fn-cmn); w j represents the number of accesses to the jth non-cold data; r j Indicates the number of modifications of the jth non-cold data;
[0182] Substitute the access count and modification count corresponding to non-cold data into equations 2 and 3;
[0183] Summarize the non-cold data that satisfies both equation 2 and equation 3 as hot data; count the number of hot data, recorded as wmn;
[0184] Only the non-cold data that satisfies equation 2 are summarized as data a; the number of statistical data a is recorded as nn;
[0185] Only the non-cold data that satisfy equation 3 are summarized as data b; the number of statistical data b is recorded as ny;
[0186] Step S127: Define equation 4: (w p +w max )>2×aw;
[0187] Definition of relation 5: (r q +r max )>2×ar;
[0188] Where p is a positive integer, and the value range of p is: 1~nn; w p Indicates the number of times the pth data a is modified;
[0189] q is a positive integer, and the value range of q is: 1~ny; r q Indicates the number of accesses to the qth data b;
[0190] Step S128: Substitute the modification times corresponding to data a into equation 4, and substitute the access times corresponding to data b into equation 5;
[0191] The data a that meets the relational expression 4 is summarized as the read temperature data, and the data a that does not meet the relational expression 4 is summarized as the write temperature data.
[0192] The data b that meets the relational expression 5 is summarized as the write temperature data, and the data b that does not meet the relational expression 5 is summarized as the read temperature data;
[0193] The number of temperature reading data is recorded as smn, and the number of temperature writing data is recorded as snn;
[0194] Step S13: Repeat the same steps of classifying the data to be classified corresponding to the first user ID number into hot data, warm data and cold data (i.e., steps S121 to S121), process the data to be stored corresponding to the second to so-th user ID numbers into hot data, read-temperature data, write-temperature data and cold data, and enter step S2.
[0195] Step S2: Obtain the number of local servers, obtain the remaining memory size, network bandwidth and CPU main frequency of each (local) server, and obtain server parameters;
[0196] Allocate servers for hot data according to server parameters, store hot data in local servers, and determine whether the local server can store (all) hot data;
[0197] If possible, (all) hot data and part of the warm write data are encrypted and stored in the local server, and the other part of the warm write data is used as the remaining write data;
[0198] If not, part of the hot data is encrypted and stored in the local server, and the other part of the hot data is used as hot redundant data;
[0199] See also Figure 2 and Figure 3 , the specific steps of step S2 are as follows:
[0200] Step S21: Obtain the number of local servers, denoted as se;
[0201] Get the remaining memory size corresponding to each local server, recorded as fm1, fm2~fm se ;
[0202] Network bandwidth, denoted as ba1, ba2~ba se ;
[0203] CPU main frequency, recorded as df1, df2~df se ;
[0204] Among them, fm1, ba1 and df1 respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the first local server; fm2, ba2 and df2 respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the second local server; and so on. se ,ba se and df se , respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the se-th local server;
[0205] Summarize fm1~fm se ,ba1~ba seand df1~df se , as server parameters;
[0206] Step S22: Calculate the performance parameter of the first local server, denoted as pp(1). The calculation formula of pp(1) is as follows:
[0207] pp(1) = (ba1 × df1) 1 / 2 ×fm1;
[0208] Calculate the performance parameter of the second local server, denoted as pp(2). The calculation formula of pp(2) is as follows:
[0209] pp(2) = (ba2 × df2) 1 / 2 ×fm2;
[0210] Similarly, the performance parameter of the se-th local server is calculated, recorded as pp(se), and the calculation formula of pp(se) is as follows:
[0211] pp(se)=(ba se ×df se ) 1 / 2 ×fm se ;
[0212] Step S23: Arrange the local servers in descending order of pp(1) to pp(se) to obtain a server sequence;
[0213] Calculate fm1~fm se The sum of is denoted as afm;
[0214] Summarize the total size of (all) hot data corresponding to the 1st to the soth user ID numbers, recorded as ab1, ab2~ab so ;
[0215] Where ab1 represents the total size of (all) hot data corresponding to the first user ID number;
[0216] ab2 represents the total size of (all) hot data corresponding to the second user ID number;
[0217] By analogy, ab se Indicates the total size of (all) hot data corresponding to the so-th user ID number;
[0218] Step S24: Calculate ab1~ab so The sum of is recorded as abb; determine the size of afm and abb;
[0219] If afm>abb, the hot data corresponding to the 1st to the soth user ID numbers are encrypted using the RAS algorithm, and the hot data are stored in the local server, and the process goes to step S25;
[0220] If afm≤abb, a portion of the hot data is encrypted using the RAS algorithm, and according to the server sequence, a portion of the hot data is stored in the local server; the other portion of the hot data is used as hot residual data, and the process proceeds to step S26;
[0221] Step S25: taking the hot data corresponding to the first user ID number as the hot data to be encrypted; and encrypting the hot data to be encrypted using the RAS algorithm;
[0222] All encrypted hot data and part of the warm write data are stored in the local server, and the other part of the warm write data is used as the remaining write data;
[0223] Step S251: Use the hash algorithm to process the first user ID number to obtain the hash value of the first user ID number, denoted as hn;
[0224] Step S252: using the Mersenne Twister algorithm, randomly generate two positive prime numbers, denoted as pr1 and pe2;
[0225] pr1 and pe2 meet the following conditions:
[0226] {lim[(pr1+pe2) / hn]→1}∩(pr1+pe2) min ;
[0227] Step S253: Calculate the Euler number of hn, denoted as φ(hn), φ(hn)=(pr1-1)×(pr2-1);
[0228] Randomly generate an integer e less than φ(hn) such that gcd(e, φ(hn)) = 1 (i.e., e and φ(hn) are mutually prime), and e is the public key; where gcd represents the greatest common divisor;
[0229] Calculate the modular inverse d of e with respect to φ(hn), d = e (φ(hn)-2) , d is the private key;
[0230] Step S254: Use the public key e to encrypt (all) the hot data to be encrypted to obtain an encrypted hot data set 1; (When the user accesses the hot data corresponding to the first user ID number, the private key d is used to decrypt the encrypted hot data set;)
[0231] Step S255: repeat the same steps of encrypting (all) hot data of the first user ID number, encrypt (all) hot data corresponding to the second to the osth user ID numbers, and obtain encrypted hot data set 2 to encrypted hot data set os;
[0232] Step S256: Calculate the data size corresponding to the encrypted hot data set 1 to the encrypted hot data set os, denoted as bj1, bj2~bj os ; Where bj1 represents the sum of the sizes of (all) data (i.e., encrypted hot data) in encrypted hot data set 1; bj2 represents the sum of the sizes of (all) data (i.e., encrypted hot data) in encrypted hot data set 2; and so on, bj os Represents the sum of the sizes of (all) data (i.e., encrypted hot data) in the encrypted hot data set os;
[0233] Transfer encrypted hot dataset 1 to encrypted hot dataset os according to bj1~bj os Arrange in descending order to obtain the sequence A to be stored;
[0234] The encrypted hot data sets corresponding to the sequence A to be stored are stored in the local server in sequence according to the server sequence;
[0235] Step S257: Summarize the total size of (all) temperature write data corresponding to the 1st to the soth user ID numbers, and record them as bb1, bb2~bb so ;
[0236] Among them, bb1 represents the total size of (all) temperature write data corresponding to the first user ID number;
[0237] bb2 indicates the total size of (all) temperature write data corresponding to the second user ID number;
[0238] By analogy, bb se Indicates the total size of (all) write temperature data corresponding to the so-th user ID number;
[0239] Define relation 21: ; Where p is a positive integer, and the value range of p is: 2~eo; bb i represents the total size of (all) temperature write data corresponding to the i-th user ID number; bb(1-p) represents the cumulative sum of the total size of (all) temperature write data corresponding to the 1st to pth user ID numbers;
[0240] Step S258: bb1~bb so Substitute it into equation 21, find the first user ID number that does not satisfy equation 21, and record it as aso;
[0241] Repeat steps S251 to S256, store the 1st to asoth temperature writing data in the local server; use (all) temperature writing data corresponding to the (aso+1)th to soth user ID numbers as remaining writing data;
[0242] Step S26: Define the relation 22: ; Where q is a positive integer, and the value range of q is: 2~eo; ab i represents the total size of (all) hot data corresponding to the ith user ID number; ab(1-q) represents the cumulative sum of the total size of (all) hot data corresponding to the 1st to qth user ID numbers;
[0243] ab1~ab so Substitute into equation 22, find the first user ID number that does not satisfy equation 22, denoted as bso;
[0244] Repeat the same step of storing all encrypted hot data in the local server (i.e., step S25), and store the 1st to bso-th write temperature data in the local server; and use the (all) hot data corresponding to the (bso+1)-th to so-th user ID numbers as hot residual data.
[0245] Step S3: Summarize the hot surplus data, write surplus data and read temperature data as unstored data; create two spaces in the cloud data platform, namely space a and space b; store the unstored data in space a, store the index of the unstored data in space b, return the access interface of space b to the local server, and encrypt the interface number of the access interface with the user ID number;
[0246] Encrypt and split the cold data and construct a Merkle tree; store the cold data in the blockchain according to the node structure of the Merkle tree;
[0247] The specific steps of step S3 are as follows:
[0248] Step S31: Summarize the thermal residual data, the write residual data and the temperature reading data as unstored data;
[0249] Create two spaces in the cloud data platform, namely space a and space b; store the temperature reading data in the cloud data platform;
[0250] Step S311: Obtain the network bandwidth of each local server, recorded as ba1, ba2~ba se ; se represents the number of local servers;
[0251] The extracted maximum value is recorded as bam, the minimum value is recorded as bal, and the mode is recorded as baz;
[0252] Define the relationship 31: (lim (ba i / bam)) → 1;
[0253] Relation 32: (lim (ba i / bal)) → 1;
[0254] Relation 33: (lim (ba i / baz)) → 1;
[0255] Where i is a positive integer, and the value range of i is: 1~se; ba i represents the network bandwidth of each local server of the ith server;
[0256] Change ba1~ba se Substituting into equations 31 to 33, count the number of equations that satisfy equation 31, denoted as baa; the number of equations that satisfy equation 32, denoted as bab; the number of equations that satisfy equation 33, denoted as bac;
[0257] Step S312: Calculate the maximum value (local server network bandwidth) ratio, denoted as a1, a1=baa / se; the minimum value ratio, denoted as a2, a2=bab / se; the mode ratio, denoted as a3, a3=bac / se;
[0258] Calculate ba1~ba se The average value is denoted as aba;
[0259] The weighted bandwidth of the local server is recorded as qba; the size of a3 and 0.5 is determined to determine the value of qba;
[0260] If qba<0.5, the calculation formula of qba is as follows:
[0261] ;
[0262] If qba ≥ 0.5, the value of qba is baz;
[0263] Step S313: record the first user ID number as the target ID; record (all) temperature reading data corresponding to the first user ID number as the target data;
[0264] According to qba, the target data is stored in space a, and the index corresponding to the target data is stored in space b;
[0265] Get the length of the target ID, recorded as sl;
[0266] Let the square root of sl be sr, and perform continuous square root operations on sl until the result of sr is in the interval (0,10), and sr is rounded up;
[0267] Step S314: Divide the target data into sr units of data;
[0268] Randomly select an address with empty storage space in space a as target address 1; store the first unit data into the space corresponding to target address 1;
[0269] Create a linked list structure in space b, recorded as chain L; store the address value of target address 1 into the first node in chain L; the predecessor of the first node is null;
[0270] Step S315: record the address value of target address 1 as adi(1);
[0271] The address value in the judgment space a is (adi(1)±y×2 sr ) is empty;
[0272] If it is not empty, the address value is (adi(1)±y×2 sr ) as the target address 2, and store the second unit data into the space corresponding to the target address 2; and store the address value corresponding to the target address 2 into the second node in the chain L. The successor of the first node is: the address value corresponding to the target address 2, and the predecessor of the second node is: adi (1);
[0273] If it is empty, y is incremented by 1, and the address of an empty storage space in space a is continued to be searched as the target address 2;
[0274] Among them, y represents the surge coefficient, y is a natural number, and the initial value of y is 1;
[0275] Step S316: record the address value of target address 2 as adi(2);
[0276] The address value in the judgment space a is (adi(2)±y×2 sr ) is empty;
[0277] If it is not empty, the address value is (adi(2)±y×2 sr ) as the target address 3, and store the third unit data into the space corresponding to the target address 3; and store the address value corresponding to the target address 3 into the third node in the chain L, the successor of the second node is: the address value corresponding to the target address 3, and the predecessor of the third node is: adi (2);
[0278] If it is empty, y is incremented by 1, and the address of an empty storage space in space a is continued to be searched as the target address 3;
[0279] Step S317: repeat steps S315 to S316, store the 4th to srth unit data in space a, the predecessor of the srth node in chain L is: the address value storing the (sr-1)th unit data in space a, and the successor of the srth node is: null;
[0280] Step S318: Return the access interface of space b to the local server, and encrypt the interface number of the access interface using the DES encryption algorithm with the target ID as the key;
[0281] Determine the data transmission rate between the 1st to srth unit data;
[0282] Step S3181: Set the data transmission rate of the first unit data to the local server to: qba;
[0283] Get the fastest data transmission rate of the cloud data platform, recorded as dtv1; the slowest data transmission rate, recorded as dtv2;
[0284] Calculate the change in the unit data transmission rate of the cloud data platform, recorded as Δdtv, and the calculation formula of Δdtv is as follows:
[0285] Δdtv=(dtv1-dtv2) 1 / sr ;
[0286] Step S3182: Assume that the storage address value of the i-th unit data in space a is adi(i), where i is a positive integer and the value range of y is: i~sr;
[0287] Assume that the data transmission rate of the i-th unit data to the local server is: dtv(i), and the calculation formula of dtv(i) is as follows:
[0288] ;The maximum value of dtv(i) is dtv1;
[0289] Step S32: Repeat the same steps of storing the temperature reading data in the cloud data platform (ie, steps S311 to S318), and store the hot surplus data and the write surplus data in the cloud data platform.
[0290] Step S33: Decentralize and segment the cold data, and construct a Merkle tree; store the cold data in the blockchain according to the node structure of the Merkle tree, and provide the local server with an access interface to the blockchain.
[0291] Step S4: Continuously obtain the data to be stored, and update the data to be stored stored in the local server and the cloud server.
[0292] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technical personnel in this field according to actual conditions. For example, if there are weight coefficients and proportional coefficients, their set sizes are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. Regarding the size of the weight coefficient and the proportional coefficient, it is sufficient as long as it does not affect the proportional relationship between the parameter and the quantized value.
[0293] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A multivariate big data storage method, characterized in that: The method comprises: Step S1: Obtain the user ID number of the data to be stored, and obtain the number of data to be stored corresponding to each user ID number; obtain the data size, access times and modification times corresponding to each data to be stored, and obtain allocation parameters; according to the allocation parameters, divide the data to be stored into hot data, read temperature data, write temperature data and cold data; Step S2: Obtain the number of local servers, obtain the remaining memory size, network bandwidth and CPU main frequency of each server, and obtain server parameters; Allocate servers for hot data according to server parameters, store the hot data in local servers, and determine whether the local servers can store all the hot data; If possible, all hot data and part of the warm write data are encrypted and stored in the local server, and the other part of the warm write data is used as the remaining write data; If not, part of the hot data is encrypted and stored in the local server, and the other part of the hot data is used as hot redundant data; Step S3: Summarize the hot surplus data, write surplus data and read temperature data as unstored data; create two spaces in the cloud data platform, namely space a and space b; store the unstored data in space a, store the index of the unstored data in space b, return the access interface of space b to the local server, and encrypt the interface number of the access interface with the user ID number; Encrypt and split the cold data and construct a Merkle tree; store the cold data in the blockchain according to the node structure of the Merkle tree; Step S4: Continuously obtain the data to be stored, and update the data to be stored stored in the local server and the cloud server.
2. A multivariate big data storage method according to claim 1, characterized in that: The specific steps of step S1 are as follows: Step S11: Count the number of user ID numbers, denoted as so; Step S12: dividing the data to be stored corresponding to the first user ID number into hot data, read temperature data, write temperature data and cold data; Step S13: Process the data to be stored corresponding to the 2nd to soth user ID numbers and divide them into hot data, read temperature data, write temperature data and cold data, and enter step S2.
3. A multivariate big data storage method according to claim 2, characterized in that: The specific steps of step S12 are as follows: Step S121: The data to be stored corresponding to the first user ID number is used as the data to be classified; the number of the data to be classified is counted, and recorded as fn; Get the size of each data to be classified, denoted as b1, b2~b fn ; Among them, b1 represents the size of the first data to be classified; b2 represents the size of the second data to be classified; and so on. fn Indicates the size of the fnth data to be classified; Step S122: Obtain the number of accesses and the number of modifications of the data to be classified; Summarize the number of accesses and modifications of the 1st to fnth data to be classified, and record them as r1, r2 to r fn and w1, w2~w fn ; Among them, r1 and w1 represent the number of accesses and modifications of the first data to be classified, respectively; r2 and w2 represent the number of accesses and modifications of the second data to be classified, respectively; and so on. fn and w fn , respectively represent the number of accesses and modifications of the fnth data to be classified; Step S123: Summarize the data obtained in steps S121 to S122 as allocation parameters; and divide the data to be classified into hot data, warm data and cold data according to the allocation parameters; Step S124: Calculate r1~r fn The average value of w1~w is recorded as ar; calculate w1~w fn The average value of b1~b fn The average value of is denoted as ab; Extract r1~r fn The maximum value in is denoted as r max , the minimum value is denoted as r min ; Extract w1~w fn The maximum value in is denoted as w max , the minimum value is denoted as w min ; Definition of relation 1: (r i +w i )×b i ≥ (ar×aw) 1 / 2 ×ab; where i is a positive integer, and the value range of i is: 1~fn; r i represents the number of accesses to the i-th data to be classified, w i Indicates the number of times the i-th data to be classified has been modified; b i Indicates the size of the i-th data to be classified; Step S125: r1~r fn and w1~w fn , substitute into equation 1; Summarize the data to be classified that do not satisfy equation 1 as cold data; count the number of cold data, recorded as cmn; The data to be classified that satisfies equation 1 are summarized as non-cold data.
4. A multivariate big data storage method according to claim 3, characterized in that: The subsequent steps of step S125 are as follows: Step S126: Define relation 2: (r j +r min )>2×ar; Definition of relation 3: (w j +w min )>2×aw; Wherein, j is a positive integer, and the value range of j is: 1~(fn-cmn); w j represents the number of accesses to the jth non-cold data; r j Indicates the number of modifications of the jth non-cold data; Substitute the access count and modification count corresponding to non-cold data into equations 2 and 3; Summarize the non-cold data that satisfies both equation 2 and equation 3 as hot data; count the number of hot data, recorded as wmn; Only the non-cold data that satisfies equation 2 are summarized as data a; the number of statistical data a is recorded as nn; Only the non-cold data that satisfy equation 3 are summarized as data b; the number of statistical data b is recorded as ny; Step S127: Define equation 4: (w p +w max )>2×aw; Definition of relation 5: (r q +r max )>2×ar; Where p is a positive integer, and the value range of p is: 1~nn; w p Indicates the number of times the pth data a is modified; q is a positive integer, and the value range of q is: 1~ny; r q Indicates the number of accesses to the qth data b; Step S128: Substitute the modification times corresponding to data a into equation 4, and substitute the access times corresponding to data b into equation 5; The data a that meets the relational expression 4 is summarized as the read temperature data, and the data a that does not meet the relational expression 4 is summarized as the write temperature data. The data b that meets the relational expression 5 is summarized as the write temperature data, and the data b that does not meet the relational expression 5 is summarized as the read temperature data; The number of temperature reading data is recorded as smn, and the number of temperature writing data is recorded as snn.
5. A multivariate big data storage method according to claim 2, characterized in that: The specific steps of step S2 are as follows: Step S21: Obtain the number of local servers, denoted as se; Get the remaining memory size corresponding to each local server, recorded as fm1, fm2~fm se ; Network bandwidth, denoted as ba1, ba2~ba se ; CPU main frequency, recorded as df1, df2~df se ; Among them, fm1, ba1 and df1 respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the first local server; fm2, ba2 and df2 respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the second local server; and so on. se ,ba se and df se , respectively represent the remaining memory size, network bandwidth and CPU main frequency corresponding to the se-th local server; Summarize fm1~fm se ,ba1~ba se and df1~df se , as server parameters; Step S22: Calculate the performance parameter of the first local server, denoted as pp(1). The calculation formula of pp(1) is as follows: pp(1)=(ba1×df1) 1 / 2 ×fm1; Calculate the performance parameter of the second local server, denoted as pp(2). The calculation formula of pp(2) is as follows: pp(2)=(ba2×df2) 1 / 2 ×fm2; Similarly, the performance parameter of the se-th local server is calculated, recorded as pp(se), and the calculation formula of pp(se) is as follows: pp(se)(ba se ×df se ) 1 / 2 ×fm se 100. Step S23: Arrange the local servers in descending order of pp(1) to pp(se) to obtain a server sequence; Calculate fm1~fm se The sum of is denoted as afm; Summarize the total size of the hot data corresponding to the 1st to the soth user ID numbers, recorded as ab1, ab2~ab so ; Where ab1 represents the total size of the hot data corresponding to the first user ID number; ab2 represents the total size of the hot data corresponding to the second user ID number; By analogy, ab se Indicates the total size of the hot data corresponding to the so-th user ID number.
6. A multivariate big data storage method according to claim 5, characterized in that: The subsequent steps of step S23 are as follows: Step S24: Calculate ab1~ab so The sum of is recorded as abb; determine the size of afm and abb; If afm>abb, the hot data corresponding to the 1st to the soth user ID numbers are encrypted using the RAS algorithm, and the hot data are stored in the local server, and the process goes to step S25; If afm≤abb, a portion of the hot data is encrypted using the RAS algorithm, and a portion of the hot data is stored in the local server according to the server sequence; The other part of the thermal data is used as the thermal residual data, and the process proceeds to step S26; Step S25: taking the hot data corresponding to the first user ID number as the hot data to be encrypted; and encrypting the hot data to be encrypted using the RAS algorithm; All encrypted hot data and part of the warm write data are stored in the local server, and the other part of the warm write data is used as the remaining write data; Step S26: Define the relation 22: ; Where q is a positive integer, and the value range of q is: 2~eo; ab i represents the total size of hot data corresponding to the ith user ID number; ab(1-q) represents the cumulative sum of the total size of hot data corresponding to the 1st to qth user ID numbers; ab1~ab so Substitute into equation 22, find the first user ID number that does not satisfy equation 22, denoted as bso; Repeat the same steps of storing all encrypted hot data in the local server, and store the 1st to bsoth write hot data in the local server; The hot data corresponding to the (bso+1)th to soth user ID numbers are taken as hot residual data, and the process goes to step S3.
7. A multivariate big data storage method according to claim 6, characterized in that: The specific steps of step S25 are as follows: Step S251: Use the hash algorithm to process the first user ID number to obtain the hash value of the first user ID number, denoted as hn; Step S252: using the Mersenne Twister algorithm, randomly generate two positive prime numbers, denoted as pr1 and pe2; pr1 and pe2 meet the following conditions: {lim[(pr1+pe2) / hn]→1}∩(pr1+pe2) min ; Step S253: Calculate the Euler number of hn, denoted as φ(hn), φ(hn)=(pr1-1)×(pr2-1); Randomly generate an integer e less than φ(hn) such that gcd(e, φ(hn)) = 1, where e is the public key; gcd represents the greatest common divisor; Calculate the modular inverse d of e with respect to φ(hn), d = e (φ(hn)-2) , d is the private key; Step S254: encrypt the hot data to be encrypted using the public key e to obtain an encrypted hot data set 1; Step S255: repeat the same steps of encrypting the hot data of the first user ID number, encrypt the hot data corresponding to the second to the osth user ID numbers, and obtain encrypted hot data set 2 to encrypted hot data set os; Step S256: Calculate the data size corresponding to the encrypted hot data set 1 to the encrypted hot data set os, denoted as bj1, bj2~bj os ; where bj1 represents the sum of the data sizes in encrypted hot dataset 1; bj2 represents the sum of the data sizes in encrypted hot dataset 2; and so on, bj os Represents the sum of the data sizes in the encrypted hot dataset os; Transfer encrypted hot dataset 1 to encrypted hot dataset os according to bj1~bj os Arrange in descending order to obtain the sequence A to be stored; The encrypted hot data sets corresponding to the sequence A to be stored are stored in the local server in sequence according to the server sequence; Step S257: Summarize the total size of the temperature writing data corresponding to the 1st to the soth user ID numbers, and record them as bb1, bb2~bb so ; Among them, bb1 represents the total size of the temperature writing data corresponding to the first user ID number; bb2 indicates the total size of the temperature write data corresponding to the second user ID number; By analogy, bb se Indicates the total size of the temperature write data corresponding to the so-th user ID number; Define relation 21: ; Where p is a positive integer, and the value range of p is: 2~eo; bb i represents the total size of the temperature writing data corresponding to the i-th user ID number; bb(1-p) represents the cumulative sum of the total size of the temperature writing data corresponding to the 1st to the pth user ID numbers; Step S258: bb1~bb so Substitute it into equation 21, find the first user ID number that does not satisfy equation 21, and record it as aso; Repeat steps S251 to S256, store the 1st to asoth temperature writing data in the local server; and use the temperature writing data corresponding to the (aso+1)th to soth user ID numbers as the remaining writing data.
8. A multivariate big data storage method according to claim 6, characterized in that: The specific steps of step S3 are as follows: Step S31: Summarize the thermal residual data, the write residual data and the temperature reading data as unstored data; Create two spaces in the cloud data platform, namely space a and space b; store the temperature reading data in the cloud data platform; Step S32: Repeat the same step of storing the temperature reading data in the cloud data platform, and store the hot surplus data and the write surplus data in the cloud data platform; Step S33: Decentralize and segment the cold data, and construct a Merkle tree; store the cold data in the blockchain according to the node structure of the Merkle tree, and provide the local server with an access interface to the blockchain.
9. A multivariate big data storage method according to claim 8, characterized in that: The specific steps of step S31 are as follows: Step S311: Obtain the network bandwidth of each local server, recorded as ba1, ba2~ba se ; se represents the number of local servers; The extracted maximum value is recorded as bam, the minimum value is recorded as bal, and the mode is recorded as baz; Define the relationship 31: (lim (ba i / bam)) → 1; Relation 32: (lim (ba i / bal)) → 1; Relation 33: (lim (ba i / baz)) → 1; Where i is a positive integer, and the value range of i is: 1~se; ba i represents the network bandwidth of each local server of the ith server; Change ba1~ba se Substituting into equations 31 to 33, count the number of equations that satisfy equation 31, denoted as baa; the number of equations that satisfy equation 32, denoted as bab; the number of equations that satisfy equation 33, denoted as bac; Step S312: Calculate the maximum value proportion coefficient, denoted as a1, a1=baa / se; the minimum value proportion coefficient, denoted as a2, a2=bab / se; the mode proportion coefficient, denoted as a3, a3=bac / se; Calculate ba1~ba se The average value is denoted as aba; The weighted bandwidth of the local server is recorded as qba; the size of a3 and 0.5 is determined to determine the value of qba; If qba<0.5, the calculation formula of qba is as follows: ; If qba ≥ 0.5, the value of qba is baz; Step S313: record the first user ID number as the target ID; record the temperature reading data corresponding to the first user ID number as the target data; According to qba, the target data is stored in space a, and the index corresponding to the target data is stored in space b; Get the length of the target ID, recorded as sl; Let the square root of sl be sr, and perform continuous square root operations on sl until the result of sr is in the interval (0,10), and sr is rounded up; Step S314: Divide the target data into sr units of data; Randomly select an address with empty storage space in space a as target address 1; store the first unit data into the space corresponding to target address 1; Create a linked list structure in space b, recorded as chain L; store the address value of target address 1 into the first node in chain L; the predecessor of the first node is null; Step S315: record the address value of target address 1 as adi(1); The address value in the judgment space a is (adi(1)±y×2 sr ) is empty; If it is not empty, the address value is (adi(1)±y×2 sr ) as the target address 2, and store the second unit data into the space corresponding to the target address 2; and store the address value corresponding to the target address 2 into the second node in the chain L. The successor of the first node is: the address value corresponding to the target address 2, and the predecessor of the second node is: adi (1); If it is empty, y is incremented by 1, and the address of an empty storage space in space a is continued to be searched as the target address 2; Wherein, y represents the surge coefficient, y is a natural number, and the initial value of y is 1.
10. A multivariate big data storage method according to claim 9, characterized in that: The subsequent steps of step S315 are as follows: Step S316: record the address value of target address 2 as adi(2); The address value in the judgment space a is (adi(2)±y×2 sr ) is empty; If it is not empty, the address value is (adi(2)±y×2 sr ) as the target address 3, and store the third unit data into the space corresponding to the target address 3; and store the address value corresponding to the target address 3 into the third node in the chain L, the successor of the second node is: the address value corresponding to the target address 3, and the predecessor of the third node is: adi (2); If it is empty, y is incremented by 1, and the address of an empty storage space in space a is continued to be searched as the target address 3; Step S317: repeat steps S315 to S316, store the 4th to srth unit data in space a, the predecessor of the srth node in chain L is: the address value storing the (sr-1)th unit data in space a, and the successor of the srth node is: null; Step S318: Return the access interface of space b to the local server, and encrypt the interface number of the access interface using the DES encryption algorithm with the target ID as the key; Determine the data transmission rate between the 1st to srth unit data; Step S3181: Set the data transmission rate of the first unit data to the local server to: qba; Get the fastest data transmission rate of the cloud data platform, recorded as dtv1; the slowest data transmission rate, recorded as dtv2; Calculate the change in the unit data transmission rate of the cloud data platform, recorded as Δdtv, and the calculation formula of Δdtv is as follows: Δdtv=(dtv1-dtv2) 1 / sr ; Step S3182: Assume that the storage address value of the i-th unit data in space a is adi(i), where i is a positive integer and the value range of y is: i~sr; Assume that the data transmission rate of the i-th unit data to the local server is: dtv(i), and the calculation formula of dtv(i) is as follows: ;The maximum value of dtv(i) is dtv1.
Citation Information
Patent Citations
Method and system for saving block chain node storage overhead and storage medium
CN114579563A
Data archiving system, method, device and equipment based on data division
CN116166691A