Flash card data storage method, device, equipment and storage medium

By analyzing the attributes and characteristics of the flash card data, combined with data access information and storage unit information, the target storage unit is determined, which solves the problem that traditional storage methods cannot store diverse data in a targeted manner, and achieves effective management and security of data.

CN118426712BActive Publication Date: 2024-08-30深圳市天创伟业科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410895410.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-08-30
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The traditional flash card data storage method lacks in-depth analysis of data characteristics and cannot perform targeted storage of different types of data, resulting in ineffective data management.

Method used

Through attribute analysis and feature analysis of the data to be stored, the target data processing algorithm and feature information are obtained, and the target storage unit is determined based on the data access information and storage unit information, and targeted storage is performed.

Benefits of technology

It achieves effective management of data, ensures the authenticity and reliability of data, and improves the efficiency and security of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426712B
    Figure CN118426712B
Patent Text Reader

Abstract

The present application relates to the field of flash memory card technology, and provides a flash memory card data storage method, device, equipment and storage medium. The method includes: obtaining data to be stored, and performing attribute analysis on the data to be stored to obtain the attribute category of the data to be stored; obtaining the target data processing algorithm corresponding to the data to be stored in the database based on the attribute category, and preprocessing the data to be stored based on the target data processing algorithm to obtain the target data; performing feature analysis on the target data to obtain feature information corresponding to the target data; obtaining data access information and storage unit information of the flash memory card, and determining the target storage unit of the target data based on the data access information, the storage unit information and the feature information; wherein the flash memory card is provided with multiple storage units; storing the target data in the target storage unit. The method helps to achieve effective management of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of flash memory card technology, and in particular to a flash memory card data storage method, device, equipment and storage medium. Background Art

[0002] With the rapid development of information technology, flash memory cards are widely used in various electronic devices, such as smart phones, digital cameras, tablet computers, etc. However, traditional flash memory card data storage methods usually adopt simple sequential storage or random storage strategies. In the face of increasingly diverse data types, this method lacks in-depth analysis of data characteristics when storing data, and cannot store different types of data in a targeted manner, thus failing to achieve effective data management. Summary of the invention

[0003] The present application provides a flash memory card data storage method, device, equipment and storage medium to solve the problems raised by the above background technology.

[0004] In a first aspect, the present application provides a flash memory card data storage method, comprising:

[0005] Acquire the data to be stored, and perform attribute analysis on the data to be stored to obtain the attribute category of the data to be stored;

[0006] Acquire a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and pre-process the data to be stored based on the target data processing algorithm to obtain target data;

[0007] Performing feature analysis on the target data to obtain feature information corresponding to the target data;

[0008] Acquire data access information and storage unit information of the flash memory card, and determine the target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with a plurality of storage units;

[0009] The target data is stored in the target storage unit.

[0010] In a possible implementation, the characteristic information includes a bit value and a content category of the target data, the storage unit information includes a performance level and a remaining capacity of each storage unit in the flash memory card, and determining a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information includes:

[0011] determining an access level of the target data based on the data access information and the content category;

[0012] determining a plurality of initial target storage units based on the access level and the performance level of each of the storage units;

[0013] Determine whether there is an intermediate target storage unit in each of the initial target storage units; wherein the remaining capacity of the intermediate target storage unit is not less than the bit value;

[0014] If so, a target storage unit is determined in each of the intermediate target storage units; wherein the target storage unit is the storage unit with the highest performance level in each of the intermediate target storage units.

[0015] In a possible implementation manner, after determining whether there is an intermediate target storage unit in each of the initial target storage units, the method includes:

[0016] If not, determining whether the sum of the remaining capacities of the initial target storage units is not less than the bit value;

[0017] If so, each of the initial target storage units is determined to be a target storage unit.

[0018] In a possible implementation, after determining whether the sum of the remaining capacities of the initial target storage units is not less than the bit value, the method further includes:

[0019] If not, calculating the difference between the bit value and the sum of the remaining capacity;

