Data storage method and device based on flash memory
By acquiring and processing the data to be transmitted by external devices in flash memory, and using the attribute information of multiple data transmission channels to divide and transmit data, the problem of low flash memory storage efficiency is solved and more efficient data storage and transmission is achieved.
Patent Information
- Application Number
- CN202411664373.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The storage efficiency of existing flash memory is low, especially when the amount of data is large, which affects the user experience.
The data to be transmitted by external devices is obtained through flash memory, the attribute information of the data transmission channel is determined, the data to be transmitted is divided into multiple data sets, and the data set is transmitted to the flash memory according to different data transmission channels, and finally the data set is assembled in the flash memory to obtain the data to be transmitted.
By acquiring multiple data transmission channels and dividing and transmitting data sets according to attribute information, the storage efficiency of flash memory is improved, and the speed and efficiency of data transmission are improved.
Smart Images

Figure CN119759257A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a data storage method and device based on flash memory. Background Art
[0002] At present, flash memory is known as a personal "data mobile center". Flash memory is usually used as a portable mobile storage product that can be used to store data files in any format.
[0003] In real life, especially when the amount of data is large, if the data storage rate is too slow, it will affect the user experience. Therefore, the problem of how to improve the storage efficiency of flash memory needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a data storage method and device based on flash memory, which can improve the storage efficiency of flash memory.
[0005] In a first aspect, an embodiment of the present application provides a data storage method based on a flash memory, which is applied to an electronic device, wherein the electronic device includes a flash memory, and the method includes:
[0006] Acquiring data to be transmitted from an external device through the flash memory;
[0007] Determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels;
[0008] Determine attribute information of each of the plurality of data transmission channels to obtain a plurality of attribute information;
[0009] Dividing the data to be transmitted into multiple data sets according to the multiple attribute information;
[0010] transmitting the plurality of data sets to the flash memory according to the plurality of data transmission channels;
[0011] The multiple data sets are assembled in the flash memory to obtain the data to be transmitted.
[0012] In a second aspect, an embodiment of the present application provides a data storage device based on a flash memory, which is applied to an electronic device, wherein the electronic device includes a flash memory, and the device includes: an acquisition unit, a determination unit, a division unit, a transmission unit, and an assembly unit, wherein:
[0013] The acquisition unit is used to acquire the data to be transmitted from the external device through the flash memory;
[0014] The determining unit is used to determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels; determine attribute information of each of the plurality of data transmission channels to obtain a plurality of attribute information;
[0015] The division unit is used to divide the data to be transmitted into multiple data sets according to the multiple attribute information;
[0016] The transmission unit is used to transmit the multiple data sets to the flash memory according to the multiple data transmission channels;
[0017] The assembling unit is used to assemble the multiple data sets in the flash memory to obtain the data to be transmitted.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, comprising a flash memory, a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiment of the present application.
[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.
[0021] The implementation of the embodiments of the present application has the following beneficial effects:
[0022] It can be seen that the flash memory-based data storage method and device described in the embodiments of the present application are applied to an electronic device, which includes a flash memory, obtains data to be transmitted from an external device through the flash memory, determines a data transmission channel between the data to be transmitted and the external device, obtains multiple data transmission channels, determines attribute information of each of the multiple data transmission channels, obtains multiple attribute information, divides the data to be transmitted into multiple data sets according to the multiple attribute information, transmits the multiple data sets to the flash memory according to the multiple data transmission channels, assembles the multiple data sets in the flash memory to obtain the data to be transmitted, can obtain multiple data transmission channels, and divide the data to be transmitted into multiple data sets corresponding to the attribute information of the multiple data transmission channels, and then transmits the multiple data sets to the corresponding data transmission channels. Finally, the multiple data sets that have been transmitted are assembled into the data to be transmitted. In this way, the storage efficiency of the flash memory can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a flowchart of a data storage method based on flash memory provided in an embodiment of the present application;
[0025] Figure 2 It is a flowchart of another flash memory-based data storage method provided in an embodiment of the present application;
[0026] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0027] Figure 4 This is a block diagram of the functional units of a flash memory-based data storage device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0030] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0031] The following is a detailed description of the embodiments of the present application.
[0032] See also Figure 1 , Figure 1 1 is a flow chart of a data storage method based on a flash memory provided in an embodiment of the present application, which is applied to an electronic device, wherein the electronic device includes a flash memory. As shown in the figure, the data storage method based on the flash memory includes:
[0033] 101. Obtain data to be transmitted from an external device through the flash memory.
[0034] In an embodiment of the present application, the electronic device may include a flash memory, or the electronic device itself is a flash memory, and the flash memory may also be referred to as a flash memory chip or a flash memory device.
[0035] In a specific implementation, a communication connection can be established between the flash memory and the external device, and the communication connection may include a wireless communication connection and / or a wired communication connection. The wireless communication connection may include at least one of the following: Bluetooth, infrared, visible light, millimeter wave, Lora, Near Field Communication (NFC), Zigbee, etc., which are not limited here. Different communication methods can establish different data transmission channels.
[0036] The data to be transmitted may include at least one of the following: text, video, image, compressed package, application program, etc., which are not limited here.
[0037] Among them, the external device may include at least one of the following: a mobile phone, a computer, a tablet computer, a mobile hard disk, a learning machine, a server, etc., which are not limited here.
[0038] In a specific implementation, the data to be transmitted of the external device can be obtained through the flash memory.
[0039] 102. Determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels.
[0040] In a specific implementation, since both a wireless communication connection and a wired communication connection can be established between the flash memory and the external device, multiple data transmission channels can be obtained. In this way, the data transmission channel between the data to be transmitted and the external device can be determined, and multiple data transmission channels can be obtained.
[0041] Optionally, the above step 102, determining a data transmission channel between the data to be transmitted and the external device to obtain multiple data transmission channels, may include the following steps:
[0042] 21. Obtain a physical data transmission channel between the flash memory and the external device to obtain m physical data transmission channels, where m is a positive integer;
[0043] 22. Acquire the wireless data transmission channel between the flash memory and the external device to obtain n wireless data transmission channels, where n is a positive integer;
[0044] 23. Determine the amount of data to be transmitted;
[0045] 24. Determine the number of reference data transmission channels corresponding to the data volume;
[0046] 25. When the number of the reference data transmission channels is less than or equal to m+n, obtain data transmission channels of a number equal to the number of the reference data transmission channels from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels;
[0047] 26. When the number of the reference data transmission channels is greater than m+n, obtain all the data transmission channels from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels.
[0048] In an embodiment of the present application, a physical data transmission channel between a flash memory and an external device can be obtained to obtain m physical data transmission channels, where m is a positive integer. A wireless data transmission channel between a flash memory and an external device can also be obtained to obtain n wireless data transmission channels, where n is a positive integer. Furthermore, the amount of data to be transmitted can be determined, and a mapping relationship between a preset amount of data and the number of data transmission channels can be pre-stored. Then, the number of reference data transmission channels corresponding to the amount of data can be determined based on the mapping relationship. When the number of reference data transmission channels is less than or equal to m+n, data transmission channels equal to the number of reference data transmission channels are obtained from the m physical data transmission channels and the n wireless data transmission channels to obtain multiple data transmission channels. When the number of reference data transmission channels is greater than m+n, all data transmission channels are obtained from the m physical data transmission channels and the n wireless data transmission channels to obtain multiple data transmission channels. In this way, as many data transmission channels as possible can be selected to realize data transmission, which helps to improve data transmission efficiency.
[0049] Optionally, the multiple data transmission channels further include a data transmission channel, the external device is further connected to a first device, and the first device is communicatively connected to the flash memory, and the following steps may also be included:
[0050] A1. Establishing a data transmission channel between the electronic device and the flash memory through the first device to obtain k data transmission channels;
[0051] A2. Select the a data transmission channels from the k data transmission channels, where a is a positive integer less than or equal to k, and m+n+a is less than or equal to the number of reference data transmission channels.
[0052] The first device may include at least one of the following: a mobile phone, a computer, a tablet computer, a mobile hard disk, a learning machine, a server, etc., which are not limited here.
[0053] The multiple data transmission channels further include a data transmission channels, where a is a positive integer.
[0054] In an embodiment of the present application, a data transmission channel is established between the electronic device and the flash memory through the first device to obtain k data transmission channels, and then a data transmission channels are selected from the k data transmission channels, where a is a positive integer less than or equal to k, and m+n+a is less than or equal to the reference number of data transmission channels. In this way, as many data transmission channels as possible can be selected to realize data transmission, which helps to improve data transmission efficiency.
[0055] 103. Determine attribute information of each of the multiple data transmission channels to obtain multiple attribute information.
[0056] In the embodiment of the present application, the attribute information may include at least one of the following: data transmission channel type, bandwidth, packet loss rate, disconnection rate, network delay, data transmission rate, etc., which are not limited here.
[0057] In a specific implementation, the attribute information of each of the multiple data transmission channels may be determined to obtain multiple attribute information.
[0058] 104. Divide the data to be transmitted into multiple data sets according to the multiple attribute information.
[0059] Among them, different attribute information represents the characteristics of different data transmission channels, and then the data to be transmitted can be divided into multiple data sets according to multiple attribute information. Since different data transmission channels have different data transmission security, data with high data transmission security requirements can give priority to wired data transmission channels, and conversely, data with low data transmission security requirements can choose wired data transmission channels or wireless data transmission channels.
[0060] Optionally, the above step 104, dividing the data to be transmitted into multiple data sets according to the multiple attribute information, may include the following steps:
[0061] 41. Determine the security level of each of the multiple data transmission channels according to the multiple attribute information to obtain multiple security levels;
[0062] 42. Divide the data to be transmitted into the multiple data sets according to the multiple security levels.
[0063] In an embodiment of the present application, the security level of each of the multiple data transmission channels can be determined according to the multiple attribute information to obtain multiple security levels, that is, the mapping relationship between the preset attribute information and the security level can be pre-stored, and then the security level of each of the multiple data transmission channels can be determined based on the mapping relationship to obtain multiple security levels, and then the data to be transmitted can be divided into multiple data sets according to the multiple security levels, that is, the data to be transmitted can be split into multiple data, and the security level score of each data is determined to obtain multiple security level scores, and the multiple data are numbered based on the security level score, the smaller the number, the lower the security level, and the larger the number, the higher the security level, and the data transmission rates of the multiple data transmission channels are determined to obtain multiple data transmission rates, and the multiple data transmission channels are sorted based on the multiple security levels so that the security level order is from low to high, and the data volume proportions of the multiple data transmission channels are determined according to the multiple data transmission rates to obtain multiple data volume proportions, and the multiple data are divided into multiple data sets based on the multiple data volume proportions and the numbering order. In this way, not only the data with high data security requirements are allocated to the data transmission channel with high security, but also the amount of data to be transmitted by each data transmission channel can be determined based on the data transmission rate of each data transmission channel, which helps to ensure data transmission efficiency.
[0064] Optionally, the above step 42, dividing the data to be transmitted into the multiple data sets according to the multiple security levels, may include the following steps:
[0065] 421. Determine data transmission rates of the multiple data transmission channels to obtain multiple data transmission rates;
[0066] 422. Divide the data to be transmitted according to the multiple data transmission rates to obtain multiple reference data sets;
[0067] 423. Determine a data processing parameter corresponding to each of the multiple security levels to obtain multiple data processing parameters;
[0068] 424. Process corresponding data sets among the multiple reference data sets according to the multiple data processing parameters to obtain the multiple data sets.
[0069] In an embodiment of the present application, the data transmission rates of multiple data transmission channels can be determined to obtain multiple data transmission rates. The data to be transmitted can also be divided according to the multiple data transmission rates to obtain multiple reference data sets. Specifically, the data to be transmitted can be divided into multiple data, and a security level score of each data can be determined to obtain multiple security level scores. The multiple data can be numbered based on the security level scores, the smaller the number, the lower the security level, and the larger the number, the higher the security level. The data transmission rates of multiple data transmission channels can be determined to obtain multiple data transmission rates. The multiple data transmission channels can be sorted based on the multiple security levels so that the security levels are in an ascending order. The multiple data transmission rates can be determined based on the multiple security levels. The data volume proportions of multiple data transmission channels are obtained, and multiple data volume proportions are divided into multiple data sets based on the multiple data volume proportions and the numbering order. In this way, not only the data with high data security requirements are allocated to the data transmission channels with high security, but also the amount of data that needs to be transmitted by each data transmission channel can be determined based on the data transmission rate of each data transmission channel, which helps to ensure data transmission efficiency. The data processing parameters corresponding to each security level in the multiple security levels can also be determined to obtain multiple data processing parameters, wherein the data processing parameters may include at least one of the following: whether encryption is required, encryption algorithm, encryption algorithm control parameters, whether compression, compression method, etc., which are not limited here.
[0070] Finally, corresponding data sets in multiple reference data sets can be processed according to multiple data processing parameters to obtain multiple data sets, thereby ensuring not only the security of data transmission but also the data transmission rate.
[0071] 105. Transmit the multiple data sets to the flash memory according to the multiple data transmission channels.
[0072] In a specific implementation, multiple data sets can be transmitted to the flash memory according to multiple data transmission channels, that is, each data set is transmitted to the flash memory through a corresponding data transmission channel.
[0073] 106. Assemble the multiple data sets in the flash memory to obtain the data to be transmitted.
[0074] Among them, each data set can include multiple data, each data can correspond to an index, and each data set can correspond to an index table. Then, in the flash memory, based on the index tables of multiple data sets, the data can be assembled in the corresponding index order to obtain the data to be transmitted. In this way, the data transmission rate can be guaranteed.
[0075] It can be seen that the flash memory-based data storage method described in the embodiment of the present application is applied to an electronic device, which includes a flash memory. The data to be transmitted of an external device is obtained through the flash memory, and the data transmission channel between the data to be transmitted and the external device is determined to obtain multiple data transmission channels. The attribute information of each data transmission channel in the multiple data transmission channels is determined to obtain multiple attribute information. The data to be transmitted is divided into multiple data sets according to the multiple attribute information, and the multiple data sets are transmitted to the flash memory according to the multiple data transmission channels. The multiple data sets are assembled in the flash memory to obtain the data to be transmitted. Multiple data transmission channels can be obtained, and the data to be transmitted is divided into multiple data sets corresponding to the attribute information of the multiple data transmission channels, and then the multiple data sets are transmitted to the corresponding data transmission channels. Finally, the multiple data sets that have been transmitted are assembled into the data to be transmitted. In this way, the storage efficiency of the flash memory can be improved.
[0076] See also Figure 2 , Figure 2 1 is a flow chart of a data storage method based on a flash memory provided by an embodiment of the present application. As shown in the figure, the method is applied to an electronic device, wherein the electronic device includes a flash memory. The data storage method based on the flash memory includes:
[0077] 201. Obtain data to be transmitted from an external device through the flash memory.
[0078] 202. When the data size of the data to be transmitted is greater than a set threshold, determine a data transmission channel between the data to be transmitted and the external device to obtain multiple data transmission channels.
[0079] 203. Determine attribute information of each of the multiple data transmission channels to obtain multiple attribute information.
[0080] 204. Divide the data to be transmitted into multiple data sets according to the multiple attribute information.
[0081] 205. Transmit the multiple data sets to the flash memory according to the multiple data transmission channels.
[0082] 206. Assemble the multiple data sets in the flash memory to obtain the data to be transmitted.
[0083] The threshold value may be preset or set by system default.
[0084] The specific description of the above steps 201 to 206 can refer to the above Figure 1 The corresponding steps of the described flash memory-based data storage method are not repeated here.
[0085] It can be seen that the flash memory-based data storage method described in the embodiment of the present application is applied to an electronic device, which includes a flash memory. When the data size of the data to be transmitted is greater than a set threshold, it means that the data volume of the data to be transmitted is large. The data to be transmitted of the external device is obtained through the flash memory, and the data transmission channel between the data to be transmitted and the external device is determined to obtain multiple data transmission channels. The attribute information of each data transmission channel in the multiple data transmission channels is determined to obtain multiple attribute information. The data to be transmitted is divided into multiple data sets according to the multiple attribute information, and the multiple data sets are transmitted to the flash memory according to the multiple data transmission channels. The multiple data sets are assembled in the flash memory to obtain the data to be transmitted. Multiple data transmission channels can be obtained, and the data to be transmitted is divided into multiple data sets corresponding to the attribute information of the multiple data transmission channels, and then the multiple data sets are transmitted to the corresponding data transmission channels. Finally, the multiple data sets that have been transmitted are assembled into the data to be transmitted. In this way, the storage efficiency of the flash memory can be improved.
[0086] In accordance with the above embodiment, please refer to Figure 3 , Figure 3 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device includes a flash memory, a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor. In the embodiment of the present application, the program includes instructions for executing the following steps:
[0087] Acquiring data to be transmitted from an external device through the flash memory;
[0088] Determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels;
[0089] Determine attribute information of each of the plurality of data transmission channels to obtain a plurality of attribute information;
[0090] Dividing the data to be transmitted into multiple data sets according to the multiple attribute information;
[0091] transmitting the plurality of data sets to the flash memory according to the plurality of data transmission channels;
[0092] The multiple data sets are assembled in the flash memory to obtain the data to be transmitted.
[0093] Optionally, in the aspect of dividing the data to be transmitted into multiple data sets according to the multiple attribute information, the program includes instructions for performing the following steps:
[0094] Determine the security level of each of the multiple data transmission channels according to the multiple attribute information to obtain multiple security levels;
[0095] The data to be transmitted is divided into the multiple data sets according to the multiple security levels.
[0096] Optionally, in the aspect of dividing the data to be transmitted into the multiple data sets according to the multiple security levels, the program includes instructions for performing the following steps:
[0097] Determining data transmission rates of the multiple data transmission channels to obtain multiple data transmission rates;
[0098] Dividing the data to be transmitted according to the multiple data transmission rates to obtain multiple reference data sets;
[0099] Determining a data processing parameter corresponding to each of the plurality of security levels to obtain a plurality of data processing parameters;
[0100] Corresponding data sets among the multiple reference data sets are processed according to the multiple data processing parameters to obtain the multiple data sets.
[0101] Optionally, in determining the data transmission channel between the data to be transmitted and the external device to obtain multiple data transmission channels, the program includes instructions for executing the following steps:
[0102] Acquire a physical data transmission channel between the flash memory and the external device to obtain m physical data transmission channels, where m is a positive integer;
[0103] Acquire a wireless data transmission channel between the flash memory and the external device to obtain n wireless data transmission channels, where n is a positive integer;
[0104] Determine the amount of data to be transmitted;
[0105] Determine the number of reference data transmission channels corresponding to the data volume;
[0106] When the number of the reference data transmission channels is less than or equal to m+n, acquiring data transmission channels of a number equal to the number of the reference data transmission channels from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels;
[0107] When the number of the reference data transmission channels is greater than m+n, all data transmission channels are acquired from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels.
[0108] Optionally, the multiple data transmission channels further include a data transmission channel, the external device is further connected to a first device, the first device is communicatively connected to the flash memory, and the program further includes instructions for executing the following steps:
[0109] Establishing a data transmission channel between the electronic device and the flash memory through the first device to obtain k data transmission channels;
[0110] The a data transmission channels are selected from the k data transmission channels, where a is a positive integer less than or equal to k, and m+n+a is less than or equal to the number of reference data transmission channels.
[0111] It can be seen that the electronic device described in the embodiment of the present application includes a flash memory, which obtains data to be transmitted from an external device through the flash memory, determines a data transmission channel between the data to be transmitted and the external device, obtains multiple data transmission channels, determines attribute information of each of the multiple data transmission channels, obtains multiple attribute information, divides the data to be transmitted into multiple data sets according to the multiple attribute information, transmits the multiple data sets to the flash memory according to the multiple data transmission channels, assembles the multiple data sets in the flash memory to obtain the data to be transmitted, can obtain multiple data transmission channels, and divides the data to be transmitted into multiple data sets corresponding to the attribute information of the multiple data transmission channels, and then transmits the multiple data sets to the corresponding data transmission channels. Finally, the multiple data sets that have been transmitted are assembled into the data to be transmitted. In this way, the storage efficiency of the flash memory can be improved.
[0112] Figure 4 4 is a functional unit block diagram of a flash memory-based data storage device 400 involved in an embodiment of the present application. The flash memory-based data storage device 400 is applied to an electronic device, and the electronic device includes a flash memory. The flash memory-based data storage device 400 includes: an acquisition unit 401, a determination unit 402, a division unit 403, a transmission unit 404 and an assembly unit 405, wherein:
[0113] The acquisition unit 401 is used to acquire the data to be transmitted from the external device through the flash memory;
[0114] The determining unit 402 is used to determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels; determine attribute information of each of the plurality of data transmission channels to obtain a plurality of attribute information;
[0115] The division unit 403 is used to divide the data to be transmitted into multiple data sets according to the multiple attribute information;
[0116] The transmission unit 404 is used to transmit the multiple data sets to the flash memory according to the multiple data transmission channels;
[0117] The assembling unit 405 is used to assemble the multiple data sets in the flash memory to obtain the data to be transmitted.
[0118] Optionally, in the aspect of dividing the data to be transmitted into multiple data sets according to the multiple attribute information, the dividing unit 403 is specifically used to:
[0119] Determine the security level of each of the multiple data transmission channels according to the multiple attribute information to obtain multiple security levels;
[0120] The data to be transmitted is divided into the multiple data sets according to the multiple security levels.
[0121] Optionally, in the aspect of dividing the data to be transmitted into the multiple data sets according to the multiple security levels, the dividing unit 403 is specifically configured to:
[0122] Determining data transmission rates of the multiple data transmission channels to obtain multiple data transmission rates;
[0123] Dividing the data to be transmitted according to the multiple data transmission rates to obtain multiple reference data sets;
[0124] Determining a data processing parameter corresponding to each of the plurality of security levels to obtain a plurality of data processing parameters;
[0125] Corresponding data sets among the multiple reference data sets are processed according to the multiple data processing parameters to obtain the multiple data sets.
[0126] Optionally, in determining the data transmission channel between the data to be transmitted and the external device to obtain multiple data transmission channels, the determining unit 402 is specifically configured to:
[0127] Acquire a physical data transmission channel between the flash memory and the external device to obtain m physical data transmission channels, where m is a positive integer;
[0128] Acquire a wireless data transmission channel between the flash memory and the external device to obtain n wireless data transmission channels, where n is a positive integer;
[0129] Determine the amount of data to be transmitted;
[0130] Determine the number of reference data transmission channels corresponding to the data volume;
[0131] When the number of the reference data transmission channels is less than or equal to m+n, acquiring data transmission channels of a number equal to the number of the reference data transmission channels from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels;
[0132] When the number of the reference data transmission channels is greater than m+n, all data transmission channels are acquired from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels.
[0133] Optionally, the multiple data transmission channels further include a data transmission channel, the external device is further connected to a first device, the first device is communicatively connected to the flash memory, and the flash memory-based data storage device 400 is further specifically used for:
[0134] Establishing a data transmission channel between the electronic device and the flash memory through the first device to obtain k data transmission channels;
[0135] The a data transmission channels are selected from the k data transmission channels, where a is a positive integer less than or equal to k, and m+n+a is less than or equal to the number of reference data transmission channels.
[0136] It can be seen that the flash memory-based data storage device described in the embodiment of the present application is applied to an electronic device, which includes a flash memory, obtains data to be transmitted of an external device through the flash memory, determines a data transmission channel between the data to be transmitted and the external device, obtains multiple data transmission channels, determines attribute information of each of the multiple data transmission channels, obtains multiple attribute information, divides the data to be transmitted into multiple data sets according to the multiple attribute information, transmits the multiple data sets to the flash memory according to the multiple data transmission channels, assembles the multiple data sets in the flash memory to obtain the data to be transmitted, can obtain multiple data transmission channels, and divides the data to be transmitted into multiple data sets corresponding to the attribute information of the multiple data transmission channels, and then transmits the multiple data sets to the corresponding data transmission channels. Finally, the multiple data sets that have been transmitted are assembled into the data to be transmitted. In this way, the storage efficiency of the flash memory can be improved.
[0137] It can be understood that the functions of each program module of the flash memory-based data storage device of this embodiment can be specifically implemented according to the method in the above method embodiment, and its specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0138] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments.
[0139] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the above method embodiment. The computer program product may be a software installation package.
[0140] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0142] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0143] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0146] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0147] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data storage method based on flash memory, characterized in that: Applied to an electronic device, the electronic device includes a flash memory, and the method includes: Acquiring data to be transmitted from an external device through the flash memory; Determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels; Determine attribute information of each of the plurality of data transmission channels to obtain a plurality of attribute information; Dividing the data to be transmitted into multiple data sets according to the multiple attribute information; transmitting the plurality of data sets to the flash memory according to the plurality of data transmission channels; The multiple data sets are assembled in the flash memory to obtain the data to be transmitted.
2. The method according to claim 1, characterized in that The step of dividing the data to be transmitted into a plurality of data sets according to the plurality of attribute information comprises: Determine the security level of each of the multiple data transmission channels according to the multiple attribute information to obtain multiple security levels; The data to be transmitted is divided into the multiple data sets according to the multiple security levels.
3. The method according to claim 2, characterized in that The dividing the data to be transmitted into the multiple data sets according to the multiple security levels includes: Determining data transmission rates of the multiple data transmission channels to obtain multiple data transmission rates; Dividing the data to be transmitted according to the multiple data transmission rates to obtain multiple reference data sets; Determining a data processing parameter corresponding to each of the plurality of security levels to obtain a plurality of data processing parameters; Corresponding data sets among the multiple reference data sets are processed according to the multiple data processing parameters to obtain the multiple data sets.
4. The method according to any one of claims 1 to 3, characterized in that: The determining of the data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels includes: Acquire a physical data transmission channel between the flash memory and the external device to obtain m physical data transmission channels, where m is a positive integer; Acquire a wireless data transmission channel between the flash memory and the external device to obtain n wireless data transmission channels, where n is a positive integer; Determine the amount of data to be transmitted; Determine the number of reference data transmission channels corresponding to the data volume; When the number of the reference data transmission channels is less than or equal to m+n, acquiring data transmission channels of a number equal to the number of the reference data transmission channels from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels; When the number of the reference data transmission channels is greater than m+n, all data transmission channels are acquired from the m physical data transmission channels and the n wireless data transmission channels to obtain the multiple data transmission channels.
5. The method according to claim 4, characterized in that The plurality of data transmission channels further include a data transmission channel, the external device is further connected to a first device, the first device is communicatively connected to the flash memory, and the method further includes: Establishing a data transmission channel between the electronic device and the flash memory through the first device to obtain k data transmission channels; The a data transmission channels are selected from the k data transmission channels, where a is a positive integer less than or equal to k, and m+n+a is less than or equal to the number of reference data transmission channels.
6. A data storage device based on flash memory, characterized in that: Applied to an electronic device, the electronic device includes a flash memory, the device includes: an acquisition unit, a determination unit, a division unit, a transmission unit and an assembly unit, wherein: The acquisition unit is used to acquire the data to be transmitted from the external device through the flash memory; The determining unit is used to determine a data transmission channel between the data to be transmitted and the external device to obtain a plurality of data transmission channels; determine attribute information of each of the plurality of data transmission channels to obtain a plurality of attribute information; The division unit is used to divide the data to be transmitted into multiple data sets according to the multiple attribute information; The transmission unit is used to transmit the multiple data sets to the flash memory according to the multiple data transmission channels; The assembling unit is used to assemble the multiple data sets in the flash memory to obtain the data to be transmitted.
7. The device according to claim 6, characterized in that In the aspect of dividing the data to be transmitted into a plurality of data sets according to the plurality of attribute information, the dividing unit is specifically used for: Determine the security level of each of the multiple data transmission channels according to the multiple attribute information to obtain multiple security levels; The data to be transmitted is divided into the multiple data sets according to the multiple security levels.
8. The device according to claim 7, characterized in that In the aspect of dividing the data to be transmitted into the multiple data sets according to the multiple security levels, the dividing unit is specifically used to: Determining data transmission rates of the multiple data transmission channels to obtain multiple data transmission rates; Dividing the data to be transmitted according to the multiple data transmission rates to obtain multiple reference data sets; Determining a data processing parameter corresponding to each of the plurality of security levels to obtain a plurality of data processing parameters; Corresponding data sets among the multiple reference data sets are processed according to the multiple data processing parameters to obtain the multiple data sets.
9. An electronic device, characterized in that: The device comprises a flash memory, a processor, and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program comprises instructions for executing the steps in the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method, apparatus, and system for transmitting data in ethernet
CN104185976A
Data migration method and mobile terminals
CN106484325A
Data transmission control method and related product
CN110505014A
Batch data transmission method and device based on vehicle-mounted chip and storage medium
CN115622678A
Resource management system for state machine
CN117336300A