Memory card memory configuration method, device, computer equipment and storage medium
Patent Information
- Application Number
- CN202410739594.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The traditional memory card configuration method lacks a unified solution, resulting in inconsistent capacity displayed on different devices or operating systems of memory cards of the same model.
By reading the model and nominal capacity size of the memory card, obtain the memory card configuration policy that matches the model, and determine the identification capacity size of the memory card based on the nominal capacity size and multiple preset standard capacity thresholds. Finally, use the configuration policy to configure the memory card to the identification capacity size.
The same model of memory card displays the same capacity on different devices or operating systems is achieved, which improves the accuracy and efficiency of configuration, and avoids waste of space or performance degradation caused by improper configuration.
Smart Images

Figure CN118708113B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of memory card management technology, and in particular to a memory card memory configuration method, device, computer equipment and storage medium. Background Art
[0002] As an important medium for data storage, memory cards are widely used in various computer devices. With the continuous development of technology, the types and capacities of memory cards are also increasing, giving users more choices.
[0003] However, due to the large number of memory card manufacturers, the performance and nominal capacity of memory cards of different models and brands may vary. The traditional memory card configuration method usually simply reads the nominal capacity of the memory card and then directly configures it into the device. There is a lack of a unified configuration solution for the capacity of the memory card, resulting in inconsistent capacity displayed on different devices or operating systems for the same model of memory card. Summary of the invention
[0004] In view of this, the present application provides a memory card memory configuration method, apparatus, computer equipment and storage medium, which can flexibly configure the capacity of the memory card so that the capacity displayed on the same model of memory card on different devices or operating systems is consistent.
[0005] A first aspect of the present application provides a memory card memory configuration method, the method comprising:
[0006] Read the model and nominal capacity of the memory card;
[0007] Obtaining a storage card configuration policy that matches the model;
[0008] Determining the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds;
[0009] The memory card is configured to the identified capacity size using the memory card configuration policy.
[0010] In an optional implementation, determining the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds includes:
[0011] Sorting the plurality of preset standard capacity thresholds to obtain a standard capacity threshold sorting sequence;
[0012] generating a plurality of standard capacity threshold ranges according to the standard capacity threshold sorting sequence;
[0013] Determine a target standard capacity threshold range among the plurality of standard capacity threshold ranges that matches the nominal capacity size;
[0014] The identified capacity size of the memory card is determined according to the target standard capacity threshold range.
[0015] In an optional embodiment, the method further comprises:
[0016] Obtaining a target write speed corresponding to the target standard capacity threshold range;
[0017] Testing the actual writing speed of the memory card based on a plurality of test files;
[0018] According to the target writing speed and the actual writing speed, an actual performance result of the memory card is obtained.
[0019] In an optional implementation, the testing the actual write speed of the memory card based on multiple test files includes:
[0020] Adjusting the initial test parameters according to the model to obtain target test parameters;
[0021] Randomly generate a number within a preset file code range, and obtain a target test file corresponding to the randomly generated number from the multiple test files, each test file corresponding to a file code;
[0022] According to the target test parameters, the target test file is used to perform a write operation test on the memory card to obtain an actual write speed of the memory card.
[0023] In an optional implementation manner, obtaining the actual performance result of the memory card according to the target write speed and the actual write speed includes:
[0024] generating a benchmark test file based on the plurality of test files;
[0025] According to the target test parameters, using the benchmark test file to perform a write operation test on the memory card to obtain a benchmark write speed of the memory card;
[0026] Calibrate the actual writing speed according to the reference writing speed to obtain a calibrated writing speed;
[0027] According to the target writing speed and the calibrated writing speed, an actual performance result of the memory card is obtained.
[0028] In an optional implementation, generating a benchmark test file based on the multiple test files includes:
[0029] Obtain the file size of each test file among the multiple test files;
[0030] Sorting the sizes of the plurality of files to obtain a file size sorting sequence;
[0031] Determine a target file size that is located at the median in the file size sorting sequence;
[0032] A test file corresponding to the target file size is used as the benchmark test file.
[0033] In an optional embodiment, the method further comprises:
[0034] Display the user interface;
[0035] When detecting that a password is input on the user interaction interface, verifying the password;
[0036] When the password verification is passed, the model and nominal capacity of the memory card are read.
[0037] A second aspect of the present application provides a memory card memory configuration device, the device comprising:
[0038] A reading module is used to read the model and nominal capacity of the memory card;
[0039] A matching module, used to obtain a storage card configuration strategy that matches the model;
[0040] A determination module, configured to determine the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds;
[0041] A configuration module is used to configure the memory card to the identified capacity size using the memory card configuration policy.
[0042] The third aspect of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the memory card memory configuration method when executing the computer program.
[0043] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the memory card memory configuration method when executed by a processor.
[0044] The memory card memory configuration method, device, computer equipment and storage medium provided in the embodiments of the present application realize personalized configuration of the memory card by reading the model and nominal capacity of the memory card and obtaining the memory card configuration strategy that matches the model, avoiding the universality and singleness of the traditional configuration method and improving the accuracy and efficiency of the configuration. By determining the capacity that the memory card should identify based on the nominal capacity of the memory card and multiple preset standard capacity thresholds, the configuration of the memory card is made more reasonable, avoiding space waste or performance degradation caused by improper configuration. The present application accurately configures the memory card so that the capacity displayed by the user for the same model of memory card on different devices or operating systems is consistent. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of a memory card memory configuration method shown in an embodiment of the present application;
[0046] Figure 2 is a functional module diagram of a memory card memory configuration device shown in an embodiment of the present application;
[0047] Figure 3 It is a structural diagram of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.
[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0050] The memory card memory configuration method provided by the embodiment of the present invention is executed by a computer device, and accordingly, the memory card memory configuration device runs in the computer device.
[0051] Figure 1 The flowchart of the memory card memory configuration method provided by the embodiment of the present invention is as follows. The memory card memory configuration method specifically includes the following steps.
[0052] S11, read the model and nominal capacity of the memory card.
[0053] This application can perform memory configuration on a single memory card, or batch configure memory on multiple memory cards of the same model.
[0054] A memory card is a portable data storage device that is usually used to store various digital data, such as photos, videos, audio files, etc.
[0055] Insert the memory card into the card reader and connect the card reader to the computer device. After the computer device recognizes the card reader, it will automatically load the corresponding driver, allowing the operating system to communicate with the card reader and interact with the memory card through the card reader. The operating system sends a command through the communication interface between the card reader and the memory card (such as the USB interface) to request to read the model and nominal capacity of the memory card. After receiving the command, the memory card returns its model and nominal capacity to the operating system.
[0056] The model of a memory card refers to the identification of the manufacturer, type, series and version of the memory card. Different memory card models represent different manufacturers, types, series and versions.
[0057] The nominal capacity refers to the physical capacity of the memory card when it leaves the factory, indicating the storage capacity defined by the memory card manufacturer during the manufacturing process.
[0058] S12: Obtain a storage card configuration policy that matches the model.
[0059] The computer device stores a memory card configuration policy database, which contains configuration policies for various types of memory cards. Configuration policies include partition policies, file system selection, optimization settings, etc. For example, taking a high-speed SD card as an example, its configuration policy may include: using the exFAT file system for better compatibility and performance; turning off write cache to improve data security; enabling quick formatting to speed up formatting; and reasonably dividing data partitions and backup partitions according to capacity.
[0060] In an optional implementation, while providing a default configuration policy, a user interface or tool is provided to allow users to customize the configuration according to their own needs and preferences.
[0061] S13, determining the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds.
[0062] The preset standard capacity thresholds are multiple storage capacity values set according to actual needs or industry practices, and are used to classify the nominal capacity size into corresponding capacity ranges. Generally speaking, the standard capacity thresholds are 2GB, 4GB, 8GB, 16GB, 32GB, 64GB, 128GB, 256GB, 512GB, 1024GB, etc.
[0063] The labeled capacity size refers to the capacity size displayed to the user after the memory card is configured, which determines the amount of data that the user can store. By displaying the labeled capacity size, the user can better manage the storage space to avoid data loss or insufficient storage space. The labeled capacity size is less than or equal to the nominal capacity size.
[0064] In an optional implementation, determining the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds includes:
[0065] Sorting the plurality of preset standard capacity thresholds to obtain a standard capacity threshold sorting sequence;
[0066] generating a plurality of standard capacity threshold ranges according to the standard capacity threshold sorting sequence;
[0067] Determine a target standard capacity threshold range among the plurality of standard capacity threshold ranges that matches the nominal capacity size;
[0068] The identified capacity size of the memory card is determined according to the target standard capacity threshold range.
[0069] The plurality of preset standard capacity thresholds may be sorted in an ascending order or a descending order to obtain a standard capacity threshold sorting sequence.
[0070] If the standard capacity threshold sorting sequence is obtained in ascending order, when traversing the standard capacity threshold sorting sequence, the currently traversed standard capacity threshold is used as the lower limit of the standard capacity threshold range, and the next traversed standard capacity threshold is used as the upper limit of the standard capacity threshold range. For example, for the sorting sequence {8, 16, 32, 64, 128}, multiple standard capacity threshold ranges can be generated: from 8GB (inclusive) to 16GB (exclusive), from 16GB (inclusive) to 32GB (exclusive), from 32GB (inclusive) to 64GB (exclusive), from 64GB (inclusive) to 128GB (exclusive).
[0071] If the standard capacity threshold sorting sequence is obtained in descending order, when traversing the standard capacity threshold sorting sequence, the currently traversed standard capacity threshold is used as the upper limit of the standard capacity threshold range, and the next traversed standard capacity threshold is used as the lower limit of the standard capacity threshold range. For example, for the sorting sequence {128, 64, 32, 16, 8}, multiple standard capacity threshold ranges can be generated: from 64GB (inclusive) to 128GB (exclusive), from 32GB (inclusive) to 64GB (exclusive), from 16GB (inclusive) to 32GB (exclusive), and from 8GB (inclusive) to 16GB (exclusive).
[0072] After obtaining multiple standard capacity threshold ranges, the nominal capacity of the memory card can be compared with each standard capacity threshold range to determine the standard capacity threshold range that the nominal capacity falls into. The standard capacity threshold range that the nominal capacity falls into is the target standard capacity threshold range, and the lower limit of the target standard capacity threshold range is determined as the identified capacity of the memory card. For example, assuming that the nominal capacity of the memory card is 34GB, and the target standard capacity threshold range is from 32GB to 64GB, the identified capacity of the memory card is 32GB.
[0073] The above optional implementation method determines the identification capacity size of the memory card based on the nominal capacity size and the preset standard capacity threshold, which can ensure that the memory configuration of the memory card meets user needs without excessively wasting storage space, and helps to automatically process large amounts of memory card data and ensure accuracy.
[0074] S14: Use the memory card configuration policy to configure the memory card to the identified capacity size.
[0075] The memory card is configured to the required identification capacity size according to the memory card configuration policy, so that the user can determine the actual available memory capacity of the memory card after obtaining the memory card.
[0076] In an optional embodiment, the method further comprises:
[0077] Obtaining a target write speed corresponding to the target standard capacity threshold range;
[0078] Testing the actual writing speed of the memory card based on a plurality of test files;
[0079] According to the target writing speed and the actual writing speed, an actual performance result of the memory card is obtained.
[0080] According to the determined target standard capacity threshold range of the memory card (for example, 16GB-32GB or 32GB-64GB), find the target write speed corresponding to the standard capacity threshold range. The target write speed is determined based on factors such as the specification, model, and brand of the memory card, or based on official data or historical test data of the memory card.
[0081] The writing performance of the memory card is tested based on one or more pre-set test files, and the speed data during the writing process, that is, the actual writing speed, is recorded.
[0082] Compare the actual write speed obtained from the test with the target write speed obtained previously. If the actual write speed is close to or exceeds the target write speed, the actual performance of the memory card is considered good, it can be marked as a qualified product, and the subsequent operation can continue; if the actual write speed is much lower than the target write speed, it may be necessary to further check the memory card or the test environment, such as adjusting the test parameters or replacing the computer equipment.
[0083] In an optional implementation, the testing the actual write speed of the memory card based on multiple test files includes:
[0084] Adjusting the initial test parameters according to the model to obtain target test parameters;
[0085] Randomly generate a number within a preset file code range, and obtain a target test file corresponding to the randomly generated number from the multiple test files, each test file corresponding to a file code;
[0086] According to the target test parameters, the target test file is used to perform a write operation test on the memory card to obtain an actual write speed of the memory card.
[0087] Different memory card models may have different performance characteristics and specifications. For example, a high-speed SD card may have a higher write speed than a low-speed SD card. In order to more accurately test the actual performance of each memory card model, the initial test parameters need to be adjusted for each model. These parameters may include test time, test data volume, write mode (such as sequential write or random write), etc. The target test parameters obtained will serve as the basis for subsequent tests.
[0088] In order to ensure the randomness and fairness of the test, each test file can be encoded according to the serial number. The file code corresponds to the test file one by one, and different test files correspond to different file codes. For example, the test file D1 is encoded as serial number 1, the test file D2 is encoded as serial number 2, ..., and the test file DN is encoded as serial number N. Use a random number generation function to randomly generate a number within the file code range [1, N], and select the test file corresponding to the same file code as the randomly generated number from multiple test files as the target test file.
[0089] Use the target test parameters to test the write operation of the memory card. During the test, write the target test file to the memory card and record the time required for writing. After the memory card is full, the actual write speed of the memory card is calculated by comparing the amount of data written and the time required.
[0090] The above optional implementation method can ensure the accuracy and pertinence of the test results by adjusting the test parameters according to the model of the memory card. Randomly selecting the test file can reduce the influence of a specific test file on the result, making the test result more representative.
[0091] Due to the size of the test file, competition for resources by other processes or applications during the test, etc., the actual write speed may have errors and cannot truly reflect the actual performance of the memory card. Therefore, in an optional implementation, the actual performance result of the memory card obtained according to the target write speed and the actual write speed includes:
[0092] Generate a benchmark test file based on multiple test files;
[0093] According to the target test parameters, using the benchmark test file to perform a write operation test on the memory card to obtain a benchmark write speed of the memory card;
[0094] Calibrate the actual writing speed according to the reference writing speed to obtain a calibrated writing speed;
[0095] According to the target writing speed and the calibrated writing speed, an actual performance result of the memory card is obtained.
[0096] Based on multiple test files of different sizes and types, one or more benchmark test files are generated. The test files or benchmark test files are used to simulate various read and write scenarios that may be encountered in actual applications.
[0097] According to the target test parameters, use the benchmark test file to test the memory card for write operation. During the write operation test, you can use professional speed test software such as CrystalDiskMark, H2testw, etc., and test the memory card according to the corresponding operation steps. Record the write speed data during the test, which is the benchmark write speed.
[0098] Considering that factors such as the test environment, system load, and other background processes may affect the actual write speed, it is necessary to calibrate the actual write speed to obtain a calibrated write speed.
[0099] Compare the calibrated write speed (calibrated write speed) with the target write speed to evaluate whether the memory card meets the expected write performance requirements. If the calibrated write speed is close to or exceeds the target write speed, the actual performance of the memory card is considered good; if the calibrated write speed is much lower than the target write speed, it may be necessary to further check the memory card or test environment to find out the performance bottleneck.
[0100] The actual performance results of the memory card obtained from the test are output in the form of a report, including information such as the test environment, test parameters, benchmark write speed, calibrated write speed, performance evaluation results, etc. The report can be used as a basis for evaluating the performance of the memory card, and can also be used as a reference for subsequent optimization or improvement of the memory card.
[0101] The above optional implementation manner can more accurately evaluate the actual writing performance of the memory card and provide strong support for practical applications.
[0102] In an optional implementation, generating a benchmark test file based on the multiple test files includes:
[0103] Obtain the file size of each test file among the multiple test files;
[0104] Sorting the sizes of the plurality of files to obtain a file size sorting sequence;
[0105] Determine a target file size that is located at the median in the file size sorting sequence;
[0106] A test file corresponding to the target file size is used as the benchmark test file.
[0107] File size is an important factor when evaluating memory card performance, directly related to how long a write or read operation takes.
[0108] The file sizes of all test files are sorted to obtain a sequence arranged in order of size. The sorting process ensures that the median file size selected subsequently can represent the average size of most test files.
[0109] In the sorted file size sequence, determine the file size in the middle, that is, the median. The median file size can provide an average or medium-sized reference point so that subsequent tests can be performed on a representative file size.
[0110] The file size at the median is used as the target file size, and the test file corresponding to the target file size is used as the benchmark test file. The benchmark test file will be used in subsequent memory card performance tests to ensure the fairness and repeatability of the test.
[0111] In the above optional implementation, the median file size can represent the average size of most test files. Therefore, using the test file corresponding to the median file size as the benchmark test file will not be biased towards files that are too large or too small, thereby ensuring the fairness of the test and the representativeness of the test results.
[0112] In an optional embodiment, the method further comprises:
[0113] Display the user interface;
[0114] When detecting that a password is input on the user interaction interface, verifying the password;
[0115] When the password verification is passed, the model and nominal capacity of the memory card are read.
[0116] The user interaction interface may be a graphical user interface (GUI) or a command line interface (CLI) for receiving user input and displaying information.
[0117] When the user enters a password on the user interface, the computer device detects the input and initiates a password verification process, comparing the password entered by the user with a pre-set password.
[0118] If the password verification is successful, that is, the password entered by the user is consistent with the preset password, the model and nominal capacity of the memory card are read. If the password verification fails, the user interaction interface can be returned to receive the password re-entered by the user in the user interaction interface.
[0119] The above optional implementation manner can improve the security of the system through user verification, ensuring that only authorized users can access the information of the memory card.
[0120] The memory card memory configuration method provided in the embodiment of the present application realizes personalized configuration of the memory card by reading the model and nominal capacity of the memory card and obtaining the memory card configuration strategy that matches the model, thereby avoiding the universality and singleness of the traditional configuration method and improving the accuracy and efficiency of the configuration. By determining the capacity that the memory card should identify based on the nominal capacity of the memory card and multiple preset standard capacity thresholds, the configuration of the memory card is made more reasonable, avoiding space waste or performance degradation caused by improper configuration. By accurately configuring the memory card, the present application realizes the optimal utilization of the memory card, improves the stability and reliability of the device, and also improves the user experience, so that the capacity displayed by the user for the same model of memory card on different devices or operating systems is consistent, so that the storage space of the memory card can be more fully utilized, and a smoother and more stable data storage and reading experience can be enjoyed.
[0121] Figure 2 It is a structural diagram of a memory card memory configuration device provided by an embodiment of the present invention.
[0122] In some embodiments, the memory card memory configuration device 20 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the memory card memory configuration device 20 may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Function of the memory card memory configuration.
[0123] In this embodiment, the memory card memory configuration device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a reading module 201, a matching module 202, a determination module 203, a configuration module 204, a test module 205 and a verification module 206. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0124] The reading module 201 is used to read the model and nominal capacity of the memory card.
[0125] The matching module 202 is used to obtain a storage card configuration policy that matches the model.
[0126] The determination module 203 is used to determine the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds.
[0127] Optionally, the determining module 203 determines the identified capacity size of the memory card according to the nominal capacity size and a plurality of preset standard capacity thresholds, including:
[0128] Sorting the plurality of preset standard capacity thresholds to obtain a standard capacity threshold sorting sequence;
[0129] generating a plurality of standard capacity threshold ranges according to the standard capacity threshold sorting sequence;
[0130] Determine a target standard capacity threshold range among the plurality of standard capacity threshold ranges that matches the nominal capacity size;
[0131] The identified capacity size of the memory card is determined according to the target standard capacity threshold range.
[0132] The configuration module 204 is used to configure the memory card to the identified capacity size using the memory card configuration policy.
[0133] The test module 205 is used to obtain a target write speed corresponding to the target standard capacity threshold range; test the actual write speed of the memory card based on multiple test files; and obtain the actual performance result of the memory card according to the target write speed and the actual write speed.
[0134] Optionally, the testing module 205 tests the actual writing speed of the memory card based on multiple test files, including:
[0135] Adjusting the initial test parameters according to the model to obtain target test parameters;
[0136] Randomly generate a number within a preset file code range, and obtain a target test file corresponding to the randomly generated number from the multiple test files, each test file corresponding to a file code;
[0137] According to the target test parameters, the target test file is used to perform a write operation test on the memory card to obtain an actual write speed of the memory card.
[0138] Optionally, the test module 205 obtains the actual performance result of the memory card according to the target write speed and the actual write speed, including:
[0139] generating a benchmark test file based on the plurality of test files;
[0140] According to the target test parameters, using the benchmark test file to perform a write operation test on the memory card to obtain a benchmark write speed of the memory card;
[0141] Calibrate the actual writing speed according to the reference writing speed to obtain a calibrated writing speed;
[0142] According to the target writing speed and the calibrated writing speed, an actual performance result of the memory card is obtained.
[0143] Optionally, the test module 205 generates a benchmark test file based on the multiple test files, including:
[0144] Obtain the file size of each test file among the multiple test files;
[0145] Sorting the sizes of the plurality of files to obtain a file size sorting sequence;
[0146] Determine a target file size that is located at the median in the file size sorting sequence;
[0147] A test file corresponding to the target file size is used as the benchmark test file.
[0148] The verification module 206 is used to display a user interaction interface; when a password is detected to be input on the user interaction interface, the password is verified; when the password verification is passed, the model and nominal capacity of the memory card are read.
[0149] It should be understood that the various variations and specific embodiments of the memory card memory configuration method provided in the above embodiments are also applicable to the memory card memory configuration device in this embodiment. Through the detailed description of the aforementioned memory card memory configuration method, those skilled in the art can clearly understand the implementation process of the memory card memory configuration device in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.
[0150] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the steps of the memory card memory configuration method are implemented.
[0151] See also Figure 3 FIG. 2 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. In a preferred embodiment of the present application, the computer device 3 includes a memory 31 , at least one processor 32 and at least one communication bus 33 .
[0152] Those skilled in the art should understand that Figure 3 The structure of the computer device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The computer device 3 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.
[0153] In some embodiments, the computer device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The computer device 3 may also include client devices, which include but are not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0154] It should be noted that the computer device 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0155] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the memory card memory configuration method are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, and the like.
[0156] In some embodiments, the at least one processor 32 is the control core (Control Unit) of the computer device 3, and uses various interfaces and lines to connect various components of the entire computer device 3, and executes various functions and processes data of the computer device 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the memory card memory configuration method described in the embodiment of the present application; or implements all or part of the functions of the memory card memory configuration device. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.
[0157] In some embodiments, the at least one communication bus 33 is configured to realize the connection and communication between the memory 31 and the at least one processor 32. Although not shown, the computer device 3 may also include a power supply (such as a battery) for powering each component. Preferably, the power supply may be logically connected to the at least one processor 32 through a power management device, so as to realize the functions of managing charging, discharging, and power consumption management through the power management device. The power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The computer device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0158] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.
[0159] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0160] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Claims
1. A memory card memory configuration method, characterized in that: The method comprises: reading the model and nominal capacity of a memory card; obtaining a memory card configuration policy that matches the model, wherein a memory card configuration policy database is stored in a computer device, and the memory card configuration policy database contains configuration policies for memory cards of various models, wherein the configuration policies include partition policies, file system selection, and optimization settings, and while providing a default configuration policy, a user interface or tool is provided to allow users to customize the configuration according to their own needs and preferences; determining the identification capacity of the memory card according to the nominal capacity and multiple preset standard capacity thresholds; configuring the memory card to the identification capacity using the memory card configuration policy; determining the identification capacity of the memory card according to the nominal capacity and multiple preset standard capacity thresholds comprises: sorting the multiple preset standard capacity thresholds to obtain a standard capacity threshold sorting sequence; generating multiple standard capacity threshold ranges according to the standard capacity threshold sorting sequence; determining a target standard capacity threshold range that matches the nominal capacity in the multiple standard capacity threshold ranges; determining the identification capacity of the memory card according to the target standard capacity threshold range.
2. The memory card memory configuration method according to claim 1, characterized in that: The method further includes: acquiring a target write speed corresponding to the target standard capacity threshold range; testing an actual write speed of the memory card based on a plurality of test files; and obtaining an actual performance result of the memory card according to the target write speed and the actual write speed.
3. The memory card memory configuration method according to claim 2, characterized in that: The testing of the actual write speed of the memory card based on multiple test files includes: adjusting the initial test parameters according to the model to obtain target test parameters; randomly generating a number within a preset file coding range, and obtaining a target test file corresponding to the randomly generated number from the multiple test files, each test file corresponding to a file coding; and performing a write operation test on the memory card using the target test file according to the target test parameters to obtain the actual write speed of the memory card.
4. The memory card memory configuration method according to claim 3, characterized in that: The method of obtaining the actual performance result of the memory card according to the target write speed and the actual write speed includes: generating a benchmark test file based on the multiple test files; performing a write operation test on the memory card using the benchmark test file according to the target test parameters to obtain a benchmark write speed of the memory card; calibrating the actual write speed according to the benchmark write speed to obtain a calibrated write speed; and obtaining the actual performance result of the memory card according to the target write speed and the calibrated write speed.
5. The memory card memory configuration method according to claim 4, characterized in that: The generating of a benchmark test file based on the multiple test files includes: obtaining the file size of each test file among the multiple test files; sorting the multiple file sizes to obtain a file size sorting sequence; determining a target file size that is at the median in the file size sorting sequence; and using the test file corresponding to the target file size as the benchmark test file.
6. The memory card memory configuration method according to any one of claims 1 to 5, characterized in that: The method further includes: displaying a user interaction interface; verifying the password when detecting that a password is input on the user interaction interface; and reading the model and nominal capacity of the memory card when the password verification passes.
7. A memory card memory configuration device, characterized in that: The device includes: a reading module, used to read the model and nominal capacity of the memory card; a matching module, used to obtain a memory card configuration policy that matches the model; a determination module, used to determine the identified capacity size of the memory card based on the nominal capacity size and multiple preset standard capacity thresholds; and a configuration module, used to configure the memory card to the identified capacity size using the memory card configuration policy.
8. A computer device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the memory card memory configuration method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the memory card memory configuration method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for detecting capacity of storage device
CN103500586A
Capacity expansion detection method and device for memory
CN112416675A