[0020] Determine a target candidate storage unit from each candidate storage unit; wherein the candidate storage unit is a storage unit other than each of the initial target storage units, the remaining capacity of the candidate storage unit is greater than the difference, and the target candidate storage unit is a storage unit with the highest performance level among each of the candidate storage units;

[0021] Each of the initial target storage unit and the target candidate storage unit is determined as a target storage unit.

[0022] In a possible implementation, the data access information includes historical access information of each historical access, the historical access information includes an access content category and an access time, and determining the access level of the target data based on the data access information and the content category includes:

[0023] For each access content category, count the first access number and the second access number corresponding to the access content category, calculate the ratio between the second access number and the first access number, and calculate the product between the first access number and the ratio; wherein the first access number is the total number of historical accesses corresponding to the access content category, the second access number is the number of accesses corresponding to the access content category within a preset time period, the second access number is less than the first access number, and the preset time period is connected to the current moment;

[0024] Arranging the access content categories in sequence based on the products corresponding to the access content categories to obtain an access content category sequence; wherein the products corresponding to the access content categories in the access content category sequence decrease in sequence;

[0025] A target access content category corresponding to the content category is determined in the access content category sequence, and an order corresponding to the target access content category in the access content category sequence is determined as the access level.

[0026] In a possible implementation, the determining of a plurality of initial target storage units based on the access level and the performance level of each of the storage units includes:

[0027] Traversing a preset access level-performance level mapping relationship table to determine a performance level corresponding to the access level; wherein the access level corresponds to multiple performance levels;

[0028] The storage units corresponding to the respective performance levels are determined as initial target storage units.

[0029] In a possible implementation manner, storing the target data in the target storage unit includes:

[0030] Encoding the target data based on a preset encoding rule to obtain a check code corresponding to the target data, and constructing a mapping relationship between the check code and the target data;

[0031] Obtain the authorized user information of the flash memory card, and perform matrix encoding on the authorized user information based on a preset matrix encoding rule to obtain a coding matrix corresponding to the authorized user information; wherein the coding matrix is ​​a square matrix, and the number of elements in the coding matrix is ​​2 n , n is an integer greater than 3;

[0032] The coding matrix is ​​segmented to obtain a plurality of 2×2 square matrices;

[0033] Calculate the eigenvalues ​​corresponding to each 2×2 square matrix respectively to obtain eigenvalue information corresponding to each square matrix; wherein the eigenvalue information includes at least one eigenvalue;

[0034] For each piece of eigenvalue information, each eigenvalue in the eigenvalue information is added to obtain a eigendigit corresponding to the eigenvalue information;

[0035] Determine an intermediate target matrix in each 2×2 square matrix based on each of the characteristic numbers; wherein the characteristic number corresponding to the intermediate target matrix is ​​an integer;

[0036] For each of the intermediate target matrices, multiply the intermediate target matrix by the characteristic number corresponding to the intermediate target matrix to obtain a target matrix;

[0037] Arrange the target matrices in sequence based on the positions of the intermediate target matrices corresponding to the target matrices in the encoding matrix to obtain a matrix sequence;

[0038] The mapping relationship is encrypted using the matrix sequence to obtain an encrypted mapping relationship, and the encrypted mapping relationship is stored in the target storage unit.

[0039] In a second aspect, the present application provides a flash memory card data storage device, comprising:

[0040] An acquisition module, used to acquire data to be stored, and perform attribute analysis on the data to be stored to obtain attribute categories of the data to be stored;

[0041] A processing module, used for acquiring a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and preprocessing the data to be stored based on the target data processing algorithm to obtain target data;

[0042] An analysis module, used to perform feature analysis on the target data to obtain feature information corresponding to the target data;

[0043] a determination module, configured to obtain data access information and storage unit information of the flash memory card, and determine a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with a plurality of storage units;

[0044] A storage module is used to store the target data into the target storage unit.

[0045] In a third aspect, the present application provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the flash memory card data storage method as described above is implemented.

