A multi-source file data management method and system based on distributed architecture
By parsing the file data feature information and upload mode parameters, the adapted compression block mechanism and target storage node are obtained, which solves the problems of storage redundancy and low efficiency in distributed storage and achieves efficient file data management.
Patent Information
- Application Number
- CN202410478154.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-04-19
AI Technical Summary
The existing technology fails to analyze the basic characteristics of file data during the distributed storage process, resulting in a mismatch between the number of data blocks and the file data, resulting in storage redundancy and unnecessary data duplication, which in turn wastes storage space and inhibits data storage. and processing efficiency.
By analyzing the characteristic information and upload mode parameters of the source file data, the first compression block mechanism is obtained, compression block processing is performed, and the target storage node is filtered according to the status information of the storage node to achieve adaptive storage management.
It effectively avoids storage redundancy and data duplication, improves storage management efficiency and resource utilization, and ensures efficient and reasonable storage and processing of file data.
Smart Images

Figure CN118400366B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a multi-source file data management method and system based on a distributed architecture. Background Art
[0002] With the popularization of the Internet and the advancement of digital transformation, data generated in various industries and fields continues to emerge, making the processing and management of large amounts of multi-source data a problem that must be faced. In the face of the ever-increasing amount of data and highly complex data storage and management needs, it is necessary to provide more flexible and powerful data management methods. The advanced management methods of distributed architectures are highly scalable and have strong data integration capabilities, and can adapt well to the current growing amount of data and data management needs.
[0003] The prior art, such as the invention patent with announcement number CN113051221B, is a data storage method, apparatus, medium, device and distributed file system. The method includes: starting a metadata analysis process, and obtaining metadata to be analyzed from a metadata management node based on the metadata analysis process; parsing the metadata to be analyzed through the metadata analysis process to obtain metadata to be stored; storing the metadata to be stored in a target database based on the metadata analysis process, which can reduce the memory consumption of the distributed file system when processing data and improve the metadata parsing performance.
[0004] Prior art, such as the invention patent with announcement number CN113282564B, is a data storage method, system, node and storage medium. The system includes a distributed file system composed of a management node and multiple data nodes, a cloud storage system and multiple cloud disks, and multiple data nodes share the same cloud disk. In response to the data storage request of the client, the management node determines the target cloud disk from multiple cloud disks and determines a preset number of data nodes from the data nodes mounted on the target cloud disk, and sends the identifiers of the preset number of data nodes to the client. The first data node among the preset number of data nodes receives the data block sent by the client, stores the data block in the target cloud disk, and synchronizes the write event log of the data block to the second data node among the preset number of data nodes. The target cloud disk stores multiple copies of the data block in the cloud storage system. Through this solution, the secure and reliable storage of data is guaranteed, the number of copies of data blocks is reduced, and the storage cost is reduced.
[0005] To sum up, in the current file data management, in the process of uploading and storing, no analysis is performed based on the basic characteristics of the file data, resulting in the number of data blocks obtained by segmentation during distributed storage not being fully compatible with the file data, causing storage redundancy or unnecessary data duplication in the file data, thereby causing a waste of storage space and greatly inhibiting the efficiency of data storage and processing. Therefore, a multi-source file data management method and system based on a distributed architecture is desired. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a multi-source file data management method and system based on a distributed architecture, which can effectively solve the problems involved in the above-mentioned background technology.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: According to one aspect of an embodiment of the present application, a multi-source file data management method based on a distributed architecture is provided, including: multiple source upload endpoints respond to receive file data upload management requests, and record the responding upload endpoint as the source endpoint, and record the file data received by the source endpoint as the source file data.
[0008] The characteristic information of the source file data and the file upload mode parameters of the source endpoint are analyzed to obtain the first compression and block mechanism of the source file data.
[0009] According to the first compression and blocking mechanism of the source file data, compression and blocking processing is performed on the source file data to obtain each cut data block of the source file data.
[0010] According to each cut data block of the source file data, the current state information of the storage node cluster of the source endpoint is synchronously counted, and the target storage nodes corresponding to each cut data block of the source file data are obtained by filtering for storage management.
[0011] Based on the above embodiment, the characteristic information of the source file data includes the number of text bytes, the number of graphic bytes, the number of video bytes, and the total number of bytes accumulated in the source file data.
[0012] Based on the above embodiment, the file upload mode parameters of the source endpoint include file data verification feature information of each verification upload of the source endpoint and valid upload mode data.
[0013] The file data verification feature information uploaded for each verification is the file data feature value uploaded for each verification and the total number of file data bytes.
[0014] The effective upload mode data includes the effective execution compression ratio corresponding to the file data uploaded for each verification and the total number of data block upload execution splits.
[0015] On the basis of the above embodiment, the characteristic information of the statistical source file data and the file upload mode parameters of the source endpoint are analyzed, and the specific process includes: according to the characteristic information of the source file data, numerical normalization fitting processing is performed through a preset regression analysis algorithm to obtain the characteristic value of the source file data, and according to the predefined characteristic value allowable range difference, the source file data is divided into characteristic value intervals.
[0016] The total number of bytes of the source file data is counted from the characteristic information of the source file data, and the byte belonging range interval of the source file data is located according to the predefined byte permission range difference.
[0017] The feature values of the file data uploaded for each verification are mapped and compared with the feature value intervals of the source file data. If the feature value of the file data uploaded for a certain verification is within the feature value interval of the source file data, the file data uploaded for this verification is marked as the prior file data, and the prior file data are traversed and counted.
[0018] The total number of bytes of file data uploaded for each verification is extracted, and the total number of bytes of each preceding file data is screened out and compared with the byte range of the source file data. If the total number of bytes of a preceding file data is within the byte range of the source file data, the preceding file data is marked as the pre-reference file data, thereby traversing and counting the pre-reference file data.
[0019] According to the effective execution compression ratio corresponding to the uploaded file data of each verification and the total number of data blocks uploaded and executed segmentation, the effective execution compression ratio corresponding to each pre-reference file data and the total number of data blocks uploaded and executed segmentation are counted.
[0020] On the basis of the above-mentioned embodiment, the first compression and blocking mechanism of the source file data respectively includes a first preset execution compression ratio of the source file data and a first preset execution total number of data block divisions of the source file data. The specific acquisition process is: according to the effective execution compression ratio corresponding to each pre-reference file data and the total number of data block upload execution divisions, and by removing extreme values and calculating the mean, the reference effective execution compression ratio of the pre-reference file data and the total number of data block upload execution reference divisions of the pre-reference file data are obtained.
[0021] The reference effective execution compression ratio of the pre-referenced file data is used as the first preset execution compression ratio of the source file data.
[0022] The total number of data blocks uploaded for execution reference division of the pre-referenced file data is used as the first total number of data blocks for execution preset for the source file data.
[0023] Based on the above embodiment, the current status information of the storage node cluster of the source endpoint specifically includes the current execution task queue information and the current spatial network performance information.
[0024] The currently executed task queue information includes the total number of currently executed tasks of each storage node, the total number of tasks to be executed, the aggregated capacity value of tasks to be executed, and the remaining transmission capacity and average execution transmission speed of each currently executed task of each storage node.
[0025] The current spatial network performance information includes the current network bandwidth utilization, network transmission rate and network signal strength of each storage node.
[0026] On the basis of the above embodiment, the target storage nodes corresponding to the cut data blocks of the source file data obtained by filtering are stored and managed. The specific process is: according to the currently executed task queue information, the first weight factor of each current storage node is obtained through clustering processing.
[0027] According to the current spatial network performance information, a second weight factor of each current storage node is obtained through clustering processing.
[0028] According to the first weight factor of each current storage node and the second weight factor of each current storage node, a preset filtering model is imported to process and obtain the storage execution priority of each current storage node.
[0029] The storage execution priorities of the current storage nodes are arranged in descending order to obtain the storage execution priority arrangement order of the storage nodes.
[0030] The number of cut data blocks of the source file data is counted and recorded as the storage node specified screening number, and each target storage node is obtained by sequentially extracting the storage execution priority arrangement order of the storage node according to the storage node specified screening number.
[0031] According to each target storage node, a corresponding match is performed with each cut data block of the source file data to obtain the target storage node corresponding to each cut data block of the source file data, thereby performing storage management.
[0032] Based on the above embodiment, the target storage node corresponding to each cut data block of the source file data obtained by filtering is stored and managed, and also includes: calculating the initial expected hash value of each cut data block of the source file data through a preset hash algorithm and the hash value measured after storage.
[0033] The initial expected hash value of each cut data block of the source file data is compared with the hash value measured after storage. If the initial expected hash value of a cut data block of the source file data is consistent with the hash value measured after storage, the cut data block is judged to be successfully stored. Conversely, if the initial expected hash value of a cut data block of the source file data is inconsistent with the hash value measured after storage, the storage of the cut data block is judged to have failed, and the data block is uploaded and stored again.
[0034] Based on the above embodiment, the preset filtering model is specifically:
[0035]
[0036] Among them, β j represents the storage execution priority of the current storage node j, α j is the first weight factor of the current storage node j, μ j is the second weight factor of the current storage node j, is the correction coefficient of the preset first weight factor, is the correction coefficient of the preset second weight factor, ε j The weight of the current storage node j
[0037] Factor accumulation value, ε j =α j +μ j , is the accumulated reference value of the preset weight factor, j is the number of each storage node, j=1,2,...,p, and p is the total number of storage nodes.
[0038] According to another aspect of an embodiment of the present application, a multi-source file data management system based on a distributed architecture is provided: comprising: a management request response receiving module, used to respond to and receive file data upload management requests through multi-source upload endpoints, and record the responding upload endpoint as the source endpoint, and record the file data received by the source endpoint as the source file data.
[0039] The compression and block mechanism acquisition module is used to collect statistics on characteristic information of source file data and file upload mode parameters of the source endpoint for parsing to obtain the first compression and block mechanism of the source file data.
[0040] The compression and block processing module is used to perform compression and block processing on the source file data according to the first compression and block mechanism of the source file data to obtain each cut data block of the source file data.
[0041] The storage management module is used to synchronously count the current status information of the storage node cluster of the source endpoint according to each cut data block of the source file data, and filter to obtain the target storage node corresponding to each cut data block of the source file data for storage management.
[0042] Compared with the prior art, the embodiments of the present invention have at least the following beneficial effects:
[0043] (1) The present invention provides a multi-source file data management method and system based on a distributed architecture. In the process of uploading and storing file data, the method and system can effectively parse the characteristic information of the source file data and analyze to obtain the first compression and blocking mechanism of the source file data, thereby making up for the current storage limitations caused by not analyzing the basic characteristics of the file data, and can effectively avoid storage redundancy or unnecessary data duplication during storage management, further ensuring the storage management efficiency and storage flexibility of the file data.
[0044] (2) The present invention obtains a first compression and block division mechanism for source file data, including a first preset execution compression ratio of the source file data and a first preset execution total number of data block divisions of the source file data, thereby analyzing the source file data and obtaining an adapted compression ratio and a data block division number. By adapting the compression ratio and the data block division number and performing compression and block division processing, the processing complexity of the file data in the actual compression process can be effectively reduced, and file damage caused by excessive compression and too many data block divisions can be avoided, as well as storage space waste caused by too small compression and too few data block divisions can be avoided. Management resources can be utilized to the greatest extent, efficient and reasonable application of storage space can be promoted, and the efficiency of file data storage and processing can be improved.
[0045] (3) The present invention also performs storage management by filtering and obtaining the target storage nodes corresponding to each cut data block of the source file data. It can allocate each cut data block to a suitable target storage node for storage according to the current status information of the storage node cluster of the source endpoint, thereby better realizing dynamic load balancing of the storage nodes, avoiding the occurrence of overloaded nodes, and further improving the overall management efficiency and resource utilization of the system.
[0046] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic diagram of the process of the present invention.
[0048] Figure 2 This is a schematic diagram of the connection of the system modules of the present invention. DETAILED DESCRIPTION
[0049] 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.
[0050] See also Figure 1 As shown, the first aspect of an embodiment of the present invention provides a multi-source file data management method based on a distributed architecture, including: multiple source upload endpoints respond to receive file data upload management requests, and record the responding upload endpoint as the source endpoint, and record the file data received by the source endpoint as the source file data.
[0051] The multi-source upload endpoint responds to receiving the file data upload management request. The specific process includes: the multi-source upload endpoint first needs to receive the upload management request from the client or other upload request initiator. This request usually contains relevant information of the uploaded file data, such as file name, size, type, etc. After receiving the upload management request, the multi-source upload endpoint verifies the compliance of the request, including checking whether the parameters in the request are complete and comply with the specifications, and verifying the identity and authority of the request initiator. After the verification is passed, the subsequent storage management steps are executed.
[0052] The multi-source upload endpoint refers to a node in a distributed architecture that can receive file data upload requests from different sources. It can be understood as a server. The multi-source upload endpoint has the function of processing and managing uploaded file data, and can receive file data from multiple sources, which can be different clients or different systems.
[0053] The characteristic information of the source file data and the file upload mode parameters of the source endpoint are analyzed to obtain the first compression blocking mechanism of the source file data. The characteristic information of the source file data is specifically identified and extracted by a file recognition tool carried by the source endpoint after the file data is received. The file recognition tool can use the file operation function of the programming language, such as Python's Open function to read the file and calculate its byte count. It can also be combined with Python's image and video processing tools, such as OpenCV to identify the number of graphic bytes and video bytes of the read file data, and finally determine the number of text bytes, graphic bytes, video bytes, and cumulative total bytes of the source file data as the characteristic information of the source file data.
[0054] Specifically, the characteristic information of the source file data includes the number of text bytes, the number of graphic bytes, the number of video bytes, and the cumulative total number of bytes of the source file data. It should be understood that the number of bytes represents the size of the space occupied by the corresponding file type, such as the size of the space occupied by text, the size of the space occupied by graphics, and the number of bytes is a unit of measurement for the amount of data, usually expressed in MB.
[0055] The file upload mode parameters of the source endpoint are retrieved from the background log records of the source endpoint. The background log records of the source endpoint refer to the log information about upload requests, operations and running status recorded by the source endpoint. These log information may include the source IP address, user ID, upload time and name, size, type and other information of each upload request. It may also include the real-time running network status information of the source endpoint, such as network bandwidth utilization, network transmission rate, etc. In this embodiment, the file upload mode parameters are retrieved from the background log records of the source endpoint.
[0056] Specifically, the file upload mode parameters of the source endpoint include file data verification feature information of each verification upload of the source endpoint and valid upload mode data.
[0057] It should be noted that the file data uploaded for each verification refers to the file data successfully uploaded by the source endpoint each time, which can be understood as the file data successfully uploaded and stored each time without any data loss during the upload process.
[0058] The file data verification feature information uploaded for each verification is the file data feature value uploaded for each verification and the total number of file data bytes.
[0059] The effective upload mode data includes the effective execution compression ratio corresponding to the file data uploaded for each verification and the total number of data block upload execution splits. The effective execution compression ratio is the compression ratio actually executed on the file data uploaded for each verification, and the total number of data block upload execution splits is the data block split data actually executed on the file data uploaded for each verification.
[0060] For ease of understanding, the compression ratio refers to the ratio between the compressed file size and the original file size. The data block refers to several data blocks obtained by dividing the file data before actual storage in the distributed architecture. These data blocks need to be stored in different storage nodes to achieve distributed storage of file data. In order to improve the reliability and fault tolerance of the system, data blocks are usually redundantly backed up, that is, there are multiple copies of the same data block, and the data blocks and these copies are stored on multiple storage nodes to prevent data loss or damage, thereby ensuring that the storage resources in the system are fully utilized and avoiding excessive load on a single node.
[0061] It is also necessary to understand that the storage node involved in this embodiment is a storage space station, which can be understood as a data storage library. The function of the storage node is to store and manage file data, and provide access to file data. The storage node also has sustainable spatial scalability, which means that the storage node can flexibly expand the storage capacity as the amount of data grows, and can more flexibly respond to changes in data volume in applications.
[0062] Furthermore, the characteristic information of the statistical source file data and the file upload mode parameters of the source endpoint are analyzed. The specific process includes: according to the characteristic information of the source file data, numerical normalization fitting processing is performed through a preset regression analysis algorithm to obtain the characteristic value of the source file data. The regression analysis algorithm includes linear regression, polynomial regression, ridge regression, Lasso regression, etc.
[0063] The feature information of the source file data is numerically normalized and fitted by a regression analysis algorithm, and the feature information of the source file data is normalized to ensure that the scales of different feature information are consistent and to avoid excessive influence of certain feature information on the normalized fitting. In an embodiment, a number of feature information are fitted by using a selected regression analysis algorithm, thereby establishing a relationship model between the dependent variable and the comprehensive feature, and evaluating the established relationship model, which usually includes evaluating indicators such as the goodness of fit of the calculation model, residual analysis, and cross-validation. The model is adjusted or optimized according to the evaluation results to improve the performance and generalization ability of the model, and the optimized model is used for analysis, and the feature information of the source file data is imported into the optimized model for processing to obtain the feature value of the source file data.
[0064] As an example, taking multiple example groups involved in this embodiment as feature value processing objects, the file data feature values of each example group obtained are shown in the following table:
[0065] Table 1 Example group file data feature values
[0066] Example Group Text Bytes Graphics Bytes Video Bytes Cumulative total number of bytes Eigenvalue Example Group 1 0.009766 0.488281 10 10.51 3.17 Example Group 2 0.097656 1.000000 100 101.10 33.05 Example Group 3 1.000000 10.000000 1024 1024.01 351.70 Example Group 4 0.488281 5.000000 500 505.50 170.25 Example Group 5 0.097656 2.000000 200 202.10 68.05
[0067] According to the predefined eigenvalue permitted range difference, the source file data is divided into eigenvalue intervals.
[0068] Taking this embodiment as an example, the source file data characteristic value is 68.05, and the predefined characteristic value permitted range difference is 20. Then the source file data belongs to the characteristic value interval [88.05, 48.05]. The byte permitted range difference can be adaptively adjusted according to the upload requirements of the source endpoint. This example embodiment does not make any special limitations on this.
[0069] The total number of bytes of the source file data is counted from the characteristic information of the source file data, and the byte belonging range interval of the source file data is located according to the predefined byte permission range difference.
[0070] Taking this embodiment as an example, the predefined byte permission range difference is 5MB, and the total number of bytes of the source file data is 106MB. Then the byte range interval of the located source file data is [101MB, 111MB]. The byte permission range difference can be adaptively adjusted according to the upload requirements of the source endpoint, and this example embodiment does not make any special limitation on this.
[0071] The feature values of the file data uploaded for each verification are mapped and compared with the feature value intervals of the source file data. If the feature value of the file data uploaded for a certain verification is within the feature value interval of the source file data, the file data uploaded for this verification is marked as the prior file data, and the prior file data are traversed and counted.
[0072] The total number of bytes of file data uploaded for each verification is extracted, and the total number of bytes of each preceding file data is screened out and compared with the byte range of the source file data. If the total number of bytes of a preceding file data is within the byte range of the source file data, the preceding file data is marked as the pre-reference file data, thereby traversing and counting the pre-reference file data.
[0073] According to the effective execution compression ratio corresponding to the uploaded file data of each verification and the total number of data blocks uploaded and executed segmentation, the effective execution compression ratio corresponding to each pre-reference file data and the total number of data blocks uploaded and executed segmentation are counted.
[0074] Furthermore, the first compression and block division mechanism of the source file data includes a first preset execution compression ratio of the source file data and a first preset execution data block division total number of the source file data, and the specific acquisition process is:
[0075] According to the effective execution compression ratio corresponding to each pre-reference file data and the total number of data block upload execution splits, and by removing extreme values and taking the average, the reference effective execution compression ratio of the pre-reference file data and the total number of data block upload execution reference splits of the pre-reference file data are obtained.
[0076] Specifically, the process of removing extreme values and calculating the average is as follows: according to the effective execution compression ratio corresponding to each pre-reference file data, the pre-reference file data with the highest and lowest effective execution compression ratios are eliminated, and the effective execution compression ratios corresponding to each remaining pre-reference file data after the elimination are summed and averaged to obtain the reference effective execution compression ratio of the pre-reference file data, and the total number of data block upload execution splits corresponding to each pre-reference file data is counted, and the pre-reference file data with the highest and lowest total number of data block upload execution splits are eliminated, and the total number of data block upload execution splits corresponding to each remaining pre-reference file data after the elimination are summed and averaged to obtain the reference total number of data block upload execution splits of the pre-reference file data.
[0077] It should be understood that by removing extreme values and calculating the mean, the interference caused by extreme values can be effectively reduced, so that the final mean can better represent the concentration of the data.
[0078] The reference effective execution compression ratio of the pre-referenced file data is used as the first preset execution compression ratio of the source file data.
[0079] The total number of data blocks uploaded for execution reference division of the pre-referenced file data is used as the first total number of data blocks for execution preset for the source file data.
[0080] According to the first compression and blocking mechanism of the source file data, compression and blocking processing is performed on the source file data to obtain each cut data block of the source file data.
[0081] The method of performing compression and block processing on the source file data to obtain each cut data block of the source file data is specifically as follows: compressing the source file data at a first preset execution compression ratio of the source file data through a lossless compression algorithm, and after compression, performing proportional byte segmentation processing on the source file data at a first preset execution data block segmentation total number of the source file data, thereby obtaining each cut data block of the source file data. By compressing and then segmenting, the size of the file data can be further reduced, thereby improving the transmission efficiency of the file data, and can also reduce storage costs, and can also reduce bandwidth consumption in network transmission.
[0082] The lossless compression algorithm needs to be selected based on the support of the source endpoint and the characteristics of the file data. Usually, lossless compression algorithms include Deflate, Gzip and Bzip2, among which Deflate is mainly used for data compression in ZIP file format and HTTP protocol. Gzip is a file compression format based on the Deflate algorithm, which is usually used for file compression in systems such as Unix. Bzip2 is also a compression algorithm, which usually has a higher compression ratio, but the compression and decompression speeds are relatively slow.
[0083] In an embodiment, the present invention obtains a first compression and blocking mechanism for source file data, including a first preset execution compression ratio of the source file data and a first preset execution total number of data block divisions of the source file data, to analyze the source file data and obtain an adapted compression ratio and a data block division number. By adapting the compression ratio and the data block division number and performing compression and blocking processing, the processing complexity of the file data in the actual compression process can be effectively reduced, and file damage caused by excessive compression and too many data block divisions can be avoided, and storage space waste caused by too little compression and too few data block divisions can be avoided. Therefore, management resources can be utilized to the greatest extent, efficient and reasonable application of storage space can be promoted, and the efficiency of file data storage and processing can be improved.
[0084] According to each cut data block of the source file data, the current status information of the storage node cluster of the source endpoint is synchronously counted, and the target storage nodes corresponding to each cut data block of the source file data are filtered for storage management. The storage node cluster is a combination of all storage nodes of the source endpoint.
[0085] The current status information of the storage node cluster can be obtained in real time from the background log records of the source endpoint.
[0086] In an embodiment, the present invention also performs storage management by filtering the target storage nodes corresponding to each cut data block of the source file data, and can allocate each cut data block to a suitable target storage node for storage according to the current status information of the storage node cluster of the source endpoint, thereby better realizing dynamic load balancing of the storage nodes, avoiding the occurrence of overloaded nodes, and further improving the overall management efficiency and resource utilization of the system.
[0087] Specifically, the current state information of the storage node cluster of the source endpoint specifically includes the current execution task queue information and the current spatial network performance information.
[0088] The currently executed task queue information includes the total number of currently executed tasks of each storage node, the total number of tasks to be executed, the aggregated capacity value of tasks to be executed, and the remaining transmission capacity and average execution transmission speed of each currently executed task of each storage node.
[0089] It is easy to understand that the total number of executing tasks is the total number of tasks that are currently being uploaded or cached, the total number of tasks to be executed is the total number of tasks that have not yet been uploaded and cached, and the aggregate capacity value of tasks to be executed refers to the cumulative capacity of all tasks to be executed, which can also be understood as the cumulative value of bytes.
[0090] The current spatial network performance information includes the current network bandwidth utilization, network transmission rate and network signal strength of each storage node.
[0091] The network bandwidth utilization refers to the ratio of the actually used network bandwidth to the available network bandwidth. When the network bandwidth utilization is close to 100%, it means that the network has used almost all the available bandwidth resources, which may cause network congestion and performance degradation.
[0092] The network transmission rate refers to the speed at which data is transmitted in the network, usually measured in terms of the amount of data transmitted per second. A higher network transmission rate means that data can be transmitted faster in the network.
[0093] The network signal strength is an important indicator for measuring the quality and stability of wireless network connections, usually measured in decibel milliwatts. A higher signal strength usually means a more stable and faster network connection.
[0094] Furthermore, the target storage nodes corresponding to the cut data blocks of the source file data obtained by filtering are stored and managed. The specific process is: according to the currently executed task queue information, the first weight factor of each current storage node is obtained through clustering processing. The first weight factor of each current storage node is a numerical parameter obtained by clustering the currently executed task queue information, and is used to judge the task load level of each current storage node.
[0095] Furthermore, the first weight factors of the current storage nodes may be clustered according to the following constraints:
[0096]
[0097] Among them, ωj is the first weighted clustering influence factor of the current storage node j, and the specific processing constraints are:
[0098]
[0099] In the formula, α j is the first weight factor of the current storage node j, R j , D j 、M j They represent the total number of tasks being executed, the total number of tasks to be executed, and the aggregate capacity of tasks to be executed of the current storage node j, G jg represents the remaining transmission capacity of the g-th storage node currently executing the task, X jg It represents the average execution transmission speed of the gth executing task of the current storage node j, j is the number of each storage node, j=1,2,...,p, p is the total number of storage nodes, g is the number of each executing task, g=1,2,...,z, z is the total number of executing tasks.
[0100] As an example, taking the multiple storage nodes involved in this embodiment as reference objects, the total number of executed tasks, the total number of tasks to be executed, the aggregated capacity value of the tasks to be executed, the remaining transmission capacity of the executed tasks, and the average execution transmission speed of the executed tasks are marked with symbols U1, U2, U3, U4, and U5 in turn, and the first weight factor finally processed is shown in the following table:
[0101] Table 2 Storage node first weight factor
[0102] Storage Node U1 U2 U3 U4 U5 First weight factor Storage Node 1 10 5 200 50 100 12.772 Storage Node 2 12 6 180 70 110 10.206 Storage Node 3 9 4 220 60 95 10.866 Storage Node 4 11 5 210 75 105 9.581 Storage Node 5 15 7 190 80 120 9.686
[0103] As can be seen from the above table, the first weight factor value of storage node 1 is the highest, indicating that the current task load level of storage node 1 is relatively low.
[0104] According to the current spatial network performance information, the second weight factor of each current storage node is obtained through clustering processing. The second weight factor of each current storage node is a numerical parameter obtained by clustering the current spatial network performance information, and is used to evaluate the spatial network performance status of each current storage node.
[0105] Furthermore, the second weight factors of the current storage nodes may be clustered according to the following constraint conditions:
[0106]
[0107] Among them, μ j is the second weight factor of the current storage node j, K j 、V j , Q j They represent the network bandwidth utilization, network transmission rate and network signal strength of the current storage node j respectively. K0 is the preset network supplementary bandwidth utilization. j is the number of each storage node, j=1,2,...,p, and p is the total number of storage nodes.
[0108] In an embodiment, the network supplementary bandwidth utilization can be adjusted according to the actual network bandwidth utilization. The higher the actual network bandwidth utilization, the smaller the network supplementary bandwidth utilization, so that data processing is within the same range and the processing results are more coordinated. For example, in this embodiment, the network bandwidth utilization of all storage nodes is 10%, and the network supplementary bandwidth utilization is 20%. In another embodiment, the network bandwidth utilization of all storage nodes is 60%, and the network supplementary bandwidth utilization is 8%.
[0109] As an example, taking the multiple storage nodes involved in this embodiment as reference objects, the network bandwidth utilization, the network transmission rate and the network signal strength are marked with symbols U6, U7 and U8 respectively, and the processed second weight factors are shown in the following table:
[0110] Table 3 Storage node second weight factor
[0111] Storage Node U6 U7 U8 Second weighting factor Storage Node 1 0.8 500 -70 2.909 Storage Node 2 0.75 480 -68 2.954 Storage Node 3 0.85 520 -72 2.872 Storage Node 4 0.8 500 -65 2.985 Storage Node 5 0.7 460 -70 2.947
[0112] Combined with the above table, it is found that the second weight factor of storage node 4 is the highest, indicating that the current network status performance of storage node 4 is good.
[0113] According to the first weight factor of each current storage node and the second weight factor of each current storage node, a preset filtering model is imported to process and obtain the storage execution priority of each current storage node.
[0114] In another embodiment, cloud computing and data statistics can be combined for processing, and the current task queue information and the current spatial network performance information can be subjected to data statistical analysis through cloud computing, and the first weight factor of each current storage node and the second weight factor of each current storage node can be automatically output.
[0115] The storage execution priority of each current storage node is a numerical parameter obtained by processing the first weight factor of each current storage node and the second weight factor of each current storage node, and is used to evaluate the adaptability and priority of each current storage node in executing the source file data storage task.
[0116] Specifically, the preset filtering model is:
[0117]
[0118] Among them, β j represents the storage execution priority of the current storage node j, α j is the first weight factor of the current storage node j, μ j is the second weight factor of the current storage node j, is the correction coefficient of the preset first weight factor, is the correction coefficient of the preset second weight factor, ε j The accumulated value of the weight factor of the current storage node j, ε j =α j +μ j , is the accumulated reference value of the preset weight factor, j is the number of each storage node, j=1,2,...,p, and p is the total number of storage nodes.
[0119] It should be understood that the correction coefficient of the preset first weight factor, the correction coefficient of the preset second weight factor and the cumulative reference value of the preset weight factors need to be determined according to the actual performance of the storage node. For example, in this example embodiment, it is found through performance observation that the storage node performs too much task load, that is, it faces a large number of file data upload storage tasks and file data caching tasks during operation, and its performance in network performance is good, that is, there have been no negative events such as network crashes or high network transmission delays. In this case, the correction coefficient of the first weight factor is preset to 0.6, and the correction coefficient of the second weight factor is defined as 0.4, indicating that the first weight factor, that is, the storage node The storage node may have a greater impact on the storage execution priority in terms of task load. Similarly, the performance of the storage node needs to be comprehensively considered for the cumulative reference value of the weight factor. For example, in this embodiment, the cumulative reference value of the weight factor is set to 6.78. In another embodiment, it is observed that the storage node performs poorly in terms of network performance, and the cumulative reference value of the weight factor is set to 9.96. This means that when the storage node performance is poor, a higher reference value is required to lower the value of the storage execution priority. In actual applications, the overall performance level of the storage node can be weighed, and the cumulative reference value of the weight factor can be evaluated and adjusted according to actual conditions. This embodiment does not make any special limitations on this.
[0120] For ease of understanding, the preset filtering model is described in a table, and the first weight factors and the second weight factors of multiple storage nodes in this embodiment are counted. The storage execution priority finally output is shown in the following table:
[0121] Table 4 Storage execution priority of storage nodes
[0122] Storage Node First weight factor Second weighting factor Storage execution priority Storage Node 1 12.772 2.909 0.9999 Storage Node 2 10.206 2.954 0.9993 Storage Node 3 10.866 2.872 0.9995 Storage Node 4 9.581 2.985 0.9991 Storage Node 5 9.686 2.947 0.9992
[0123] According to the above table, storage node 1 has the highest storage execution priority, which means it is most suitable for current file data storage management.
[0124] In another embodiment, the storage execution priority of each storage node can be determined by using an intelligent scheduling algorithm supported by the source endpoint. The intelligent scheduling algorithm can dynamically adjust the execution order and priority of storage tasks based on real-time data analysis and prediction, combined with the performance and resource utilization of the storage node, to maximize the performance and efficiency of the system.
[0125] The storage execution priorities of the current storage nodes are arranged in descending order to obtain the storage execution priority arrangement order of the storage nodes.
[0126] The number of cut data blocks of the source file data is counted and recorded as the storage node specified screening number, and each target storage node is obtained by sequentially extracting the storage execution priority arrangement order of the storage node according to the storage node specified screening number.
[0127] It should be understood that the target storage nodes are extracted in sequence, that is, the storage nodes are arranged in order according to their storage execution priority, and the storage nodes that are consistent with the specified screening number of storage nodes are extracted in order from high to low, and defined as the target storage nodes.
[0128] According to each target storage node, a corresponding match is performed with each cut data block of the source file data to obtain the target storage node corresponding to each cut data block of the source file data, thereby performing storage management.
[0129] It should be added that the target storage nodes corresponding to each cut data block of the source file data are obtained by: numbering each target storage node, obtaining the numbering sequence value of each target storage node, and numbering each cut data block of the source file data to obtain the numbering sequence value of each cut data block of the source file data, matching the numbering sequence value of each target storage node with the numbering sequence value of each cut data block of the source file data, if the numbering sequence value of a target storage node matches the numbering sequence value of a cut data block of the source file data, then defining the target storage node as the target storage node corresponding to the cut data block of the source file data, thereby matching and obtaining the target storage nodes corresponding to each cut data block of the source file data, and storing each cut data block of the source file data in the corresponding target storage node.
[0130] The initial expected hash value of each cut data block of the source file data and the post-storage measured hash value are calculated by a preset hash algorithm.
[0131] The initial expected hash value is the hash value calculated before the cut data block is prepared to be stored in the target storage node. This hash value is also commonly referred to as the prepared stored hash value, which is used to verify the data integrity after the cut data block is stored. The post-storage measured hash value is the hash value calculated again after the cut data block is stored in the target storage node. This hash value is usually stored in the target storage node together with the storage, and is used to verify the data integrity later. The initial expected hash value and the post-storage measured hash value are usually consistent, and are calculated based on the content of the cut data block by a preset hash algorithm. The hash algorithm can map input data of any length to output data of a fixed length, which is usually called a hash value and serves as the basis for data integrity verification.
[0132] The initial expected hash value of each cut data block of the source file data is compared with the hash value measured after storage. If the initial expected hash value of a cut data block of the source file data is consistent with the hash value measured after storage, the cut data block is judged to be successfully stored. Conversely, if the initial expected hash value of a cut data block of the source file data is inconsistent with the hash value measured after storage, the storage of the cut data block is judged to have failed, and the data block is uploaded and stored again.
[0133] See also Figure 2 As shown, the second aspect of an embodiment of the present invention provides a multi-source file data management system based on a distributed architecture, including: a management request response receiving module, a compression block mechanism acquisition module, a compression block processing module, and a storage management module.
[0134] The management request response receiving module is used to respond to and receive file data upload management requests through multiple source upload endpoints, record the responding upload endpoint as the source endpoint, and record the file data received by the source endpoint as the source file data.
[0135] The compression and blocking mechanism acquisition module is used to collect statistics on characteristic information of source file data and file upload mode parameters of the source endpoint for parsing to acquire a first compression and blocking mechanism of the source file data.
[0136] The compression and block processing module is used to perform compression and block processing on the source file data according to the first compression and block mechanism of the source file data, and obtain each cut data block of the source file data.
[0137] The storage management module is used to synchronously collect statistics on the current status information of the storage node cluster of the source endpoint according to each cut data block of the source file data, and filter to obtain the target storage node corresponding to each cut data block of the source file data for storage management.
[0138] In an embodiment, the present invention provides a multi-source file data management method and system based on a distributed architecture. In the process of executing file data uploading and storage, the characteristic information of the source file data can be effectively parsed and the first compression and blocking mechanism of the source file data can be obtained by analysis, thereby making up for the current storage limitations caused by not analyzing the basic characteristics of the file data, and can effectively avoid storage redundancy or unnecessary data duplication during storage management, thereby further ensuring the storage management efficiency and storage flexibility of the file data.
[0139] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0140] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that technicians in the relevant technical field can understand and use the present invention well. As long as they do not deviate from the structure of the present invention or exceed the scope defined by the present invention, they should all belong to the protection scope of the present invention.
Claims
1. A multi-source file data management method based on a distributed architecture, characterized in that: include: The multi-source upload endpoint responds to the received file data upload management request, and records the responding upload endpoint as the source endpoint, and records the file data received by the source endpoint as the source file data; Analyze the characteristic information of the source file data and the file upload mode parameters of the source endpoint to obtain the first compression block mechanism of the source file data; According to the first compression and block mechanism of the source file data, the source file data is compressed and block processed to obtain each cut data block of the source file data; According to each cut data block of the source file data, synchronously count the current state information of the storage node cluster of the source endpoint, and filter to obtain the target storage node corresponding to each cut data block of the source file data for storage management; The file upload mode parameters of the source endpoint include file data verification feature information and valid upload mode data of each verification upload of the source endpoint; The file data verification feature information uploaded for each verification is the file data feature value uploaded for each verification and the total number of file data bytes; The effective upload mode data includes the effective execution compression ratio corresponding to each verification upload of the file data and the total number of data block upload execution splits; The characteristic information of the statistical source file data and the file upload mode parameters of the source endpoint are parsed, and the specific process includes: According to the characteristic information of the source file data, a numerical normalization fitting process is performed through a preset regression analysis algorithm to obtain the characteristic value of the source file data, and according to the predefined characteristic value allowable range difference, the source file data is divided into characteristic value intervals; Counting the total number of bytes of the source file data from the characteristic information of the source file data, and locating the byte belonging range interval of the source file data according to the predefined byte permission range difference; Map and compare the feature values of the file data uploaded for each verification with the feature value interval of the source file data. If the feature value of the file data uploaded for a certain verification is within the feature value interval of the source file data, the file data uploaded for this verification is marked as the previous file data, and the previous file data are traversed and counted. Extract the total number of bytes of the file data uploaded for each verification, screen the total number of bytes of each preceding file data, and compare it with the byte range of the source file data. If the total number of bytes of a preceding file data is within the byte range of the source file data, mark the preceding file data as pre-reference file data, and thus traverse and count each pre-reference file data; According to the effective execution compression ratio of the file data uploaded for each verification and the total number of data blocks uploaded for execution segmentation, the effective execution compression ratio of each pre-reference file data and the total number of data blocks uploaded for execution segmentation are counted; The first compression and block division mechanism of the source file data includes a first preset execution compression ratio of the source file data and a first preset execution data block division total number of the source file data, and the specific acquisition process is: According to the effective execution compression ratio corresponding to each pre-reference file data and the total number of data block upload execution segmentation, by removing extreme values and calculating the average value, a reference effective execution compression ratio of the pre-reference file data and a reference total number of data block upload execution segmentation of the pre-reference file data are obtained; using the reference effective execution compression ratio of the pre-referenced file data as the first preset execution compression ratio of the source file data; The total number of data blocks uploaded for execution reference segmentation of the pre-reference file data is used as the first total number of data blocks for execution preset for the source file data; The current state information of the storage node cluster of the source endpoint, specifically including the current execution task queue information and the current spatial network performance information; The currently executed task queue information includes the total number of currently executed tasks of each storage node, the total number of tasks to be executed, the aggregate capacity value of tasks to be executed, and the remaining transmission capacity and average execution transmission speed of each currently executed task of each storage node; The current spatial network performance information includes the current network bandwidth utilization, network transmission rate and network signal strength of each storage node; The target storage nodes corresponding to the cut data blocks of the source file data obtained by filtering are stored and managed, and the specific process is as follows: According to the currently executed task queue information, a first weight factor of each current storage node is obtained through clustering processing; According to the current spatial network performance information, a second weight factor of each current storage node is obtained through clustering processing; According to the first weight factor of each current storage node and the second weight factor of each current storage node, a preset filtering model is imported to process and obtain the storage execution priority of each current storage node; Arrange the storage execution priority of each current storage node in descending order to obtain the storage execution priority arrangement order of the storage nodes; Count the number of cut data blocks of the source file data, record it as the designated screening number of the storage node, and extract each target storage node in turn from the storage execution priority arrangement order of the storage node according to the designated screening number of the storage node; According to each target storage node, a corresponding match is performed with each cut data block of the source file data to obtain the target storage node corresponding to each cut data block of the source file data, thereby performing storage management.
2. The multi-source file data management method based on a distributed architecture according to claim 1, characterized in that: The characteristic information of the source file data includes the text byte number, graphic byte number, video byte number and cumulative total byte number of the source file data.
3. The multi-source file data management method based on a distributed architecture according to claim 1, characterized in that: The filtering obtains storage management of target storage nodes corresponding to each cut data block of the source file data, and further includes: The initial expected hash value of each cut data block of the source file data and the post-storage measured hash value are calculated by a preset hash algorithm, wherein the post-storage measured hash value is a hash value calculated again after the cut data block is stored in the target storage node; The initial expected hash value of each cut data block of the source file data is compared with the hash value measured after storage. If the initial expected hash value of a cut data block of the source file data is consistent with the hash value measured after storage, the cut data block is judged to be successfully stored. Conversely, if the initial expected hash value of a cut data block of the source file data is inconsistent with the hash value measured after storage, the storage of the cut data block is judged to have failed, and the data block is uploaded and stored again.
4. The multi-source file data management method based on a distributed architecture according to claim 1, characterized in that: The preset filtering model is specifically: ; in, Indicates the storage execution priority of the current storage node j, is the first weight factor of the current storage node j, is the second weight factor of the current storage node j, is the correction coefficient of the preset first weight factor, is the correction coefficient of the preset second weighting factor, The accumulated value of the weight factor of the current storage node j, , is the accumulated reference value of the preset weight factor, j is the number of each storage node, , p is the total number of storage nodes.
5. A system for a multi-source file data management method based on a distributed architecture using any one of claims 1 to 4, characterized in that: include: A management request response receiving module is used to receive a file data upload management request through a multi-source upload endpoint response, and record the responding upload endpoint as a source endpoint, and record the file data received by the source endpoint as source file data; A compression and block mechanism acquisition module is used to collect statistics on characteristic information of source file data and file upload mode parameters of the source endpoint for parsing to obtain a first compression and block mechanism of the source file data; A compression and block processing module, used to perform compression and block processing on the source file data according to the first compression and block mechanism of the source file data, and obtain each cut data block of the source file data; The storage management module is used to synchronously count the current status information of the storage node cluster of the source endpoint according to each cut data block of the source file data, and filter to obtain the target storage node corresponding to each cut data block of the source file data for storage management.
Citation Information
Patent Citations
Data storage methods, devices, media, equipment, and distributed file systems
CN113051221B
Data storage methods, systems, nodes, and storage media
CN113282564B
Data transmission method, device and system
CN109756536A
A server for data compression transmission
CN112380196A
