A flexible file storage method
Through attribute matching interface and standard judgment, multiple cache paths are determined and events are defined, which solves the problem of uniqueness of data file storage location, achieves file storage flexibility and security, and avoids data loss.
Patent Information
- Application Number
- CN202410823923.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-25
AI Technical Summary
In the existing technology, the storage anomaly of the specified location of the data file results in the file being unable to be stored directly, increasing the risk of data loss, and the storage process lacks flexibility.
Determine multiple cache paths through the attribute matching interface, perform standardized judgments and event definitions, avoid unique file storage locations, and ensure the flexibility and security of file storage.
It effectively avoids the risk of data loss, improves the flexibility and reliability of file storage, and ensures the adaptability of files on multi-channel cache paths and the rationality of storage events.
Smart Images

Figure CN118377760B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of file storage, and in particular to a flexible file storage method. Background Art
[0002] The current society is in a stage of rapid development of digitalization and networking. Various industries and systems have generated a large number of data files, and the data in the data files has important application value. Since data files are generally stored in designated locations according to system regulations, the storage anomalies of the designated locations may cause data files to be unable to be stored directly. Even if they can be stored, they may cause certain damage to the files, which undoubtedly increases the risk of data loss.
[0003] Therefore, the present invention proposes a flexible file storage method. Summary of the invention
[0004] The present invention provides a flexible file storage method, which is used to determine multiple cache paths under an interface through an attribute matching interface, and then to reasonably analyze and define events for the cache paths through matching and standard judgment, thereby avoiding the location uniqueness of file storage, and can effectively ensure the flexibility of file storage and avoid the risk of data loss.
[0005] The present invention provides a flexible file storage method, comprising:
[0006] Step 1: Determine the file attributes of the file to be stored, and match the storage interface to the file attributes;
[0007] Step 2: Establishing a request list of the storage interface at the same storage request time, and establishing a multi-way cache path for the storage interface according to the request list;
[0008] Step 3: Initially standardize the file to be stored according to the receiving standard of the storage interface, and match the standardization result with each cache path respectively to determine the adaptability with each cache path;
[0009] Step 4: When all the adaptability does not meet the adaptability standard, the cache path with the largest adaptability and the cache path with the second largest adaptability are screened and a storage event is defined, and the file to be stored is stored in the cache area under the corresponding defined path according to the definition result;
[0010] Step 5: If there is a cache path that meets the adaptation criteria, the file to be stored is stored in a cache area under any path that meets the requirements.
[0011] Preferably, determining the file attribute of the file to be stored includes:
[0012] Obtaining the file structure of the file to be stored, extracting the first structure field and the last structure field in the file structure, and obtaining the first attribute from the first-last-attribute comparison table;
[0013] Scan the file to be stored, and obtain the execution logic from the result-type-logic comparison table in combination with the file type;
[0014] Performing cluster analysis on the execution logic to construct a cluster list, and performing cluster representation on corresponding cluster units in the cluster list according to cluster clusters and cluster distribution conditions;
[0015] According to the representation combination, a second attribute is obtained from a combination-attribute comparison table;
[0016] All of the first attributes and the second attributes are regarded as file attributes.
[0017] Preferably, matching the storage interface to the file attribute includes:
[0018] assigning attribute weights to the first attribute and the second attribute respectively according to the comparison process;
[0019] According to the first attribute and the second attribute, a plurality of first interfaces are obtained by matching from an attribute-interface comparison table;
[0020] According to the sum of the attribute weights of all the first attributes and the sum of the attribute weights of all the second attributes, a plurality of second interfaces are obtained by matching from a weight sum-interface comparison table;
[0021] A repeated interface is determined from the first interface and the second interface, and the weight sum of the main attributes involved in each repeated interface is determined, so as to obtain a final interface as the storage interface.
[0022] Preferably, establishing a multi-way cache path for the storage interface according to the request list includes:
[0023] Counting the number of requests of the storage interface at the same storage request time, and obtaining the number sequence of the storage interface in a historical time period;
[0024] determining a preliminary number of paths based on the number of requests, the number sequence, and the number of types of request types based on the request list;
[0025] Obtain the historical response log of each storage request at the same storage request time from the historical database respectively, and obtain the historical request data level range of the corresponding storage request;
[0026] Determining whether an initial path corresponding to the storage request is retained according to the historical request data level range;
[0027] Based on the determination result and the preliminary number of paths, a multi-way cache path of the storage interface is determined.
[0028] Preferably, initially standardizing the to-be-stored file according to the receiving standard of the storage interface includes:
[0029] a standard mechanism that matches each standard indicator in the received standard from an initialization database;
[0030] The execution order is set according to the sequence of standard indicators, and the corresponding standard mechanism is controlled to perform initial standardization on the files to be stored.
[0031] Preferably, matching the standardized result with each cache path respectively to determine the degree of fit with each cache path includes:
[0032] Obtaining data blocks based on each standard indicator in the standardization result, and determining block cluster information and block operation status of each data block respectively;
[0033] Comparing and analyzing the block cluster information and block operation status with preset conditions of corresponding standard indicators to determine the standard conversion coefficient of the corresponding data block;
[0034] Extracting the first block whose standard conversion coefficient is greater than the preset coefficient, and matching each first block with the same-path cache path to determine the initial degree;
[0035] Extracting a second block whose standard conversion coefficient is not greater than a preset coefficient, and adjusting the initial degree according to the weight sum of the second block to obtain a first degree;
[0036] According to the path distribution of the multi-way cache path, extracting the expected storage loss of each cache path from the distribution-loss comparison table;
[0037] At the same time, the transmission loss log of each cache path is retrieved from the log database to determine the single path loss, and the impact loss on the corresponding cache path is determined according to all the transmission loss logs under the path distribution;
[0038] Establishing an optimal loss function corresponding to the cache path according to the expected storage loss, the single path loss and the impact loss;
[0039] Determine the process level in the file storage process based on each cache path, and obtain dynamic verification data of each level to assign a valid time tag to each level to obtain a transmission convenience function corresponding to the cache path;
[0040] According to the transmission convenience function and the optimal loss function, the effective transmission level of the corresponding cache path is obtained, and the first degree is adjusted to obtain the adaptation degree.
[0041] Preferably, screening the cache path with the largest adaptability and the cache path with the second largest adaptability and defining the storage event includes:
[0042] Determine the suitable factors and non-suitable factors under the screening path;
[0043] Defining and constructing storage events for the non-adaptive factors;
[0044] The storage event is appended to the adaptation window of the corresponding screening path.
[0045] Preferably, defining and constructing a storage event for the non-adaptation factor includes:
[0046] Determine a first adaptation feature of each adaptation factor under the same screening path, and at the same time, determine a second adaptation feature of each non-adaptation factor under the same screening path;
[0047] Binary-encode the first adaptation feature to obtain a first sequence, and binary-encode the second adaptation feature to obtain a second sequence;
[0048] According to the factor comparison table, several groups of matching factors and non-matching factors having a comparison relationship are screened, and the first sequence and the second sequence corresponding to each group are aligned and placed according to the comparison trigger sequence to obtain a difference sequence based on the second sequence;
[0049] The difference sequence and the first sequence are sequentially input into a sequence analysis model to obtain an interpolation sequence based on the difference sequence, and sequence analysis is performed on the interpolation sequence to obtain adjustment conditions of corresponding non-adaptive factors;
[0050] Constructs storage events for the corresponding filter paths based on all adjustment conditions.
[0051] Compared with the prior art, the beneficial effects of this application are as follows:
[0052] Through the attribute matching interface, multiple cache paths under the interface are determined, and then through matching and standard judgment, the cache paths are reasonably analyzed and events are defined to avoid the uniqueness of the file storage location, and effectively ensure the flexibility of file storage and avoid the risk of data loss.
[0053] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0054] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0056] Figure 1 A flowchart of a flexible file storage method according to an embodiment of the present invention;
[0057] Figure 2 This is a structural diagram of storage event acquisition in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0059] The present invention provides a flexible file storage method, such as Figure 1 As shown, including:
[0060] Step 1: Determine the file attributes of the file to be stored, and match the storage interface to the file attributes;
[0061] Step 2: Establishing a request list of the storage interface at the same storage request time, and establishing a multi-way cache path for the storage interface according to the request list;
[0062] Step 3: Initially standardize the file to be stored according to the receiving standard of the storage interface, and match the standardization result with each cache path respectively to determine the adaptability with each cache path;
[0063] Step 4: When all the adaptability does not meet the adaptability standard, the cache path with the largest adaptability and the cache path with the second largest adaptability are screened and a storage event is defined, and the file to be stored is stored in the cache area under the corresponding defined path according to the definition result;
[0064] Step 5: If there is a cache path that meets the adaptation criteria, the file to be stored is stored in a cache area under any path that meets the requirements.
[0065] In this embodiment, the file attribute refers to the attribute matching the field in the file structure and the attribute composition performing logical matching corresponding to the file type.
[0066] In this embodiment, the storage interface refers to an interface that needs to store and transmit the files to be stored, and the files to be stored refer to data information that needs to be stored, such as Excel spreadsheet files, word files, etc., to store the corresponding files.
[0067] In this embodiment, the same storage request moment refers to several storage requests issued to the storage interface at the same time. The request list contains several request information for the same storage interface at the same storage request moment, mainly for storing the files corresponding to the request.
[0068] In this embodiment, a multi-way cache path refers to multiple channels that can store files to be stored. For example, files can be stored in area 1, area 2 or area 3 through storage interface a1, where the path from interface a1 to area 1, the path from interface a1 to area 2, and the path from interface a1 to area 3 are collectively referred to as a multi-way cache path.
[0069] In this embodiment, the purpose of initial standardization is to standardize the format and other aspects of the storage files to facilitate reasonable storage and provide convenience for subsequent flexible storage.
[0070] In this embodiment, the matching of the standardized result with the cache path is mainly to match the format, data type and file status, so as to accurately determine the adaptability and achieve effective matching.
[0071] In this embodiment, the adaptation standard is a numerical value, which is 0.6, and the degree of adaptation is also a value, which is between 0 and 1. At this time, the discussion can be divided into two categories by comparing the degree of adaptation.
[0072] In this embodiment, the definition of storage events is mainly to configure events for corresponding cache paths to ensure the rationality and flexibility of storage and avoid data loss due to storage failure caused by abnormal storage process.
[0073] The beneficial effect of the above technical solution is: through the attribute matching interface, multiple cache paths under the interface are determined, and then the cache paths are reasonably analyzed and events are defined through matching and standard judgment, avoiding the location uniqueness of file storage, and effectively ensuring the flexibility of file storage and avoiding the risk of data loss.
[0074] The present invention provides a flexible file storage method, which determines the file attributes of a file to be stored, including:
[0075] Obtaining the file structure of the file to be stored, extracting the first structure field and the last structure field in the file structure, and obtaining the first attribute from the first-last-attribute comparison table;
[0076] Scan the file to be stored, and obtain the execution logic from the result-type-logic comparison table in combination with the file type;
[0077] Performing cluster analysis on the execution logic to construct a cluster list, and performing cluster representation on corresponding cluster units in the cluster list according to cluster clusters and cluster distribution conditions;
[0078] According to the representation combination, a second attribute is obtained from a combination-attribute comparison table;
[0079] All of the first attributes and the second attributes are regarded as file attributes.
[0080] In this embodiment, the file structure refers to the head and tail frame structures of the file to be stored, and the head structure field and the tail structure field are obtained from the structure-field comparison table based on the frame structure. The structure-field comparison table includes different frame structures and field expressions that match the structure. This is to ensure the unique description of the corresponding frame, thereby facilitating the subsequent acquisition of the first attribute. The head-tail-attribute comparison table includes different head structure fields, tail structure fields and attributes that match the fields, thereby facilitating direct acquisition. The first attribute is, for example: read-only attribute, hidden attribute, system attribute, archive attribute, etc.
[0081] In this embodiment, the file type is the type of result with which the suffix of the determined file is the result. The file scanning is to obtain the data information stored in the file to be stored, wherein the result-type-logic comparison table contains different file types and logical extraction indicators matching the types to perform logical extraction on the scanning results, and obtain the execution logic, which is mainly for the data logic of the file to be stored itself.
[0082] In this embodiment, cluster analysis refers to obtaining several clustering results after clustering the logics based on the kmeans algorithm, and the center of each clustering result is the clustering cluster and the distribution of the distance between each logic under each clustering result and the clustering cluster is the clustering distribution.
[0083] In this embodiment, the cluster list includes several cluster units, and each cluster unit corresponds to a cluster result. The cluster representation is to represent the information included in the corresponding unit in the form of symbols, so as to facilitate the subsequent acquisition of attributes from the comparison table.
[0084] In this embodiment, the representation combination = {cluster representation of each clustering unit}.
[0085] In this embodiment, the combination-attribute comparison table includes different representation combinations and the attribute setting results of the representation combinations by experts, and the second attribute can be directly obtained based on the table, wherein the second attribute is related to the text content, such as management attributes, business attributes, communication attributes, etc.
[0086] The beneficial effect of the above technical solution is: the comprehensive reliability of file attributes is determined by obtaining attributes from two aspects, wherein the first attribute is preliminarily obtained through the file structure, and the second attribute is obtained by scanning the file and combining the file type and logical clustering analysis, providing a reliable basis for the storage interface of the corresponding file.
[0087] The present invention provides a flexible file storage method, matching a storage interface to the file attributes, comprising:
[0088] assigning attribute weights to the first attribute and the second attribute respectively according to the comparison process;
[0089] According to the first attribute and the second attribute, a plurality of first interfaces are obtained by matching from an attribute-interface comparison table;
[0090] According to the sum of the attribute weights of all the first attributes and the sum of the attribute weights of all the second attributes, a plurality of second interfaces are obtained by matching from a weight sum-interface comparison table;
[0091] A repeated interface is determined from the first interface and the second interface, and the weight sum of the main attributes involved in each repeated interface is determined, so as to obtain a final interface as the storage interface.
[0092] In this embodiment, the comparison process refers to the comparison process of the head-tail-attribute comparison table, the result-type-logic comparison table and the combination-attribute comparison table. In this process, the attribute weight of the first attribute = the historical comparison frequency of the same head and tail for the first attribute / the total comparison frequency;
[0093] The attribute weight of the second attribute = the historical comparison frequency of the same result-type-logic and the same combination-attribute for the second attribute / (the comparison frequency of the same result-type-logic + the comparison frequency of the same combination-attribute).
[0094] In this embodiment, after the attributes are acquired according to the comparison table, the number of the first attributes and the second attributes acquired may be more than one.
[0095] In this embodiment, the attribute-interface comparison table includes interfaces combined with the first attribute and the second attribute, for example, the first attribute a1, the first attribute a3, the second attribute b1, and the comparison result is: first interface h01, first interface h02, first interface h03.
[0096] In this embodiment, the sum of the attribute weights is the accumulation of the attribute weights of all first attributes, or the accumulation of the attribute weights of all second attributes.
[0097] In this embodiment, the weight-interface comparison table includes the attribute weights and the corresponding interfaces of the dual attributes, and the second interface can be directly obtained. For example, the interfaces that match the weight and s1 of the first attribute and the weight and s2 of the second attribute are: second interface h02, second interface d2, and second interface d1.
[0098] At this time, the duplicate interface obtained is interface h02. If there is one duplicate interface, it will be used as the storage interface. If there are multiple duplicate interfaces, the main attributes involved in each duplicate interface are obtained respectively. For example, duplicate interface 1 includes: the first attribute a1, the second attribute b1, and duplicate interface 2 includes: the first attribute a1, the second attribute b2. At this time, according to the weight sum of the attributes, the interface with the largest sum is selected as the storage interface.
[0099] In this embodiment, the main attribute refers to the attribute that cannot be ignored for the interface, and each interface has at least one main attribute. For example, interface 1 includes attribute b1, attribute z1 and attribute z2, among which attribute b1 is specified as the main attribute. That is, whether the attribute involved in each interface is main or not is predetermined and can be directly used for analysis and judgment.
[0100] The beneficial effect of the above technical solution is: by assigning weights to corresponding attributes and obtaining relevant interfaces from two aspects, the final interface is effectively determined, providing a basis for subsequent path determination.
[0101] The present invention provides a flexible file storage method, which establishes a multi-way cache path for the storage interface according to the request list, including:
[0102] Counting the number of requests of the storage interface at the same storage request time, and obtaining the number sequence of the storage interface in a historical time period;
[0103] determining a preliminary number of paths based on the number of requests, the number sequence, and the number of types of request types based on the request list;
[0104] Obtain the historical response log of each storage request at the same storage request time from the historical database respectively, and obtain the historical request data level range of the corresponding storage request;
[0105] Determining whether an initial path corresponding to the storage request is retained according to the historical request data level range;
[0106] Based on the determination result and the preliminary number of paths, a multi-way cache path of the storage interface is determined.
[0107] In this embodiment, the historical time period refers to the continuous 10 minutes before the storage interface at the moment, and the quantity sequence is composed of the number of requests received at each historical moment in the historical time period.
[0108] In this embodiment, the requests in the request list are divided into types, and the quantity of each request type is determined. The request type is, for example, a secure storage type, a general storage type, and the like.
[0109] In this embodiment, .
[0110] In this embodiment, the historical database includes response logs of different requests, mainly to determine the response data volume of the response request. The response data volume of the same request may be more or less. Therefore, after listing the data levels corresponding to n1 consecutive response data volumes and sorting them by size, the mode digit is determined, and the data level based on the first occurrence position of the mode digit and the middle position under the first position after size sorting is taken as the maximum value on the right, and the data level based on the last occurrence position of the mode digit and the middle position under the last position after size sorting is taken as the minimum value on the left. Therefore, the historical request data level range = {minimum value on the left, maximum value on the right}.
[0111] In this embodiment, the initial path refers to the path between the storage interface and the default storage area of the storage interface. If the data level of the default initial path is not within the historical request data level range, it is determined that the initial path does not need to be retained. Otherwise, it is determined that the initial path needs to be retained. For example, the default data level is r01, and the historical request data level range is (r03, r04), where r01 does not belong to (r03, r04). At this time, the initial path does not need to be retained.
[0112] In this embodiment, the final number of multi-way cache paths=the preliminary number of paths-the number of paths that do not need to be retained in the judgment result.
[0113] In this embodiment, the multi-way cache paths are multiple paths that are consistent with the final number, that is, paths that interface to a number of storage areas, and the number of the multiple storage areas is consistent with the final number.
[0114] The beneficial effect of the above technical solution is: by determining the number of requests at this moment and the number sequence of the historical time period, and combining the number of types to determine the preliminary path familiarity, and then constructing a multi-way cache path based on the comparison result of the data level range, it is effectively avoided that the data volume is too large to be stored in the corresponding area, thereby causing data loss, and it is to effectively avoid occupying the corresponding area due to the small amount of data, resulting in waste of regional space.
[0115] The present invention provides a flexible file storage method, which performs initial standardization on the to-be-stored file according to the receiving standard of the storage interface, including:
[0116] a standard mechanism that matches each standard indicator in the received standard from an initialization database;
[0117] The execution order is set according to the sequence of standard indicators, and the corresponding standard mechanism is controlled to perform initial standardization on the files to be stored.
[0118] In this embodiment, the initialization database includes standard mechanisms that match different receiving standards, and the standard mechanism is a standard conversion process for standardizing the stored files, which can be standardization in format or standardization in text description.
[0119] In this embodiment, the standard indicator may also be a format indicator, a text indicator, etc. For example, format A needs to be standardized to format B, or text needs to be represented by binary symbols to achieve standardization of text description.
[0120] In this embodiment, the execution order may be to first perform standardization on the text description and then perform standardization on the format.
[0121] The beneficial effect of the above technical solution is: by obtaining a standard mechanism consistent with the standard indicators, effective standardization of the stored files is achieved, which facilitates subsequent reasonable matching and effective acquisition of adaptability.
[0122] The present invention provides a flexible file storage method, which matches the standardized result with each cache path respectively and determines the adaptability with each cache path, including:
[0123] Obtaining data blocks based on each standard indicator in the standardization result, and determining block cluster information and block operation status of each data block respectively;
[0124] Comparing and analyzing the block cluster information and block operation status with preset conditions of corresponding standard indicators to determine the standard conversion coefficient of the corresponding data block;
[0125] Extracting the first block whose standard conversion coefficient is greater than the preset coefficient, and matching each first block with the same-path cache path to determine the initial degree;
[0126] Extracting a second block whose standard conversion coefficient is not greater than a preset coefficient, and adjusting the initial degree according to the weight sum of the second block to obtain a first degree;
[0127] According to the path distribution of the multi-way cache path, extracting the expected storage loss of each cache path from the distribution-loss comparison table;
[0128] At the same time, the transmission loss log of each cache path is retrieved from the log database to determine the single path loss, and the impact loss on the corresponding cache path is determined according to all the transmission loss logs under the path distribution;
[0129] Establishing an optimal loss function corresponding to the cache path according to the expected storage loss, the single path loss and the impact loss;
[0130] Determine the process level in the file storage process based on each cache path, and obtain dynamic verification data of each level to assign a valid time tag to each level to obtain a transmission convenience function corresponding to the cache path;
[0131] According to the transmission convenience function and the optimal loss function, the effective transmission level of the corresponding cache path is obtained, and the first degree is adjusted to obtain the adaptation degree.
[0132] In this embodiment, the data block refers to the result after standardization for the standard indicator, and the standardized result includes the result under each standard indicator.
[0133] In this embodiment, block cluster information refers to the standardization status of the corresponding data block. In the process of standardization according to standard indicators, there will be corresponding standardization information, such as format standardization information. For example, data Y0 is converted from format A to format B. At this time, cluster analysis is performed on all the standardized information to obtain several clusters, and all clusters are block cluster information. Because not every data can be successfully converted in format during the standardization process, cluster analysis is performed, and there will be clusters that are completely successfully converted, clusters that are partially successfully converted, and clusters that are not successfully converted.
[0134] In this embodiment, the block operation status refers to whether the block operation status is completely converted according to the corresponding standard indicator.
[0135] In this embodiment, the standard conversion coefficient Bz is calculated as follows:
[0136] ;
[0137] in, The cluster area represents the clustering cluster that is successfully converted based on the block cluster information; The cluster area of the clusters that represent the partial successful conversion based on the block cluster information; Indicates the cluster area of the clusters that are completely unsuccessful in conversion based on the block cluster information; Indicates the area ratio determined based on preset conditions; Indicates information based on complete conversion and partial conversion The current state value of the block operation state of the data block determined by the completely unconverted information X2; Indicates a preset state value determined based on a preset condition;
[0138] In this embodiment, the value of the preset coefficient is 0.6.
[0139] In this embodiment, the initial The calculation method is as follows:
[0140] ;
[0141] in, Indicates that the corresponding first block is based on the corresponding standard indicator , Standard case of same-path cache path And the correlation of the standard conversion coefficient Bz, the value is (0, 1), Indicates the corresponding preset coefficient; ln is the logarithmic function symbol; Indicates for Degree conversion factor;
[0142]
[0143] Among them, sim represents the similarity function; Indicates that it is based on standard indicators The standardized information Indicates the standard situation obtained from the path standard database Related standardization information, among which the path standard database contains standard conditions under different paths, mainly to provide a similarity comparison basis for the standardization results of the file and facilitate the screening of paths.
[0144] In this embodiment, the sum of the weights of the second block = the sum of the weights of the standard indicators corresponding to the second block .
[0145] In this embodiment, ;
[0146] in, is the corresponding first degree; Indicates the total number of second blocks.
[0147] In this embodiment, the path distribution refers to the path directions of all paths involved from the storage interface to the reserved storage area.
[0148] In this embodiment, the distribution-loss comparison table contains the expected storage loss of each cache path involved in different path distributions, that is, the wear and tear of the path during the storage process, because each time data is stored in a certain path, there will be a certain amount of wear and tear on the path.
[0149] In this embodiment, the log database includes the transmission loss information corresponding to different cache paths, so the transmission loss log can be directly retrieved.
[0150] In this embodiment, the single path loss is obtained by extracting all loss values of the path based on the transmission loss log and performing average processing.
[0151] In this embodiment, the impact loss refers to the loss caused to the path by transmissions of other paths under the path distribution. Because multiple paths may have compatibility and incompatibility effects during parallel transmission, all historical impact losses are retrieved and averaged to obtain the impact loss.
[0152] In this embodiment, the final loss function=min(QS+YS, RS+YS), where QS is the expected storage loss, RS is the single path loss, and YS is the impact loss.
[0153] In this embodiment, although the file is stored based on the corresponding path during the storage process, during the storage process, for example, the storage path is: C drive-fail1-uu1, where the process levels involved are 3 levels, and corresponding logs (dynamic verification data) are generated during the file storage process based on each level. At this time, it is necessary to analyze the log to determine the effective time label based on each level, that is, to move the file to the C drive, the response time of the C drive to the file, and so on.
[0154] In this embodiment, the convenient transfer function = Fb (Tcj, j = 1, 2, 3, ..., n1), where Tcj is the effective time label of the jth level; n1 represents the total number of corresponding process levels.
[0155] In this embodiment, the effective transmission level=final loss function / set loss+convenient transmission function / set time.
[0156] In this embodiment, the adaptation degree=the first degree+the degree fine-tuning amount based on the effective transmission level.
[0157] The beneficial effects of the above technical solution are: obtaining the standard conversion coefficient by determining the block cluster information and the block operation status, and determining the initial degree and the adjustment information of the initial degree by coefficient comparison, and further comprehensively adjusting the first degree from the aspects of loss and time to ensure the reliability of the adaptation degree acquisition, thereby providing convenience for subsequent flexible storage.
[0158] The present invention provides a flexible file storage method, which selects a cache path with the largest adaptability and a cache path with the second largest adaptability and defines a storage event, including:
[0159] Determine the suitable factors and non-suitable factors under the screening path;
[0160] Defining and constructing storage events for the non-adaptive factors;
[0161] The storage event is appended to the adaptation window of the corresponding screening path.
[0162] In this embodiment, the path storage index of the screening path is obtained, and combined with the standard index of the file, it is input into the index analysis model to obtain the adaptation factor and non-adaptation factor of the corresponding path, wherein the index analysis model is based on different combinations of paths, standard indicators, and experts' possible adaptation and non-adaptation results of the indicator combination as samples to train the neural network model. Therefore, the adaptation factor and non-adaptation factor can be directly obtained. For example, the existing formula editing format does not meet the storage standard, which can be regarded as a non-adaptation factor. In addition, there may be a situation where the picture in the file is missing during the storage process, and the factor causing the missing is the non-adaptation factor.
[0163] In this embodiment, the storage event is to solve the non-adaptation factor and thus ensure the effective storage of the file in the future.
[0164] In this embodiment, the adaptation window is placed on the corresponding path, and storage events are used during the transmission process to eliminate the impact of non-adaptive factors on the file.
[0165] The beneficial effect of the above technical solution is: by determining the non-adaptive factors to establish storage events, it is easy to eliminate the unreasonable parts in the storage process, ensure the reliability of flexible storage, and there is no need to find a new path due to unreasonable paths.
[0166] The present invention provides a flexible file storage method, which defines the non-adaptive factors and constructs storage events, including:
[0167] Determine a first adaptation feature of each adaptation factor under the same screening path, and at the same time, determine a second adaptation feature of each non-adaptation factor under the same screening path;
[0168] Binary-encode the first adaptation feature to obtain a first sequence, and binary-encode the second adaptation feature to obtain a second sequence;
[0169] According to the factor comparison table, several groups of matching factors and non-matching factors having a comparison relationship are screened, and the first sequence and the second sequence corresponding to each group are aligned and placed according to the comparison trigger sequence to obtain a difference sequence based on the second sequence;
[0170] The difference sequence and the first sequence are sequentially input into a sequence analysis model to obtain an interpolation sequence based on the difference sequence, and sequence analysis is performed on the interpolation sequence to obtain adjustment conditions of corresponding non-adaptive factors;
[0171] Constructs storage events for the corresponding filter paths based on all adjustment conditions.
[0172] In this embodiment, the features of the matching and non-matching factors are obtained through a factor-feature comparison table, and the table contains different factors and features matching the factors, which are pre-set by experts.
[0173] In this embodiment, the factor comparison table contains the comparison relationship between any two factors, and then the comparison relationship between the adaptation factor and the non-adaptation factor can be directly matched from the table, and each comparison relationship has its own comparison trigger sequence. For example, the first adaptation feature A1 is binary encoded as 11001111, and the second adaptation feature A2 is binary encoded as 1100001111.
[0174] like Figure 2 As shown in the figure, "1100" is the control trigger sequence, then the difference sequence based on the second sequence is "00" and "11", that is, Figure 2 The bold part in .
[0175] In this embodiment, the sequence parsing model is obtained by training the neural network model with different difference sequences, the first sequence and the interpolation analysis results of the two sequences by experts as samples. For example, the interpolation sequence for "11001111" and "00" and "11" is "@@##". At this time, the adjustment condition matching "@@##" is obtained from the interpolation-condition mapping table.
[0176] In this embodiment, storage event=integration of all adjustment conditions.
[0177] The beneficial effect of the above technical solution is: by obtaining the characteristics of the adaptation and non-adaptation factors and encoding the characteristics, and combining the comparison table to obtain the sequence difference, a preliminary basis is provided for obtaining the conditions, and then the interpolation sequence is obtained through model analysis to obtain the adjustment conditions, thereby ensuring the reasonable elimination of the incompatible factors in the path and improving the reliability of flexible file storage.
[0178] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A flexible file storage method, characterized in that: include: Step 1: Determine the file attributes of the file to be stored, and match the storage interface to the file attributes; Step 2: Establishing a request list of the storage interface at the same storage request time, and establishing a multi-way cache path for the storage interface according to the request list; Step 3: Initially standardize the file to be stored according to the receiving standard of the storage interface, and match the standardization result with each cache path respectively to determine the adaptability with each cache path; Step 4: When all the adaptability does not meet the adaptability standard, the cache path with the largest adaptability and the cache path with the second largest adaptability are screened and a storage event is defined, and the file to be stored is stored in the cache area under the corresponding defined path according to the definition result; Step 5: If there is a cache path that meets the adaptation criteria, the file to be stored is stored in a cache area under any path that meets the requirements; Determine the file attributes of the file to be stored, including: Obtaining the file structure of the file to be stored, extracting the first structure field and the last structure field in the file structure, and obtaining the first attribute from the first-last-attribute comparison table; Scan the file to be stored, and obtain the execution logic from the result-type-logic comparison table in combination with the file type; Performing cluster analysis on the execution logic to construct a cluster list, and performing cluster representation on corresponding cluster units in the cluster list according to cluster clusters and cluster distribution conditions; According to the representation combination, a second attribute is obtained from a combination-attribute comparison table; All the first attributes and the second attributes are used as file attributes; wherein the result-type-logic comparison table contains different file types and logic extraction indicators matching the types to perform logic extraction on the scanning results, and obtain the execution logic, which is mainly for the data logic of the file to be stored; the representation combination = {cluster representation of each clustering unit}; the combination-attribute comparison table contains different representation combinations and the attribute setting results of the representation combinations by experts, and then the second attribute can be directly obtained based on the table; Matching a storage interface to the file attribute includes: assigning attribute weights to the first attribute and the second attribute respectively according to the comparison process; According to the first attribute and the second attribute, a plurality of first interfaces are obtained by matching in an attribute-interface comparison table; According to the sum of the attribute weights of all the first attributes and the sum of the attribute weights of all the second attributes, a plurality of second interfaces are obtained by matching from a weight sum-interface comparison table; Determine a duplicate interface from the first interface and the second interface, and determine the weight sum of main attributes involved in each duplicate interface, and then obtain a final interface as a storage interface; Match the standardized results with each cache path respectively to determine the degree of fit with each cache path, including: Obtaining data blocks based on each standard indicator in the standardization result, and determining block cluster information and block operation status of each data block respectively; Comparing and analyzing the block cluster information and block operation status with preset conditions of corresponding standard indicators to determine the standard conversion coefficient of the corresponding data block; Extracting the first block whose standard conversion coefficient is greater than the preset coefficient, and matching each first block with the same-path cache path to determine the initial degree; Extracting a second block whose standard conversion coefficient is not greater than a preset coefficient, and adjusting the initial degree according to the weight sum of the second block to obtain a first degree; According to the path distribution of the multi-way cache path, extracting the expected storage loss of each cache path from the distribution-loss comparison table; At the same time, the transmission loss log of each cache path is retrieved from the log database to determine the single path loss, and the impact loss on the corresponding cache path is determined according to all the transmission loss logs under the path distribution; Establishing an optimal loss function corresponding to the cache path according to the expected storage loss, the single path loss and the impact loss; Determine the process level in the file storage process based on each cache path, and obtain dynamic verification data of each level to assign a valid time tag to each level to obtain a transmission convenience function corresponding to the cache path; According to the transmission convenience function and the optimal loss function, the effective transmission level of the corresponding cache path is obtained, and the first degree is adjusted to obtain the adaptation degree.
2. The flexible file storage method according to claim 1, characterized in that: Establishing a multi-way cache path for the storage interface according to the request list includes: Counting the number of requests of the storage interface at the same storage request time, and obtaining the number sequence of the storage interface in a historical time period; determining a preliminary number of paths based on the number of requests, the number sequence, and the number of types of request types based on the request list; Obtain the historical response log of each storage request at the same storage request time from the historical database respectively, and obtain the historical request data level range of the corresponding storage request; Determining whether an initial path corresponding to the storage request is retained according to the historical request data level range; Based on the determination result and the preliminary number of paths, a multi-way cache path of the storage interface is determined.
3. The flexible file storage method according to claim 1, characterized in that: Initially standardizing the file to be stored according to the receiving standard of the storage interface includes: a standard mechanism that matches each standard indicator in the received standard from an initialization database; The execution order is set according to the sequence of standard indicators, and the corresponding standard mechanism is controlled to perform initial standardization on the files to be stored.
4. The flexible file storage method according to claim 1, characterized in that: Filter the cache path with the highest fitness and the cache path with the second highest fitness and define storage events, including: Determine the suitable factors and non-suitable factors under the screening path; Defining and constructing storage events for the non-adaptive factors; The storage event is appended to the adaptation window of the corresponding screening path.
5. The flexible file storage method according to claim 4, characterized in that: Defining the non-adaptation factor to construct a storage event includes: Determine a first adaptation feature of each adaptation factor under the same screening path, and at the same time, determine a second adaptation feature of each non-adaptation factor under the same screening path; Binary-encode the first adaptation feature to obtain a first sequence, and binary-encode the second adaptation feature to obtain a second sequence; According to the factor comparison table, several groups of matching factors and non-matching factors having a comparison relationship are screened, and the first sequence and the second sequence corresponding to each group are aligned and placed according to the comparison trigger sequence to obtain a difference sequence based on the second sequence; The difference sequence and the first sequence are sequentially input into a sequence analysis model to obtain an interpolation sequence based on the difference sequence, and sequence analysis is performed on the interpolation sequence to obtain adjustment conditions of corresponding non-adaptive factors; Constructs storage events for the corresponding filter paths based on all adjustment conditions.
Citation Information
Patent Citations
Apparatus and method for dynamically allocating data path
CN111258496A
Business data acquisition method and device, computer equipment and storage medium
CN116860541A