[0046] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the flash memory card data storage method as described above is implemented.

[0047] The present application discloses a flash memory card data storage method, device, equipment and storage medium, wherein the method comprises: obtaining data to be stored, and performing attribute analysis on the data to be stored to obtain the attribute category of the data to be stored; obtaining a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and preprocessing the data to be stored based on the target data processing algorithm to obtain target data; performing feature analysis on the target data to obtain feature information corresponding to the target data; obtaining data access information and storage unit information of the flash memory card, and determining the target storage unit of the target data based on the data access information, the storage unit information and the feature information; wherein the flash memory card is provided with a plurality of storage units; and storing the target data in the target storage unit. The method, on the one hand, obtains the attribute category of the data to be stored by performing attribute analysis on the data to be stored, obtains the target data processing algorithm corresponding to the data to be stored in the database based on the attribute category, and pre-processes the data to be stored based on the target data processing algorithm, thereby effectively processing the data to be stored, thereby ensuring the authenticity and reliability of the data to be stored. On the other hand, the method obtains the feature information corresponding to the target data by performing feature analysis on the target data, obtains the data access information and storage unit information of the flash memory card, and determines the target storage unit of the target data based on the data access information, the storage unit information and the feature information, thereby realizing targeted storage of data and further realizing effective management of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0049] Figure 1 A schematic diagram of a flow chart of a flash memory card data storage method provided in an embodiment of the present application;

[0050] Figure 2 A schematic block diagram of the structure of a flash memory card data storage device provided in an embodiment of the present application;

[0051] Figure 3 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0054] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0055] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0056] With the rapid development of information technology, flash memory cards are widely used in various electronic devices, such as smart phones, digital cameras, tablet computers, etc. However, the traditional flash memory card data storage method usually adopts a simple sequential storage or random storage strategy. In the face of increasingly diverse data types, this method lacks in-depth analysis of data characteristics when storing data, and cannot store different types of data in a targeted manner, thereby failing to achieve effective management of data. To this end, the present application provides a flash memory card data storage method, device, equipment and storage medium to solve the above problems.

[0057] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0058] See also Figure 1 , Figure 1A schematic diagram of a flash memory card data storage method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the flash card data storage method provided in the embodiment of the present application includes steps S100 to S500.

[0059] Step S100: Acquire data to be stored, and perform attribute analysis on the data to be stored to obtain attribute categories of the data to be stored.

[0060] Step S200: acquiring a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and preprocessing the data to be stored based on the target data processing algorithm to obtain target data.

[0061] Step S300: Perform feature analysis on the target data to obtain feature information corresponding to the target data.

[0062] Step S400, obtaining data access information and storage unit information of the flash memory card, and determining a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with a plurality of storage units.

[0063] Step S500: storing the target data into the target storage unit.

[0064] It should be noted that the execution subject of this embodiment may be a flash card data storage device, or a terminal or a server. The following description will be made using a server as an example.

[0065] In this embodiment, as described in step S100 above, the data to be stored is obtained, and the attribute analysis is performed on the data to be stored to obtain the attribute category of the data to be stored. Specifically, the user operates on the terminal device to determine the data to be stored, and the server responds to the user's operation, obtains the data to be stored, and performs attribute analysis on the data to be stored based on a preset attribute analysis algorithm to obtain the attribute category of the data to be stored. The attribute category is any one of text, image, audio and video.

[0066] As described in the above step S200, the target data processing algorithm corresponding to the data to be stored is obtained in the database based on the attribute category, and the data to be stored is preprocessed based on the target data processing algorithm to obtain the target data. Specifically, first, the server determines the attribute category code corresponding to the attribute category based on a preset attribute category-attribute category code mapping relationship table, and determines the target data processing algorithm in the database based on the attribute category code, and then, the data to be stored is preprocessed based on the target data processing algorithm to obtain the target data. It can be understood that the data features corresponding to data of different attribute categories are different. Setting different data processing algorithms for data of different attribute categories respectively helps to improve the data processing effect and ensure the authenticity and reliability of the data.

