Data storage method and device and related equipment
By acquiring access information and business information of target metadata, and dynamically adjusting storage strategies, the problem of wasted data storage resources in electronic devices is solved, achieving efficient storage resource management and improved query performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the data storage rules of electronic devices are fixed, which can easily lead to a waste of storage resources when the data access frequency changes.
By obtaining the access status and business scope of the target metadata, the data value density value is determined, and an appropriate storage strategy is selected based on this value, including methods such as locality-sensitive hashing, dimensionality reduction, and wavelet compression, and the storage strategy is dynamically adjusted.
It enables precise determination of storage strategies based on data value density, avoiding waste of storage resources, reducing storage costs, and improving data query efficiency and fault location capabilities.
Smart Images

Figure CN121834004A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data storage method, apparatus and related equipment. Background Technology
[0002] With the development of technology, the amount of data generated is also increasing. Electronic devices need to store and manage massive amounts of data. However, in related technologies, electronic devices store data according to fixed data storage rules. But because the storage rules are fixed, factors such as the frequency of data access change in real time, which can easily lead to improper data storage and waste of storage resources. Summary of the Invention
[0003] This application provides a data storage method, apparatus, and related equipment that can avoid wasting storage resources.
[0004] In a first aspect, embodiments of this application provide a data storage method, the method comprising:
[0005] Obtain target metadata;
[0006] Determine the access status and associated business of the target metadata;
[0007] Based on the access status and business to which the target metadata belongs, determine the data value density value corresponding to the target metadata;
[0008] The storage strategy corresponding to the target metadata is determined based on the data value density value.
[0009] Optionally, the method further includes:
[0010] Collect at least one data source; the data source includes: structured data source, semi-structured data source, and unstructured data source;
[0011] Extracting metadata from each of the at least one data source to obtain metadata corresponding to each data source, wherein the metadata corresponding to each data source includes the target metadata;
[0012] Determine the identification code corresponding to the target metadata;
[0013] Construct a first mapping relationship between the identity identification code of the target metadata and the data value density value.
[0014] Optionally, the unstructured data source includes: document data, and the extraction of metadata corresponding to each data source from the at least one data source includes:
[0015] When the unstructured data source is the document data, the document data is decomposed to obtain at least one text block; the text block includes: page number, text content, and bounding box coordinates, the bounding box coordinates being used to characterize the position of the text block in the document data;
[0016] Each text block in the at least one text block is identified to obtain at least one entity corresponding to each text block, and the at least one entity is used as the at least one metadata;
[0017] Determining the identity verification code corresponding to the target metadata includes:
[0018] The file identification code, page number, and bounding box coordinates corresponding to the target entity are hashed to obtain the identification code corresponding to the target entity. The target entity is an entity in at least one entity corresponding to the target text block, and the target text block is a text block in the at least one text block.
[0019] Optionally, the structured data source includes data from a relational database, and the unstructured data source includes image data; the method further includes:
[0020] Calculate the similarity between the first metadata and the second metadata; the first metadata includes metadata generated based on the relational database, and the second metadata includes metadata generated based on the image data or metadata generated based on the document data.
[0021] If the similarity is greater than a preset similarity threshold, a second mapping relationship is constructed between the first metadata and the second metadata.
[0022] The second mapping relationship is used as the third metadata.
[0023] Optionally, determining the data value density value corresponding to the target metadata based on the access status and the business to which the target metadata belongs includes:
[0024] A time decay factor is determined based on the preset time decay value, preset time curvature parameter, and timestamp difference of the target metadata; wherein the timestamp difference is the difference between the current timestamp and the most recently accessed timestamp.
[0025] Based on the number of times the target metadata is accessed within a preset time period, an access frequency factor is determined;
[0026] Based on the business tags corresponding to the target metadata, determine the business weight factor corresponding to the business tags;
[0027] A first weight, a second weight, and a third weight are determined, wherein the first weight represents the weight corresponding to the time decay factor, the second weight represents the weight corresponding to the access frequency factor, and the third weight represents the weight corresponding to the service weight factor.
[0028] The data value density value corresponding to the target metadata is obtained by weighting and summing the time decay factor, the access frequency factor, the business weight factor, the first weight, the second weight, and the third weight.
[0029] Optionally, the method further includes:
[0030] Based on the ratio of actual storage cost to preset storage cost, the ratio of actual latency time to preset latency time, and the information loss rate corresponding to the target metadata, the proportional relationship between the first weight, the second weight, and the third weight is determined.
[0031] Optionally, the storage strategy includes: a first storage strategy, a second storage strategy, and a third storage strategy;
[0032] The step of determining the storage strategy corresponding to the target metadata based on the data value density value includes:
[0033] If the data value density value corresponding to the target metadata is greater than the first preset density value, the storage strategy for the target metadata is determined to be the first storage strategy; the first storage strategy is to perform local sensitive hash transformation on the vector in the target metadata to obtain a hash code, and store the hash code;
[0034] If the data value density value corresponding to the target metadata is less than or equal to the first preset density value and greater than the second preset density value, the storage strategy for the target metadata is determined to be the second storage strategy; the second storage strategy is to perform dimensionality reduction processing on the vector in the target metadata to obtain the dimensionality-reduced vector, and then store the dimensionality-reduced vector.
[0035] If the data value density value corresponding to the target metadata is less than or equal to the second preset density value, the storage strategy for the target metadata is determined to be the third storage strategy, wherein the first preset density value is greater than the second preset density value; the third storage strategy is to perform wavelet compression on the target metadata to obtain compressed data, and then store the compressed metadata.
[0036] Secondly, embodiments of this application provide a data storage device, the device comprising:
[0037] The acquisition module is used to acquire target metadata;
[0038] The first determining module is used to determine the access status and the business to which the target metadata belongs;
[0039] The second determining module is used to determine the data value density value corresponding to the target metadata based on the access status and business to which the target metadata belongs;
[0040] The third determining module is used to determine the storage strategy corresponding to the target metadata based on the data value density value.
[0041] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the data storage method as described in the first aspect.
[0042] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data storage method as described in the first aspect.
[0043] Fifthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the data storage method as described in the first aspect.
[0044] In this embodiment, the electronic device can determine the data value density value corresponding to the target metadata based on the access status and the associated service. The electronic device then determines the storage strategy corresponding to the target metadata based on the data value density value. In this process, the electronic device can accurately determine the storage strategy corresponding to the metadata based on the access status and the associated service, avoiding waste of storage resources. Attached Figure Description
[0045] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart of a data storage method provided in an embodiment of this application;
[0047] Figure 2 This is a flowchart illustrating the generation of metadata provided in an embodiment of this application;
[0048] Figure 3This is a flowchart illustrating the construction of a hyperedge relationship or mapping relationship provided in an embodiment of this application;
[0049] Figure 4 This is a flowchart illustrating how to determine data value density values, provided in an embodiment of this application.
[0050] Figure 5 This is a schematic diagram of a module provided in an embodiment of this application;
[0051] Figure 6 This is a flowchart illustrating how to determine the data layer to which metadata belongs, provided in an embodiment of this application.
[0052] Figure 7 This is a schematic diagram of the structure of a data storage device provided in an embodiment of this application;
[0053] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] See Figure 1 , Figure 1 This is a flowchart of a data storage method provided in an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0056] Step 101: Obtain target metadata.
[0057] In some embodiments, metadata is obtained by extracting data from a data source using electronic devices.
[0058] Optionally, at least one data source may be collected; the data source includes: structured data source, semi-structured data source, and unstructured data source;
[0059] Extracting metadata from each of the at least one data source to obtain metadata corresponding to each data source, wherein the metadata corresponding to each data source includes the target metadata;
[0060] Determine the identification code corresponding to the target metadata;
[0061] Construct a first mapping relationship between the identity identification code of the target metadata and the data value density value.
[0062] In this embodiment, the electronic device can extract metadata from structured data sources, semi-structured data sources, and unstructured data sources to obtain the metadata corresponding to each data source. This breaks through the limitation of related technologies that can only process structured data, supports end-to-end traceability of unstructured data such as PDF contract documents and images and structured data such as database fields, solves the problem of cross-modal data traceability interruption, and meets the needs of managing all types of data in complex data environments.
[0063] For example, when the structured data source is a relational database (such as Oracle / MySQL), electronic devices can connect via the JDBC protocol. For instance, the electronic device can use a JDBC connection pool with a retry mechanism to retrieve data from the relational database. The parameters used during the connection process are encrypted using the AES-256 algorithm, and the encryption process can be represented as follows: .
[0064] After an electronic device obtains data from a relational database via a JDBC connection, it can retrieve the corresponding table-level metadata using the following formula:
[0065] ;
[0066] in, Define the table schema. For table name, For the first Column names, For column data types, Whether it can be null (0 / 1 Boolean value) For the j-th foreign key name, The foreign key references the table name.
[0067] The electronic device then uses the SHA-256 hash function to hash the table-level metadata, obtaining the identification code corresponding to the table-level metadata. The hash calculation formula can be: Table-level metadata can be represented as a JSON string.
[0068] In some embodiments, electronic devices can also retrieve data from relational databases using schemas.
[0069] In some embodiments, a semi-structured data source may include JSON files and XML files.
[0070] Electronic devices can parse JSON files to obtain a tree structure and identify key nodes within that structure (such as the root node, objects / arrays at specific paths), then use these key nodes as metadata. After determining the metadata, the electronic device can perform hash calculations on the paths of the nodes, for example, by applying the SHA-256 hash function, to obtain the identification code corresponding to the key node. The formula could be: .
[0071] Electronic devices can perform tree-like parsing on XML files to obtain a DOM tree, and identify key elements within the tree structure (such as the root element or elements under a specific XPath), then use these key elements as metadata. After determining the metadata, the electronic device can perform hash calculations on the content digest corresponding to the elements, for example, by applying the SHA-256 hash function, to obtain the identification code corresponding to the key element. The formula could be: .
[0072] In some embodiments, unstructured data sources may include document data, image data, and video data. When the unstructured data source is document data, the electronic device can determine the metadata corresponding to the document data through content anchoring.
[0073] In some embodiments, extracting metadata from each data source in the at least one data source to obtain the metadata corresponding to each data source includes:
[0074] When the unstructured data source is the document data, the document data is decomposed to obtain at least one text block; the text block includes: page number, text content, and bounding box coordinates, the bounding box coordinates being used to characterize the position of the text block in the document data;
[0075] Each text block in the at least one text block is identified to obtain at least one entity corresponding to each text block, and the at least one entity is used as the at least one metadata;
[0076] Determining the identity verification code corresponding to the target metadata includes:
[0077] The file identification code, page number, and bounding box coordinates corresponding to the target entity are hashed to obtain the identification code corresponding to the target entity. The target entity is an entity in at least one entity corresponding to the target text block, and the target text block is a text block in the at least one text block.
[0078] In this embodiment, the electronic device can split document data into at least one text block. A text block can be represented as: .in, Indicates page number, Represents text content, Represents the coordinates of the bounding box.
[0079] The process by which an electronic device identifies entities from a block of text using the Named Entity Recognition (NER) function can be represented as follows: Where e represents an entity, and e belongs to This is a text block. Entities can be represented as text objects identified within the text block. For example, if the content of the text block is "I want to buy a computer", then the entities could be "I" and "computer".
[0080] The electronic device then uses the entity as metadata and takes the corresponding file identification code, page number, and bounding box coordinates as input values to the SHA-256 hash function to obtain the identification code output by the SHA-256 hash function.
[0081] In this embodiment, the electronic device accurately determines the metadata corresponding to the text data by using the physical coordinate information (i.e., bounding box coordinates) corresponding to the text block, thus solving the error caused by relying solely on text semantics to obtain metadata in related technologies, and also avoiding inaccurate metadata obtained by using only page numbers.
[0082] After an electronic device determines the metadata and the corresponding identification code, it can establish a mapping relationship between the metadata and the corresponding identification code, and subsequently find the metadata through the identification code.
[0083] The following is through Figure 2 The process of generating metadata in the embodiments of this application will be described.
[0084] Step 201: Obtain the data source.
[0085] Step 202: Determine the data source type.
[0086] Step 203: Perform schema extraction on the structured data source to obtain metadata.
[0087] Step 204: Perform tree parsing on the semi-structured data source to obtain metadata.
[0088] Step 205: Anchor content in unstructured data sources to obtain metadata.
[0089] Step 206: Determine whether the metadata verification passes.
[0090] Step 207: Store metadata.
[0091] Step 208: Perform exception handling on the metadata.
[0092] In some embodiments, electronic devices may also obtain metadata from image data and determine the identification code corresponding to the metadata.
[0093] In some embodiments, after obtaining the metadata, the electronic device can also perform quality verification on the metadata. If the verification passes, the metadata is stored and subsequent steps are executed; if the verification fails, the metadata is handled as an exception.
[0094] In some embodiments, electronic devices may also use the mapping relationship between metadata corresponding to different data sources as metadata.
[0095] For example, calculating the similarity between the first metadata and the second metadata; the first metadata includes metadata generated based on the relational database, and the second metadata includes metadata generated based on the image data or metadata generated based on the document data;
[0096] If the similarity is greater than a preset similarity threshold, a second mapping relationship is constructed between the first metadata and the second metadata.
[0097] The second mapping relationship is used as the third metadata.
[0098] The following explanation will take the mapping relationship between text data and preset fields in the database as metadata as an example.
[0099] Electronic devices can calculate the cosine similarity between text data and preset fields in a database, using a formula that can be: .
[0100] in, The semantic vector of the text anchor. A semantic vector describing a field.
[0101] When the cosine similarity is greater than a preset similarity threshold, the electronic device can construct a mapping relationship between text data and preset fields in the database, and use this preset relationship as metadata. The preset similarity threshold can be 0.7.
[0102] The following example illustrates how the mapping relationship between text data and image data in a database can be used as metadata.
[0103] Electronic devices can use the CLIP model to calculate the similarity between image feature vectors and table description text vectors, where the image feature vector is the image feature vector corresponding to the image data, and the description text vector is the description text vector of the corresponding table in the database. The formula can be: .
[0104] Where I represents image data and T represents descriptive text. For image encoders, For text encoders.
[0105] When the similarity is greater than a preset similarity threshold, the electronic device can construct a mapping relationship between text data and image data, and use this preset relationship as metadata. The preset similarity threshold can be 0.7.
[0106] The following example uses the hyperedge relationship between the table node data corresponding to the database and the image anchor point corresponding to the image data as metadata to illustrate this point.
[0107] In some embodiments, the electronic device can also establish hyperedge relationships between image anchor points and table node data. These hyperedge relationships can include type, confidence level, and spatial location information. Hyperedge attributes can also include business label weights, etc. This can be represented as: .
[0108] Where V represents the vertex set, which can include: image anchor points + data entities, and A represents the hyperedge attribute set, which can include: confidence, spatial coordinates, etc.
[0109] Electronic devices then use hyperedge relationships as metadata.
[0110] The process by which electronic devices obtain metadata based on the relationship between data elements of two different modalities can be as follows: Figure 3 As shown.
[0111] Step 301: Obtain document data, image data, or video data.
[0112] Step 302: Extract the corresponding features from the image data or video data, and the location of text blocks in the document data.
[0113] Step 303: Generate the first metadata corresponding to the document data, image data, or video data.
[0114] Step 304: Obtain the second metadata corresponding to the structured data source.
[0115] Step 305: Establish the hyperedge relationship or mapping relationship between the first metadata and the second metadata.
[0116] Step 306: Complete the binding of the first metadata and the second metadata.
[0117] In this embodiment, the electronic device uses the mapping relationship between the metadata corresponding to the data sources of different modalities as new metadata, which makes it easier for the electronic device to quickly query related and highly similar data of other modalities.
[0118] Step 102: Determine the access status and the business to which the target metadata belongs.
[0119] In some embodiments, the electronic device can incorporate a behavior monitoring module to record access events for each metadata object and determine the access status of the metadata based on the access time. The access event format can be: object_id, timestamp, access_type, user. The electronic device can also determine the business tags of each metadata object through a management platform or automated rule engine to identify the business purpose of the metadata. Business tags can be: object_id, tag, weight.
[0120] Step 103: Based on the access status and business to which the target metadata belongs, determine the data value density value corresponding to the target metadata.
[0121] In some embodiments, determining the data value density value corresponding to the target metadata based on the access status and the business to which the target metadata belongs includes:
[0122] A time decay factor is determined based on the preset time decay value, preset time curvature parameter, and timestamp difference of the target metadata; wherein the timestamp difference is the difference between the current timestamp and the most recently accessed timestamp.
[0123] Based on the number of times the target metadata is accessed within a preset time period, an access frequency factor is determined;
[0124] Based on the business tags corresponding to the target metadata, determine the business weight factor corresponding to the business tags;
[0125] A first weight, a second weight, and a third weight are determined, wherein the first weight represents the weight corresponding to the time decay factor, the second weight represents the weight corresponding to the access frequency factor, and the third weight represents the weight corresponding to the service weight factor.
[0126] The data value density value corresponding to the target metadata is obtained by weighting and summing the time decay factor, the access frequency factor, the business weight factor, the first weight, the second weight, and the third weight.
[0127] In this embodiment, the electronic device can be implemented using the formula: Determine the time decay factor.
[0128] in, The preset value for time decay (can be 0.05). The difference is the timestamp, and k is the preset time curvature parameter (which can be 0.3).
[0129] In some embodiments, electronic devices may also use exponential decay. We will use this to calculate the time decay factor, without imposing too many restrictions here.
[0130] In some embodiments, an electronic device can determine the time when metadata was accessed by accessing an event. For example, ,in, The identity verification code corresponding to the metadata. The access time corresponding to the metadata. For users who access metadata.
[0131] Electronic devices can also query the time of the last access to metadata, which can be represented as: .
[0132] Electronic devices determine the required timestamp difference by comparing the current timestamp with the most recently accessed timestamp. The formula could be: .
[0133] Electronic devices can be controlled by the following formula: Determine the access frequency factor.
[0134] in, This represents the number of times the metadata was accessed within a preset time period. The preset time period can be 30 days.
[0135] Among them, electronic devices can be represented by the formula: This determines the number of times all metadata has been accessed. Based on the metadata's identification code, it determines the number of times the corresponding metadata has been accessed within a preset time period, which can be represented as: .
[0136] Electronic devices can retrieve the weight score of each tag from a predefined rule base based on the business tags in the metadata, and take the maximum value as the business weight factor. The formula could be: .
[0137] Where T represents the set of business labels, and w(t) represents the weight function of the business labels.
[0138] Among them, electronic devices can be represented by the formula: This retrieves predefined or rule engine-assigned business tags. And through the formula: Query the third weight below.
[0139] Wherein, assuming that the metadata is obtained from hyperedge relationships, the formula for the business weight factor corresponding to the metadata is: ,in, The business label weights for the image data corresponding to the hyperedge relationship. The business label weights of the tables in the dataset corresponding to the hyperedge relationship. This represents the business tag weight corresponding to the hyperedge relationship.
[0140] The electronic device then acquires the first weight, the second weight, and the third weight, and performs a weighted summation of the first weight, the second weight, the third weight, the time decay factor, the access frequency factor, and the business weight factor to obtain the data value density value.
[0141] Its formula can be: .
[0142] in, As the first weight, As the second weight, As the third weight, it satisfies . It can be 0.4. It can be 0.3. It can be 0.3.
[0143] In this embodiment, the electronic device can accurately obtain the data value density value by weighting and summing the first weight, the second weight, the third weight, the time decay factor, the access frequency factor, and the business weight factor. Furthermore, in this embodiment, by using a preset time decay value instead of the exponential decay in related technologies, the problem of misjudging the data value density value caused by long-term inaccessibility of high-value data can be solved.
[0144] The following is through Figure 4 The process of determining the data value density value is explained.
[0145] Step 401: Enter metadata.
[0146] Step 402: Determine the time decay factor.
[0147] Step 403: Determine the access frequency factor.
[0148] Step 404: Determine the business weighting factors.
[0149] Step 405: Perform a weighted summation of the first weight, second weight, third weight, time decay factor, access frequency factor, and business weight factor.
[0150] Step 406: Generate data value density values.
[0151] like Figure 5 As shown, the process of determining the data value density value is explained based on the relationships between modules. Figure 5In this module, the metadata collection module is used to collect metadata, the identity code generation module is used to generate identity codes for metadata, the metadata repository is used to store metadata, the behavior monitoring module is used to monitor the access status of metadata, and the value density module is used to calculate the data value density value.
[0152] In some embodiments, the proportional relationship between the first weight, the second weight, and the third weight is determined based on the ratio of the actual storage cost to the preset storage cost, the ratio of the actual latency time to the preset latency time, and the information loss rate corresponding to the target metadata.
[0153] In this embodiment, the electronic device can adjust the ratio between the first weight, the second weight, and the third weight to 2:6:2 when the ratio of the actual storage cost to the preset storage cost is greater than the first preset ratio. The first preset ratio can be 1.2.
[0154] The electronic device can also adjust the ratio between the first weight, the second weight, and the third weight to 6:2:2 if the ratio of the actual delay time to the preset delay time is greater than the second preset ratio. The second preset ratio can be 1.1.
[0155] The electronic device can also adjust the ratio of the first weight, second weight, and third weight to 3:2:5 if the information loss rate corresponding to the target metadata is greater than a third preset value. The third preset value can be 0.15, and the information loss rate can be expressed by the formula: The information loss is caused by the following storage strategies.
[0156] In other cases, the ratio of the first, second, and third weights will be adjusted to 4:3:3.
[0157] Understandably, in this embodiment, the electronic device can dynamically adjust the proportional relationship between the first weight, the second weight, and the third weight based on the ratio of actual storage cost to preset storage cost, the ratio of actual latency time to preset latency time, and the information loss rate corresponding to metadata. For example, in some application scenarios, such as during peak business periods, like when quarterly reports are generated, the electronic device can automatically increase the data value density value of temporarily frequently accessed data by adjusting the proportional relationship between the weights, avoiding resource contention caused by data being left unused due to misjudgment of value. That is, this embodiment can optimize resource allocation in real time according to changes in business needs, effectively reducing access latency during peak business periods, and improving the adaptability and stability of the electronic device to business changes. Furthermore, in this embodiment, a feedback mechanism for access behavior can be constructed, where user data query behavior automatically affects the data value density value corresponding to the data. The static and unadjusted weights in related technologies differ, realizing the core capability of business self-adaptation.
[0158] Step 104: Determine the storage strategy corresponding to the target metadata based on the data value density value.
[0159] In some embodiments, the storage strategy includes: a first storage strategy, a second storage strategy, and a third storage strategy;
[0160] The step of determining the storage strategy corresponding to the target metadata based on the data value density value includes:
[0161] If the data value density value corresponding to the target metadata is greater than the first preset density value, the storage strategy for the target metadata is determined to be the first storage strategy; the first storage strategy is to perform local sensitive hash transformation on the vector in the target metadata to obtain a hash code, and store the hash code;
[0162] If the data value density value corresponding to the target metadata is less than or equal to the first preset density value and greater than the second preset density value, the storage strategy for the target metadata is determined to be the second storage strategy; the second storage strategy is to perform dimensionality reduction processing on the vector in the target metadata to obtain the dimensionality-reduced vector, and then store the dimensionality-reduced vector.
[0163] If the data value density value corresponding to the target metadata is less than or equal to the second preset density value, the storage strategy for the target metadata is determined to be the third storage strategy, wherein the first preset density value is greater than the second preset density value; the third storage strategy is to perform wavelet compression on the target metadata to obtain compressed data, and then store the compressed metadata.
[0164] In this embodiment, the electronic device can divide metadata into three levels—hot data layer, warm data layer, and cold data layer—based on preset density values. Metadata in the hot data layer is accessed more frequently and has a high data value density; metadata in the warm data layer is accessed less frequently and has a lower data value density compared to metadata in the hot data layer; and metadata in the cold data layer is accessed less frequently and has a lower data value density compared to metadata in the warm data layer. When the data value density value of metadata is greater than a first preset density value, the metadata belongs to the hot data layer and is stored using a first storage strategy. When the data value density value of metadata is less than or equal to the first preset density value but greater than a second preset density value, the metadata belongs to the warm data layer and is stored using a second storage strategy. When the data value density value of metadata is less than the second preset density value, the metadata belongs to the cold data layer and is stored using a third storage strategy.
[0165] In some embodiments, the electronic device can implement a first storage strategy using Locality Sensitive Hash (LSH). For example, the electronic device can input a vector from the target metadata into the LSH to obtain a 512-bit hash code, and then store this hash code. This method ensures high-performance queries of the metadata subsequently. This process uses column-level transformation processing logic.
[0166] Electronic devices can also implement a second storage strategy using Uniform Manifold Approximation and Projection (UMAP) dimensionality reduction. The electronic device can input vectors from metadata into a UMAP, obtain the dimensionality-reduced vectors output by the UMAP, and then store these dimensionality-reduced vectors. This method can balance storage performance, query performance, and cost. This process uses table-level transformation and summarization processing logic.
[0167] Electronic devices can also implement a third storage strategy using wavelet compression. The electronic device can perform a 5-level wavelet decomposition on the metadata, retaining over 95% of the coefficients' energy to obtain compressed data, and then store the compressed metadata.
[0168] The formula for wavelet compression can be: .
[0169] in, This represents the i-th coefficient obtained after wavelet decomposition. Let N be the energy (squared amplitude) of the coefficients. The numerator of the formula is the cumulative energy of the first i coefficients, and the denominator is the total energy of all coefficients N. This is the set of coefficients to be retained. This method can maximize cost reduction.
[0170] In some embodiments, electronic devices may also replace the compressed storage in this embodiment with a hierarchical storage strategy, without further restrictions.
[0171] In some embodiments, the first preset density value may be 0.8, and the second preset density value may be 0.3.
[0172] In some embodiments, the electronic device can monitor and determine the data value density value of each metadata in real time, and adjust the storage strategy of each metadata in real time based on the data value density value.
[0173] For example, if the data value density value of a certain metadata is below 0.8 for three consecutive days, it will be migrated from the hot data layer to the warm data layer and the second storage strategy will be used. Or, if the data value density value of a certain metadata is below 0.3 for seven consecutive days, it will be migrated from the warm data layer to the cold data layer and the third storage strategy will be used. Or, if the data value density value of a certain metadata is greater than 0.4, and this metadata belongs to the cold data layer, and this metadata is accessed, it will be migrated from the cold data layer to the warm data layer and the second storage strategy will be used. Or, if the data value density value of a certain metadata suddenly exceeds 0.85, it will be migrated to the hot data layer and the first storage strategy will be used.
[0174] The process of adjusting the data layer can be as follows: Figure 6 As shown.
[0175] Step 601: Obtain the data value density value of metadata in real time.
[0176] Step 602: Determine whether the data value density value meets the conditions for adjusting the data layer.
[0177] Step 603: Perform data layer migration on the metadata.
[0178] Step 604: Maintain the current data layer for metadata.
[0179] Understandably, in this embodiment, the electronic device can determine the corresponding storage strategy in real time based on the data value density value of the metadata. This prevents the use of cold data layer storage strategies for metadata with high data value density, thus allocating high-performance storage resources only to metadata with high data value density, reducing storage costs by approximately 60%, and avoiding resource waste or storage performance bottlenecks caused by fixed storage strategies. Furthermore, this embodiment uses different storage granularities and dimensionality reduction / compression techniques for different storage strategies, prioritizing the storage and retrieval performance of high-value lineage data in scenarios such as data anomaly tracing and business auditing. Moreover, by using appropriate storage strategies, the query latency can be controlled within 100ms during subsequent queries of metadata with high data value density, improving fault location efficiency several times over and significantly enhancing the accuracy of data management and its practical application value.
[0180] As demonstrated by steps 101-104 above, the electronic device can determine the data value density value corresponding to the target metadata based on the access status and the associated business. The electronic device then determines the storage strategy corresponding to the target metadata based on the data value density value. In this process, the electronic device can accurately determine the storage strategy for the metadata based on its access status and the associated business, avoiding waste of storage resources.
[0181] In the embodiments of this application, during the metadata collection process, a distributed computing framework (such as Spark) can be used to collect metadata from multiple data sources in parallel. The formula for calculating the degree of parallelism is:
[0182] .
[0183] in, This represents the total number of data source elements.
[0184] Meanwhile, to ensure load balancing of electronic equipment, the equipment can evenly distribute data sources to worker nodes to improve collection efficiency and support massive amounts of data. The calculation formula for the data source index range allocated to the k-th worker node is as follows:
[0185] .
[0186] in, Indicates the total number of data sources. Indicates the number of working nodes. The rounding up symbol is used to achieve a uniform distribution of data sources among worker nodes.
[0187] In some embodiments, electronic devices can also capture changed data by listening to change events in the data source, such as through Create, Update, and Delete operations, and synchronize the change events to the metadata in real time, ensuring that the metadata is based on the new data source.
[0188] In some embodiments, the electronic device can also use the Prophet algorithm to predict highly accessed metadata within the next two hours based on historical access data of metadata. The specific algorithm implementation is as follows:
[0189] .
[0190] in, This represents the historical visit count; seasonality=24 indicates daily periodicity. When the predicted value... More than the historical average number of visits Add twice the standard deviation At that time, the metadata corresponding to the identity code is preloaded into the hot layer storage, thereby proactively improving the response speed of high-value / high-access data. and Based on the number of visits over the past 7 days, we ensure that the predicted high-visit targets align with recent business patterns.
[0191] Since a scenario exists where actual access volume is lower than the predicted value after cache preheating, resulting in invalid occupation of hotspot resources, electronic devices can also introduce a prediction accuracy evaluation module. This module can review the preheating effect of the past 24 hours daily, calculating the deviation rate between "predicted access volume (gt)" and "actual access volume (actual)". The formula can be:
[0192] .
[0193] If the deviation rate is greater than 50% for three consecutive days, the preheating threshold of the electronic equipment should be increased, for example, from... Adjusted to .
[0194] If the deviation rate is less than 20%, the threshold can be lowered, for example, from... Adjusted to Reduce ineffective preheating.
[0195] During the migration of metadata for electronic devices, a migration transaction protocol can be constructed, employing two-phase commit (2PC) to ensure the atomicity of cross-level migration.
[0196] In the first phase, the hierarchical controller sends a "Ready to Migrate" request to the target storage layer, inquiring whether it can receive and write data. The target storage layer checks its own status (such as storage space, load, health, etc.). If everything is normal, it locks necessary resources (such as reserving space, creating temporary replicas, etc.) and returns a READY status. If it cannot receive data, it returns a failure status.
[0197] Only after the target storage layer returns READY does the hierarchical controller proceed to the second phase. In the second phase, the hierarchical controller first instructs the source storage layer to delete the data. Then, it instructs the target storage layer to commit the write (that is, to formally persist the data and make it publicly visible).
[0198] If the target storage layer in the first phase does not return READY (i.e., returns failure or timeout), the hierarchical controller sends a rollback instruction to all participants (mainly the source storage layer and the target storage layer) to ensure that no data is lost during the migration process.
[0199] In one embodiment, the electronic device can also generate a digital signature for each metadata object and verify it using a public key (PK). This can be represented as follows:
[0200] .
[0201] in, Represented as a metadata object, Represented as a digital signature, It represents a public / private key pair; a value of 1 indicates successful verification.
[0202] In some embodiments, when the proportion of corrupted metadata objects exceeds 0.1%, the electronic device will trigger automatic metadata repair. During the automatic repair process, the electronic device can restore metadata from backup storage to ensure data reliability.
[0203] It is understandable that by using the embodiments of this application, storage costs can be optimized and excessive access to storage resources can be reduced; at the same time, the rate of data degradation due to errors can be significantly reduced. Furthermore, real-time queries (<100ms) can shorten fault location time from hours to minutes; cross-modal correlation capabilities support the linked auditing of PDF contracts and database fields, effectively improving compliance check efficiency and enhancing operation and decision-making efficiency. Moreover, it can handle sudden business demands (such as a surge in temporary data access due to marketing campaigns), avoiding the performance bottlenecks of static and unchanging permission policies in related technologies, improving user satisfaction, and supporting large-scale data management for emerging businesses, providing support for future technology upgrades. It can also help enterprises build technical barriers to data asset management, forming a differentiated advantage in digital transformation.
[0204] Please refer to Figure 7 , Figure 7 This is a schematic diagram of a data storage device according to an embodiment of this application. The data storage device 700 includes:
[0205] Module 701 is used to obtain target metadata;
[0206] The first determining module 702 is used to determine the access status and the business to which the target metadata belongs;
[0207] The second determining module 703 is used to determine the data value density value corresponding to the target metadata based on the access status and business to which the target metadata belongs;
[0208] The third determining module 704 is used to determine the storage strategy corresponding to the target metadata based on the data value density value.
[0209] Optionally, the data storage device 700 also includes:
[0210] The data acquisition module is used to acquire data from at least one data source; the data source includes: structured data source, semi-structured data source, and unstructured data source.
[0211] An extraction module is used to extract metadata from each data source in the at least one data source to obtain metadata corresponding to each data source, wherein the metadata corresponding to each data source includes the target metadata;
[0212] The fourth determining module is used to determine the identity verification code corresponding to the target metadata;
[0213] The first construction module is used to construct a first mapping relationship between the identity identification code of the target metadata and the data value density value.
[0214] Optionally, the unstructured data source includes: document data, and the extraction module may further include:
[0215] A decomposition unit is configured to decompose the document data into at least one text block when the unstructured data source is the document data; the text block includes: page number, text content, and bounding box coordinates, wherein the bounding box coordinates are used to characterize the position of the text block in the document data;
[0216] The identification unit is used to identify each text block in the at least one text block, obtain at least one entity corresponding to each text block, and use the at least one entity as the at least one metadata.
[0217] The fourth determining module may also include:
[0218] The first calculation unit is used to perform hash calculation on the file identification code, page number and bounding box coordinates corresponding to the target entity to obtain the identification code corresponding to the target entity. The target entity is an entity in at least one entity corresponding to the target text block, and the target text block is a text block in the at least one text block.
[0219] Optionally, the structured data source includes data from a relational database, and the unstructured data source includes image data; the data storage device 700 further includes:
[0220] A calculation module is used to calculate the similarity between first metadata and second metadata; the first metadata includes metadata generated based on the relational database, and the second metadata includes metadata generated based on the image data or metadata generated based on the document data.
[0221] The second construction module is used to construct a second mapping relationship between the first metadata and the second metadata when the similarity is greater than a preset similarity threshold;
[0222] The fifth determining module is used to use the second mapping relationship as the third metadata.
[0223] Optionally, the second determining module 703 may further include:
[0224] The first determining unit is used to determine a time decay factor based on the time decay preset value, preset time curvature parameter, and the difference between timestamps of the target metadata; wherein the difference between timestamps is the difference between the current timestamp and the most recently accessed timestamp.
[0225] The second determining unit is used to determine the access frequency factor based on the number of times the target metadata is accessed within a preset time period;
[0226] The third determining unit is used to determine the business weight factor corresponding to the business tag based on the business tag corresponding to the target metadata;
[0227] The fourth determining unit is used to determine the first weight, the second weight, and the third weight, wherein the first weight represents the weight corresponding to the time decay factor, the second weight represents the weight corresponding to the access frequency factor, and the third weight represents the weight corresponding to the service weight factor.
[0228] The weighting unit is used to perform a weighted summation of the time decay factor, the access frequency factor, the business weight factor, the first weight, the second weight, and the third weight to obtain the data value density value corresponding to the target metadata.
[0229] Optionally, the data storage device 700 also includes:
[0230] The sixth determining module is used to determine the proportional relationship between the first weight, the second weight, and the third weight based on the ratio of the actual storage cost to the preset storage cost, the ratio of the actual latency time to the preset latency time, and the information loss rate corresponding to the target metadata.
[0231] Optionally, the storage strategy includes: a first storage strategy, a second storage strategy, and a third storage strategy;
[0232] The third determining module 704 may also include:
[0233] The fifth determining unit is configured to determine the storage strategy of the target metadata as the first storage strategy when the data value density value corresponding to the target metadata is greater than the first preset density value; the first storage strategy is to perform local sensitive hash transformation on the vector in the target metadata to obtain a hash code, and store the hash code.
[0234] The sixth determining unit is configured to determine the storage strategy of the target metadata as the second storage strategy when the data value density value corresponding to the target metadata is less than or equal to the first preset density value and greater than the second preset density value; the second storage strategy is to perform dimensionality reduction processing on the vector in the target metadata to obtain a dimensionality-reduced vector, and store the dimensionality-reduced vector;
[0235] The seventh determining unit is configured to determine the storage strategy of the target metadata as the third storage strategy when the data value density value corresponding to the target metadata is less than or equal to the second preset density value, wherein the first preset density value is greater than the second preset density value; the third storage strategy is to perform wavelet compression on the target metadata to obtain compressed data, and store the compressed metadata.
[0236] The data storage device 700 provided in this application embodiment can perform the above-described... Figure 1 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0237] This application also provides an electronic device. Since the principle by which this electronic device solves the problem is similar to the data storage method in the embodiments of this application, the implementation of this electronic device can be found elsewhere. Figure 1 The implementation of the method shown will not be repeated here. Figure 8 As shown, the electronic device according to an embodiment of this application includes: a processor 810, configured to read a program from a memory 820 and execute the following processes:
[0238] Obtain target metadata;
[0239] Determine the access status and associated business of the target metadata;
[0240] Based on the access status and business to which the target metadata belongs, determine the data value density value corresponding to the target metadata;
[0241] The storage strategy corresponding to the target metadata is determined based on the data value density value.
[0242] Optionally, the processor 810 is also used to read the program from the memory 820 and perform the following steps:
[0243] Collect at least one data source; the data source includes: structured data source, semi-structured data source, and unstructured data source;
[0244] Extracting metadata from each of the at least one data source to obtain metadata corresponding to each data source, wherein the metadata corresponding to each data source includes the target metadata;
[0245] Determine the identification code corresponding to the target metadata;
[0246] Construct a first mapping relationship between the identity identification code of the target metadata and the data value density value.
[0247] Optionally, the unstructured data source includes: document data, and the processor 810 is further configured to read the program in the memory 820 and perform the following steps:
[0248] The step of extracting metadata from each of the at least one data source to obtain the metadata corresponding to each data source includes:
[0249] When the unstructured data source is the document data, the document data is decomposed to obtain at least one text block; the text block includes: page number, text content, and bounding box coordinates, the bounding box coordinates being used to characterize the position of the text block in the document data;
[0250] Each text block in the at least one text block is identified to obtain at least one entity corresponding to each text block, and the at least one entity is used as the at least one metadata;
[0251] Determining the identity verification code corresponding to the target metadata includes:
[0252] The file identification code, page number, and bounding box coordinates corresponding to the target entity are hashed to obtain the identification code corresponding to the target entity. The target entity is an entity in at least one entity corresponding to the target text block, and the target text block is a text block in the at least one text block.
[0253] Optionally, the structured data source includes data from a relational database, and the unstructured data source includes image data; the processor 810 is also configured to read the program from the memory 820 and perform the following steps:
[0254] Calculate the similarity between the first metadata and the second metadata; the first metadata includes metadata generated based on the relational database, and the second metadata includes metadata generated based on the image data or metadata generated based on the document data.
[0255] If the similarity is greater than a preset similarity threshold, a second mapping relationship is constructed between the first metadata and the second metadata.
[0256] The second mapping relationship is used as the third metadata.
[0257] Optionally, the processor 810 is also used to read the program from the memory 820 and perform the following steps:
[0258] The step of determining the data value density value corresponding to the target metadata based on the access status and the business to which the target metadata belongs includes:
[0259] A time decay factor is determined based on the preset time decay value, preset time curvature parameter, and timestamp difference of the target metadata; wherein the timestamp difference is the difference between the current timestamp and the most recently accessed timestamp.
[0260] Based on the number of times the target metadata is accessed within a preset time period, an access frequency factor is determined;
[0261] Based on the business tags corresponding to the target metadata, determine the business weight factor corresponding to the business tags;
[0262] A first weight, a second weight, and a third weight are determined, wherein the first weight represents the weight corresponding to the time decay factor, the second weight represents the weight corresponding to the access frequency factor, and the third weight represents the weight corresponding to the service weight factor.
[0263] The data value density value corresponding to the target metadata is obtained by weighting and summing the time decay factor, the access frequency factor, the business weight factor, the first weight, the second weight, and the third weight.
[0264] Optionally, the processor 810 is also used to read the program from the memory 820 and perform the following steps:
[0265] Based on the ratio of actual storage cost to preset storage cost, the ratio of actual latency time to preset latency time, and the information loss rate corresponding to the target metadata, the proportional relationship between the first weight, the second weight, and the third weight is determined.
[0266] Optionally, the storage strategy includes: a first storage strategy, a second storage strategy, and a third storage strategy;
[0267] The processor 810 is also used to read the program from the memory 820 and to perform the following steps:
[0268] The step of determining the storage strategy corresponding to the target metadata based on the data value density value includes:
[0269] If the data value density value corresponding to the target metadata is greater than the first preset density value, the storage strategy for the target metadata is determined to be the first storage strategy; the first storage strategy is to perform local sensitive hash transformation on the vector in the target metadata to obtain a hash code, and store the hash code;
[0270] If the data value density value corresponding to the target metadata is less than or equal to the first preset density value and greater than the second preset density value, the storage strategy for the target metadata is determined to be the second storage strategy; the second storage strategy is to perform dimensionality reduction processing on the vector in the target metadata to obtain the dimensionality-reduced vector, and then store the dimensionality-reduced vector.
[0271] If the data value density value corresponding to the target metadata is less than or equal to the second preset density value, the storage strategy for the target metadata is determined to be the third storage strategy, wherein the first preset density value is greater than the second preset density value; the third storage strategy is to perform wavelet compression on the target metadata to obtain compressed data, and then store the compressed metadata.
[0272] Among them, Figure 8 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 810 and memory represented by memory 820 together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface.
[0273] The electronic device provided in this application embodiment can perform the above-described functions. Figure 1 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0274] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described data storage method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0275] This application also provides a computer program product, including computer instructions. When executed by a processor, these computer instructions implement the various processes of the above-described data storage method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0276] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0277] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0278] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A data storage method, characterized in that, The method includes: Obtain target metadata; Determine the access status and associated business of the target metadata; Based on the access status and business to which the target metadata belongs, determine the data value density value corresponding to the target metadata; The storage strategy corresponding to the target metadata is determined based on the data value density value.
2. The method according to claim 1, characterized in that, The method further includes: Collect at least one data source; the data source includes: structured data source, semi-structured data source, and unstructured data source; Extracting metadata from each of the at least one data source to obtain metadata corresponding to each data source, wherein the metadata corresponding to each data source includes the target metadata; Determine the identification code corresponding to the target metadata; Construct a first mapping relationship between the identity identification code of the target metadata and the data value density value.
3. The method according to claim 2, characterized in that, The unstructured data source includes: document data. The extraction of metadata corresponding to each data source from the at least one data source includes: When the unstructured data source is the document data, the document data is decomposed to obtain at least one text block; the text block includes: page number, text content, and bounding box coordinates, the bounding box coordinates being used to characterize the position of the text block in the document data; Each text block in the at least one text block is identified to obtain at least one entity corresponding to each text block, and the at least one entity is used as the at least one metadata; Determining the identity verification code corresponding to the target metadata includes: The file identification code, page number, and bounding box coordinates corresponding to the target entity are hashed to obtain the identification code corresponding to the target entity. The target entity is an entity in at least one entity corresponding to the target text block, and the target text block is a text block in the at least one text block.
4. The method according to claim 2, characterized in that, The structured data source includes data from a relational database, and the unstructured data source includes image data; the method further includes: Calculate the similarity between the first metadata and the second metadata; the first metadata includes metadata generated based on the relational database, and the second metadata includes metadata generated based on the image data or metadata generated based on the document data. If the similarity is greater than a preset similarity threshold, a second mapping relationship is constructed between the first metadata and the second metadata. The second mapping relationship is used as the third metadata.
5. The method according to claim 1, characterized in that, The step of determining the data value density value corresponding to the target metadata based on the access status and the business to which the target metadata belongs includes: A time decay factor is determined based on the preset time decay value, preset time curvature parameter, and timestamp difference of the target metadata; wherein the timestamp difference is the difference between the current timestamp and the most recently accessed timestamp. Based on the number of times the target metadata is accessed within a preset time period, an access frequency factor is determined; Based on the business tags corresponding to the target metadata, determine the business weight factor corresponding to the business tags; A first weight, a second weight, and a third weight are determined, wherein the first weight represents the weight corresponding to the time decay factor, the second weight represents the weight corresponding to the access frequency factor, and the third weight represents the weight corresponding to the service weight factor. The data value density value corresponding to the target metadata is obtained by weighting and summing the time decay factor, the access frequency factor, the business weight factor, the first weight, the second weight, and the third weight.
6. The method according to claim 5, characterized in that, The method further includes: Based on the ratio of actual storage cost to preset storage cost, the ratio of actual latency time to preset latency time, and the information loss rate corresponding to the target metadata, the proportional relationship between the first weight, the second weight, and the third weight is determined.
7. The method according to claim 1, characterized in that, The storage strategy includes: a first storage strategy, a second storage strategy, and a third storage strategy; The step of determining the storage strategy corresponding to the target metadata based on the data value density value includes: If the data value density value corresponding to the target metadata is greater than the first preset density value, the storage strategy for the target metadata is determined to be the first storage strategy; the first storage strategy is to perform local sensitive hash transformation on the vector in the target metadata to obtain a hash code, and store the hash code; If the data value density value corresponding to the target metadata is less than or equal to the first preset density value and greater than the second preset density value, the storage strategy for the target metadata is determined to be the second storage strategy; the second storage strategy is to perform dimensionality reduction processing on the vector in the target metadata to obtain the dimensionality-reduced vector, and then store the dimensionality-reduced vector. If the data value density value corresponding to the target metadata is less than or equal to the second preset density value, the storage strategy for the target metadata is determined to be the third storage strategy, wherein the first preset density value is greater than the second preset density value; the third storage strategy is to perform wavelet compression on the target metadata to obtain compressed data, and then store the compressed metadata.
8. A data storage device, characterized in that, include: The acquisition module is used to acquire target metadata; The first determining module is used to determine the access status and the business to which the target metadata belongs; The second determining module is used to determine the data value density value corresponding to the target metadata based on the access status and business to which the target metadata belongs; The third determining module is used to determine the storage strategy corresponding to the target metadata based on the data value density value.
9. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the data storage method as described in any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data storage method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps in the data storage method as described in any one of claims 1 to 7.