[0067] As described in step S300 above, feature analysis is performed on the target data to obtain feature information corresponding to the target data. Specifically, the server performs feature analysis on the target data using a preset feature analysis algorithm to obtain feature information corresponding to the target data.

[0068] As described in step S400, the data access information and storage unit information of the flash memory card are obtained, and the target storage unit of the target data is determined based on the data access information, the storage unit information and the feature information. Specifically, the server first obtains the data access information and storage unit information of the flash memory card, and then determines the target storage unit of the target data based on the data access information, the storage unit information and the feature information. The data access information refers to the historical record information of the user's data access to the flash memory card.

[0069] As described in the above step S500, the target data is stored in the target storage unit. Specifically, the server stores the target data in the target storage unit based on a preset data storage algorithm.

[0070] The method provided in this embodiment, on the one hand, can effectively process the data to be stored by performing attribute analysis on the data to be stored to obtain the attribute category of the data to be stored, and obtain the target data processing algorithm corresponding to the data to be stored in the database based on the attribute category, and pre-process the data to be stored based on the target data processing algorithm, so as to ensure the authenticity and reliability of the data to be stored. On the other hand, by performing feature analysis on the target data to obtain feature information corresponding to the target data, and obtaining data access information and storage unit information of the flash memory card, and determining the target storage unit of the target data based on the data access information, the storage unit information and the feature information, it realizes targeted storage of data and further realizes effective management of data.

[0071] In some embodiments, the characteristic information includes a bit value and a content category of the target data, the storage unit information includes a performance level and a remaining capacity of each storage unit in the flash memory card, and determining a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information includes the following steps:

[0072] determining an access level of the target data based on the data access information and the content category;

[0073] A plurality of initial target storage units are determined based on the access level and the performance level of each of the storage units; wherein, for each of the storage units, the performance level of the storage unit is obtained by comprehensively evaluating the read and write speed, the number of write / erase cycles and the error rate of the storage unit.

[0074] Determine whether there is an intermediate target storage unit in each of the initial target storage units; wherein the remaining capacity of the intermediate target storage unit is not less than the bit value;

[0075] If so, a target storage unit is determined in each of the intermediate target storage units; wherein the target storage unit is the storage unit with the highest performance level in each of the intermediate target storage units.

[0076] The method provided in this embodiment, by determining the storage unit with the highest performance level among the intermediate target storage units as the target storage unit, can, on the one hand, achieve effective management of the target data; on the other hand, since the target data only corresponds to one target storage unit, there is no need to split the target data when storing the target data in the target storage unit, which helps to improve the efficiency of data storage.

[0077] In some embodiments, after determining whether there is an intermediate target storage unit in each of the initial target storage units, the following steps are included:

[0078] If not, determining whether the sum of the remaining capacities of the initial target storage units is not less than the bit value;

[0079] If so, each of the initial target storage units is determined to be a target storage unit.

[0080] The method provided in this embodiment can still achieve effective management of the target data by determining each of the initial target storage units as the target storage unit when the intermediate target storage unit does not exist in each of the initial target storage units.

[0081] In some embodiments, after determining whether the sum of the remaining capacities of the initial target storage units is not less than the bit value, the method further includes:

[0082] If not, calculating the difference between the bit value and the sum of the remaining capacity;

[0083] Determine a target candidate storage unit among each candidate storage unit; wherein, the candidate storage unit is a storage unit other than each of the initial target storage units, the remaining capacity of the candidate storage unit is greater than the difference, and the target candidate storage unit is a storage unit with the highest performance level among each of the candidate storage units.

[0084] Each of the initial target storage unit and the target candidate storage unit is determined as a target storage unit.

[0085] The method provided in this embodiment determines a target candidate storage unit among the candidate storage units, and determines each of the initial target storage units and the target candidate storage unit as the target storage unit when the intermediate target storage unit does not exist in each of the initial target storage units and the sum of the remaining capacities of each of the initial target storage units is less than the bit value. Since the remaining capacity of the candidate storage unit is greater than the difference and the target candidate storage unit is the storage unit with the highest performance level among the candidate storage units, this scheme can reduce the number of times the target data is divided as much as possible when storing the target data, and achieve effective management of the target data as much as possible.

[0086] In some embodiments, the data access information includes historical access information of each historical access, the historical access information includes access content category and access time, and the determining the access level of the target data based on the data access information and the content category includes the following steps:

[0087] For each access content category, the first access number and the second access number corresponding to the access content category are counted, and the ratio between the second access number and the first access number is calculated, and the product between the first access number and the ratio is calculated; wherein the first access number is the total number of historical accesses corresponding to the access content category, and the second access number is the number of accesses corresponding to the access content category within a preset time period, the second access number is less than the first access number, and the preset time period is connected to the current moment; wherein the ratio between the second access number and the first access number refers to the value obtained by dividing the second access number by the first access number; wherein the access content categories include culture, military, science and technology, politics, and economy, etc.;

[0088] Arranging the access content categories in sequence based on the products corresponding to the access content categories to obtain an access content category sequence; wherein the products corresponding to the access content categories in the access content category sequence decrease in sequence;

[0089] A target access content category corresponding to the content category is determined in the access content category sequence, and an order corresponding to the target access content category in the access content category sequence is determined as the access level.

[0090] It can be understood that the access level represents the possibility of the target data being accessed, and the access level is negatively correlated with the possibility of the target data being accessed. The access level obtained in this embodiment takes into account the total number of historical accesses corresponding to each access content category and the number of accesses within a preset time period, which helps to improve the reliability of the access level and, in turn, helps to achieve effective management of the target data.

[0091] In some embodiments, the determining of a plurality of initial target storage units based on the access level and the performance level of each of the storage units comprises:

[0092] Traversing a preset access level-performance level mapping relationship table to determine a performance level corresponding to the access level; wherein the access level corresponds to multiple performance levels;

[0093] The storage units corresponding to the respective performance levels are determined as initial target storage units.

[0094] In some embodiments, storing the target data into the target storage unit comprises the following steps:

[0095] The target data is encoded based on a preset encoding rule to obtain a check code corresponding to the target data, and a mapping relationship between the check code and the target data is constructed; it can be understood that after the target data is stored, the check code can be used to check the integrity of the target data;

[0096] Obtain the authorized user information of the flash memory card, and perform matrix encoding on the authorized user information based on a preset matrix encoding rule to obtain a coding matrix corresponding to the authorized user information; wherein the coding matrix is ​​a square matrix, and the number of elements in the coding matrix is ​​2 n , n is an integer greater than 3;

[0097] The coding matrix is ​​segmented to obtain a plurality of 2×2 square matrices;

[0098] Calculate the eigenvalues ​​corresponding to each 2×2 square matrix respectively to obtain eigenvalue information corresponding to each square matrix; wherein the eigenvalue information includes at least one eigenvalue;

[0099] For each piece of eigenvalue information, each eigenvalue in the eigenvalue information is added to obtain a eigendigit corresponding to the eigenvalue information;

[0100] Determine an intermediate target matrix in each 2×2 square matrix based on each of the characteristic numbers; wherein the characteristic number corresponding to the intermediate target matrix is ​​an integer;

[0101] For each of the intermediate target matrices, multiply the intermediate target matrix by the characteristic number corresponding to the intermediate target matrix to obtain a target matrix;

[0102] Arrange the target matrices in sequence based on the positions of the intermediate target matrices corresponding to the target matrices in the encoding matrix to obtain a matrix sequence;

[0103] The mapping relationship is encrypted using the matrix sequence to obtain an encrypted mapping relationship, and the encrypted mapping relationship is stored in the target storage unit.

[0104] The method provided in this embodiment, on the one hand, by setting a check code for the target data, can verify the integrity of the target data based on the check code when the user accesses the target data; on the other hand, by using the matrix sequence to encrypt the mapping relationship, it can effectively improve the security of the target data and prevent the target data from being tampered with.

[0105] See also Figure 2 , Figure 2 A schematic block diagram of the structure of a flash memory card data storage device 100 provided in an embodiment of the present application is shown in FIG. Figure 2As shown, the flash memory card data storage device 100 comprises:

[0106] The acquisition module 110 is used to acquire the data to be stored, and perform attribute analysis on the data to be stored to obtain the attribute category of the data to be stored.

[0107] The processing module 120 is used to obtain the target data processing algorithm corresponding to the data to be stored in the database based on the attribute category, and pre-process the data to be stored based on the target data processing algorithm to obtain the target data.

[0108] The analysis module 130 is used to perform feature analysis on the target data to obtain feature information corresponding to the target data.

[0109] The determination module 140 is used to obtain data access information and storage unit information of the flash memory card, and determine the target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with multiple storage units.

[0110] The storage module 150 is used to store the target data into the target storage unit.

[0111] It should be noted that technicians in the relevant technical field can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned flash card data storage method embodiment, and will not be repeated here.

[0112] The flash memory card data storage device 100 provided in the above embodiment can be implemented in the form of a computer program. The computer program can be used in Figure 3 The system is run on the terminal device 200 shown.

[0113] See also Figure 3 , Figure 3 The terminal device 200 provided in the embodiment of the present application is a schematic block diagram of the structure, wherein the terminal device 200 includes a processor 201 and a memory 202, wherein the processor 201 and the memory 202 are connected via a system bus 203, wherein the memory 202 may include a non-volatile storage medium and an internal memory.

[0114] The non-volatile storage medium can store a computer program. The computer program includes program instructions. When the program instructions are executed by the processor 201, the processor 201 can execute any of the above-mentioned flash card data storage methods.

[0115] The processor 201 is used to provide computing and control capabilities to support the operation of the entire terminal device 200.

[0116] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 201, the processor 201 can execute any of the above-mentioned flash card data storage methods.

[0117] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device 200 involved in the scheme of the present application. The specific terminal device 200 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0118] It should be understood that the processor 201 may be a central processing unit (CPU), and the processor 201 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0119] In some embodiments, the processor 201 is used to run a computer program stored in the memory to implement the following steps:

[0120] Acquire the data to be stored, and perform attribute analysis on the data to be stored to obtain the attribute category of the data to be stored;

[0121] Acquire a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and pre-process the data to be stored based on the target data processing algorithm to obtain target data;

[0122] Performing feature analysis on the target data to obtain feature information corresponding to the target data;

[0123] Acquire data access information and storage unit information of the flash memory card, and determine the target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with a plurality of storage units;

[0124] The target data is stored in the target storage unit.

[0125] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device 200 described above can refer to the corresponding process of the aforementioned flash card data storage method, which will not be repeated here.

[0126] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement the flash memory card data storage method provided in the embodiment of the present application.

[0127] The computer-readable storage medium may be an internal storage unit of the terminal device 200 in the aforementioned embodiment, such as a hard disk or memory of the terminal device 200. The computer-readable storage medium may also be an external storage device of the terminal device 200, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the terminal device 200.

[0128] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A flash memory card data storage method, It is characterized in that include: Acquire the data to be stored, and perform attribute analysis on the data to be stored to obtain the attribute category of the data to be stored; Acquire a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and pre-process the data to be stored based on the target data processing algorithm to obtain target data; Performing feature analysis on the target data to obtain feature information corresponding to the target data; Acquire data access information and storage unit information of the flash memory card, and determine the target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with a plurality of storage units; storing the target data into the target storage unit; The characteristic information includes a bit value and a content category of the target data, the storage unit information includes a performance level and a remaining capacity of each storage unit in the flash memory card, and determining a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information includes: determining an access level of the target data based on the data access information and the content category; determining a plurality of initial target storage units based on the access level and the performance level of each of the storage units; Determine whether there is an intermediate target storage unit in each of the initial target storage units; wherein the remaining capacity of the intermediate target storage unit is not less than the bit value; If so, determining a target storage unit in each of the intermediate target storage units; wherein the target storage unit is the storage unit with the highest performance level in each of the intermediate target storage units; The data access information includes historical access information of each historical access, the historical access information includes access content category and access time, and determining the access level of the target data based on the data access information and the content category includes: For each access content category, count the first access number and the second access number corresponding to the access content category, calculate the ratio between the second access number and the first access number, and calculate the product between the first access number and the ratio; wherein the first access number is the total number of historical accesses corresponding to the access content category, the second access number is the number of accesses corresponding to the access content category within a preset time period, the second access number is less than the first access number, and the preset time period is connected to the current moment; Arranging the access content categories in sequence based on the products corresponding to the access content categories to obtain an access content category sequence; wherein the products corresponding to the access content categories in the access content category sequence decrease in sequence; Determining a target access content category corresponding to the content category in the access content category sequence, and determining the order corresponding to the target access content category in the access content category sequence as the access level; The determining of a plurality of initial target storage units based on the access level and the performance level of each of the storage units comprises: Traversing a preset access level-performance level mapping relationship table to determine a performance level corresponding to the access level; wherein the access level corresponds to multiple performance levels; Determine the storage unit corresponding to each of the performance levels as the initial target storage unit; The step of storing the target data in the target storage unit comprises: Encoding the target data based on a preset encoding rule to obtain a check code corresponding to the target data, and constructing a mapping relationship between the check code and the target data; Obtain the authorized user information of the flash memory card, and perform matrix encoding on the authorized user information based on a preset matrix encoding rule to obtain a coding matrix corresponding to the authorized user information; wherein the coding matrix is ​​a square matrix, and the number of elements in the coding matrix is ​​2 n , n is an integer greater than 3; The coding matrix is ​​segmented to obtain a plurality of 2×2 square matrices; Calculate the eigenvalues ​​corresponding to each 2×2 square matrix respectively to obtain eigenvalue information corresponding to each square matrix; wherein the eigenvalue information includes at least one eigenvalue; For each piece of eigenvalue information, each eigenvalue in the eigenvalue information is added to obtain a eigendigit corresponding to the eigenvalue information; Determine an intermediate target matrix in each 2×2 square matrix based on each of the characteristic numbers; wherein the characteristic number corresponding to the intermediate target matrix is ​​an integer; For each of the intermediate target matrices, multiply the intermediate target matrix by the characteristic number corresponding to the intermediate target matrix to obtain a target matrix; Arrange the target matrices in sequence based on the positions of the intermediate target matrices corresponding to the target matrices in the encoding matrix to obtain a matrix sequence; The mapping relationship is encrypted using the matrix sequence to obtain an encrypted mapping relationship, and the encrypted mapping relationship is stored in the target storage unit.

2. The flash memory card data storage method according to claim 1, It is characterized in that After determining whether there is an intermediate target storage unit in each of the initial target storage units, the method includes: If not, determining whether the sum of the remaining capacities of the initial target storage units is not less than the bit value; If so, each of the initial target storage units is determined to be a target storage unit.

3. The flash memory card data storage method according to claim 2, It is characterized in that After determining whether the sum of the remaining capacities of the initial target storage units is not less than the bit value, the method further includes: If not, calculating the difference between the bit value and the sum of the remaining capacity; Determine a target candidate storage unit from each candidate storage unit; wherein the candidate storage unit is a storage unit other than each of the initial target storage units, the remaining capacity of the candidate storage unit is greater than the difference, and the target candidate storage unit is a storage unit with the highest performance level among each of the candidate storage units; Each of the initial target storage unit and the target candidate storage unit is determined as a target storage unit.

4. A flash memory card data storage device, It is characterized in that include: An acquisition module, used to acquire data to be stored, and perform attribute analysis on the data to be stored to obtain attribute categories of the data to be stored; A processing module, used for acquiring a target data processing algorithm corresponding to the data to be stored in a database based on the attribute category, and preprocessing the data to be stored based on the target data processing algorithm to obtain target data; An analysis module, used to perform feature analysis on the target data to obtain feature information corresponding to the target data; a determination module, configured to obtain data access information and storage unit information of the flash memory card, and determine a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information; wherein the flash memory card is provided with a plurality of storage units; A storage module, used for storing the target data into the target storage unit; The characteristic information includes a bit value and a content category of the target data, the storage unit information includes a performance level and a remaining capacity of each storage unit in the flash memory card, and determining a target storage unit of the target data based on the data access information, the storage unit information and the characteristic information includes: determining an access level of the target data based on the data access information and the content category; determining a plurality of initial target storage units based on the access level and the performance level of each of the storage units; Determine whether there is an intermediate target storage unit in each of the initial target storage units; wherein the remaining capacity of the intermediate target storage unit is not less than the bit value; If so, determining a target storage unit in each of the intermediate target storage units; wherein the target storage unit is the storage unit with the highest performance level in each of the intermediate target storage units; The data access information includes historical access information of each historical access, the historical access information includes access content category and access time, and determining the access level of the target data based on the data access information and the content category includes: For each access content category, count the first access number and the second access number corresponding to the access content category, calculate the ratio between the second access number and the first access number, and calculate the product between the first access number and the ratio; wherein the first access number is the total number of historical accesses corresponding to the access content category, the second access number is the number of accesses corresponding to the access content category within a preset time period, the second access number is less than the first access number, and the preset time period is connected to the current moment; Arranging the access content categories in sequence based on the products corresponding to the access content categories to obtain an access content category sequence; wherein the products corresponding to the access content categories in the access content category sequence decrease in sequence; Determining a target access content category corresponding to the content category in the access content category sequence, and determining the order corresponding to the target access content category in the access content category sequence as the access level; The determining of a plurality of initial target storage units based on the access level and the performance level of each of the storage units comprises: Traversing a preset access level-performance level mapping relationship table to determine a performance level corresponding to the access level; wherein the access level corresponds to multiple performance levels; Determine the storage unit corresponding to each of the performance levels as the initial target storage unit; The step of storing the target data in the target storage unit comprises: Encoding the target data based on a preset encoding rule to obtain a check code corresponding to the target data, and constructing a mapping relationship between the check code and the target data; Obtain the authorized user information of the flash memory card, and perform matrix encoding on the authorized user information based on a preset matrix encoding rule to obtain a coding matrix corresponding to the authorized user information; wherein the coding matrix is ​​a square matrix, and the number of elements in the coding matrix is ​​2 n , n is an integer greater than 3; The coding matrix is ​​segmented to obtain a plurality of 2×2 square matrices; Calculate the eigenvalues ​​corresponding to each 2×2 square matrix respectively to obtain eigenvalue information corresponding to each square matrix; wherein the eigenvalue information includes at least one eigenvalue; For each piece of eigenvalue information, each eigenvalue in the eigenvalue information is added to obtain a eigendigit corresponding to the eigenvalue information; Determine an intermediate target matrix in each 2×2 square matrix based on each of the characteristic numbers; wherein the characteristic number corresponding to the intermediate target matrix is ​​an integer; For each of the intermediate target matrices, multiply the intermediate target matrix by the characteristic number corresponding to the intermediate target matrix to obtain a target matrix; Arrange the target matrices in sequence based on the positions of the intermediate target matrices corresponding to the target matrices in the encoding matrix to obtain a matrix sequence; The mapping relationship is encrypted using the matrix sequence to obtain an encrypted mapping relationship, and the encrypted mapping relationship is stored in the target storage unit.

5. A terminal device, It is characterized in that The terminal device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the flash memory card data storage method according to any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the flash memory card data storage method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Data storage system, data storage method and data storage center

    CN106095333A

  • Data classified storage method, device and system

    CN112506433A