CN117348819A - Data writing method and device - Google Patents
Data writing method and device Download PDFInfo
- Publication number
- CN117348819A CN117348819A CN202311486471.3A CN202311486471A CN117348819A CN 117348819 A CN117348819 A CN 117348819A CN 202311486471 A CN202311486471 A CN 202311486471A CN 117348819 A CN117348819 A CN 117348819A
- Authority
- CN
- China
- Prior art keywords
- writing
- information
- module
- user data
- virtual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000008859 change Effects 0.000 claims abstract description 11
- 230000004044 response Effects 0.000 claims abstract description 9
- 230000001502 supplementing effect Effects 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 16
- 239000002699 waste material Substances 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 19
- 230000008569 process Effects 0.000 description 10
- 238000013500 data storage Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
Abstract
The application discloses a data writing method and device, and relates to the technical field of automobile electronics, wherein the method comprises the following steps: determining a virtual write unit in response to a change in a minimum write unit of the flash memory module, the number of bytes of the virtual write unit being a positive integer multiple of the number of bytes of the minimum write unit; the header information and the user data information are written according to the number of bytes of the virtual writing unit. Therefore, when the minimum writing unit of the flash memory module is changed, only the virtual writing unit is required to be changed into the positive integer multiple of the changed minimum writing unit, and the data writing format of the flash memory module can be changed without modifying the data writing code when the title information and the user data information are written, so that the development time and the development energy waste are reduced, and the data writing efficiency is improved.
Description
Technical Field
The present disclosure relates to the field of automotive electronics, and in particular, to a data writing method and apparatus.
Background
In order to provide an Open and standardized software architecture for the technical field of AUTomotive electronics, an AUTomotive Open system architecture (AUTOTIVE Open SystemArchitecture, AUTOSAR) has been developed. The AUTOSAR defines a 32-bit virtual linear address space in a Flash memory module of the automobile chip, wherein the virtual linear address space further comprises a 16-bit block number and a 16-bit block offset.
In the related art, a user may write data into a block number of Flash, or may read the data written in Flash according to the block number.
However, if the minimum writing unit of Flash is changed due to the replacement of Flash in the automobile chip, the original data writing code has to be modified, resulting in waste of development time and development effort of relevant technicians.
Disclosure of Invention
The application provides a data writing method and device, which can reduce development time and development energy waste by avoiding modification of data writing codes.
The application discloses the following technical scheme:
in a first aspect, the present application provides a data writing method, including:
determining a virtual writing unit in response to a change of a minimum writing unit of the flash memory module, wherein the number of bytes of the virtual writing unit is a positive integer multiple of the number of bytes of the minimum writing unit;
and writing title information and user data information according to the byte number of the virtual writing unit.
Optionally, the writing title information and user data information includes:
writing title information in a first period of the flash memory module;
if the byte number of the virtual writing unit is greater than the byte number of the title information, writing user data information after the title information in the first period;
and if the byte number of the user data information is larger than the difference value between the byte number of the virtual writing unit and the byte number of the header information, continuing to write the user data information in the second period of the flash memory module.
Optionally, the method further comprises:
and if the byte number of the virtual writing unit is equal to the byte number of the title information, writing user data information in the second period.
Optionally, the method further comprises:
and if the byte number of the user data information is smaller than the difference value between the byte number of the virtual writing unit and the byte number of the header information, supplementing 0 in the unwritten bytes of the first period.
Optionally, the method further comprises:
writing mark information according to the byte number of the virtual writing unit;
and confirming whether the writing of the title information and the user data information is effective according to the mark information.
Optionally, the title information includes a title tag, a block number, a total writing number of the block, and a valid flag; the user data information includes a data tag and user data.
In a second aspect, the present application provides a data writing apparatus, comprising: a unit determining module and a data writing module;
the unit determining module is used for determining a virtual writing unit in response to the change of the minimum writing unit of the flash memory module, wherein the number of bytes of the virtual writing unit is a positive integer multiple of the number of bytes of the minimum writing unit;
the data writing module is used for writing title information and user data information according to the byte number of the virtual writing unit.
Optionally, the data writing module includes: the first writing sub-module, the second writing sub-module and the third writing sub-module;
the first writing sub-module is used for writing title information in a first period of the flash memory module;
the second writing sub-module is configured to write user data information after the header information in the first period if the number of bytes of the virtual writing unit is greater than the number of bytes of the header information;
and the third writing sub-module is used for continuously writing the user data information in the second period of the flash memory module if the byte number of the user data information is larger than the difference value between the byte number of the virtual writing unit and the byte number of the header information.
Optionally, the data writing module further includes: a fourth write sub-module;
and the fourth writing sub-module is used for writing user data information in the second period if the byte number of the virtual writing unit is equal to the byte number of the title information.
Optionally, the data writing module further includes: a fifth write sub-module;
and the fifth writing submodule is used for supplementing 0 in unwritten bytes of the first period if the byte number of the user data information is smaller than the difference value between the byte number of the virtual writing unit and the byte number of the title information.
Optionally, the apparatus further includes: a mark writing module and an effective judging module;
the mark writing module is used for writing mark information according to the number of bytes of the virtual writing unit;
and the validity judging module is used for confirming whether the writing of the title information and the user data information is valid or not according to the marking information.
Optionally, the title information includes a title tag, a block number, a total writing number of the block, and a valid flag; the user data information includes a data tag and user data.
Compared with the prior art, the application has the following beneficial effects:
the application provides a data writing method and device, wherein the method comprises the following steps: determining a virtual write unit in response to a change in a minimum write unit of the flash memory module, the number of bytes of the virtual write unit being a positive integer multiple of the number of bytes of the minimum write unit; the header information and the user data information are written according to the number of bytes of the virtual writing unit. Therefore, when the minimum writing unit of the flash memory module is changed, only the virtual writing unit is required to be changed into the positive integer multiple of the changed minimum writing unit, and the data writing format of the flash memory module can be changed without modifying the data writing code when the title information and the user data information are written, so that the development time and the development energy waste are reduced, and the data writing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flowchart of a data writing method according to an embodiment of the present application;
FIG. 2A is a schematic diagram of a flash memory module according to an embodiment of the present application;
FIG. 2B is a schematic diagram of another flash memory module according to an embodiment of the present application;
FIG. 3A is a schematic diagram of power down during a first writing process according to an embodiment of the present disclosure;
FIG. 3B is a schematic diagram of power down during a second writing process according to an embodiment of the present disclosure;
FIG. 3C is a schematic diagram of power down during a third writing process according to an embodiment of the present application;
FIG. 3D is a schematic diagram of power down during a fourth writing process according to an embodiment of the present disclosure;
FIG. 4A is a schematic diagram of a data writing format according to an embodiment of the present application;
FIG. 4B is a schematic diagram of another data writing format according to an embodiment of the present application;
fig. 5 is a schematic diagram of a data writing device according to an embodiment of the present application.
Detailed Description
First, technical terms referred to herein will be explained:
flash memory is a kind of memory device, is a Non-Volatile (Non-Volatile) memory, and can maintain data for a long time even under the condition of no current supply, and its storage characteristic is equivalent to a hard disk, and this characteristic is the basis of flash memory becoming a storage medium of various portable digital devices.
As described above, in order to provide an Open, standardized software architecture for the AUTomotive electronics field, an AUTomotive Open system architecture (autonomous Open SystemArchitecture, AUTOSAR) has been developed. The AUTOSAR defines a 32-bit virtual linear address space in a Flash memory module of the automobile chip, wherein the virtual linear address space further comprises a 16-bit block number and a 16-bit block offset. In the related art, a user may write data into a block number of Flash, or may read the data written in Flash according to the block number.
However, if the minimum writing unit of Flash is changed due to the replacement of Flash in the automobile chip, the original data writing code has to be modified, resulting in waste of development time and development effort of relevant technicians.
In view of this, the present application discloses a data writing method and device, the method includes: determining a virtual write unit in response to a change in a minimum write unit of the flash memory module, the number of bytes of the virtual write unit being a positive integer multiple of the number of bytes of the minimum write unit; the header information and the user data information are written according to the number of bytes of the virtual writing unit. Therefore, when the minimum writing unit of the flash memory module is changed, only the virtual writing unit is required to be changed into the positive integer multiple of the changed minimum writing unit, and the data writing format of the flash memory module can be changed without modifying the data writing code when the title information and the user data information are written, so that the development time and the development energy waste are reduced, and the data writing efficiency is improved.
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, the flowchart of a data writing method according to an embodiment of the present application is shown. The method comprises the following steps:
s101: in response to a change in a minimum write unit of the flash memory module, a virtual write unit is determined.
The virtual write unit is a positive integer multiple of the minimum write unit. By way of example, if the minimum write unit is 8 bytes, then the virtual write unit may be 8 bytes, 16 bytes, 24 bytes, etc.; if the minimum write unit is 16 bytes, then the virtual write unit may be 16 bytes, 32 bytes, etc. When the minimum writing unit of the flash memory module is changed, it is first necessary to determine a virtual writing unit corresponding to the minimum writing unit.
S102: and writing the title information and the user data information in the flash memory module according to the byte number of the virtual writing unit.
The title information stores a title tag, a block number, the total number of writing of the block, and a valid flag. Wherein the header tag occupies 1 byte, the block number occupies 2 bytes (the AUTOSAR regulation range is 0x0001-0 xFFFE), the total writing times of the block occupy 4 bytes (the AUTOSAR regulation range is 0x0-0 xFFFFFFFF), the valid mark occupies 1 byte (the AUTOSAR provides the function of invalidating the block, and the header information stores the information to quickly judge whether the block is valid or not). Therefore, the header information is fixed to occupy 8 bytes.
It should be noted that, each piece of the header information may occupy other numbers of bytes, and the header information may occupy other numbers of bytes according to the change of the number of bytes of each piece of the header information. The present application is not limited in this regard.
The user data information stores a data tag and user data. Wherein, the data tag occupies 1 byte, and the rest bytes all store user data.
The specific method of writing the header information and the user data information in the flash memory module is related to the number of bytes of the virtual writing unit determined in step S101.
In some specific implementations, after the header information is written in the first period of the flash memory module, if the number of bytes of the virtual writing unit of the flash memory module is equal to the number of bytes of the header information, then the user data information is continuously written in the second period of the flash memory module. If the number of bytes of the virtual writing unit of the flash memory module is greater than the number of bytes of the header information, the user data information is written continuously after the header information of the first period.
Further, if the user data information is written after the header information of the first period, it is also necessary to determine whether the number of bytes of the user data information is greater than the difference between the virtual writing unit and the number of bytes of the header information. If so, the user data information needs to be continuously written in the next period of the flash memory module, namely, the second period. If not, it is indicated that there is an unwritten byte in the first cycle where no information is written, and 0 needs to be appended to the unwritten byte in the first cycle.
In the process of writing the header information and the user data information into the flash memory module, the problems of error length, error address alignment and the like of the header information and the user data information do not exist, so that the flash memory module only needs to check whether the header information and the user data information are correctly written after all the processes of writing the header information and the user data information are completed each time. In some specific implementations, a read back may be performed after writing the header information and the user data information to determine if the header information and the user data information are written correctly. Specifically, after the writing operation is completed, the data written in the flash memory module can be read, and the data written in the flash memory module is compared with the data in the software cache (i.e. the data before writing) so as to ensure the data consistency.
S103: and writing mark information in the flash memory module according to the byte number of the virtual writing unit.
The tag information stores tag labels, page numbers, and page number check codes (i.e., the number of virtual writing units occupied by header information and user data). Wherein the tag label, the number of pages, and the page count check code all occupy 2 bytes. Therefore, the flag information occupies 6 bytes fixedly.
After the header information and the user data information are written, the mark information may be written in another period, and a verification operation is not required. When the mark information is filled, the bytes without the mark information need to be supplemented with 0 until the whole virtual writing unit is filled.
Referring to fig. 2A, a schematic diagram of a flash memory module according to an embodiment of the present application is shown. The diagram may represent a positional relationship of the title information, the user data information, and the mark information when the virtual writing unit is 8 bytes. As can be seen, a row is a cycle, and a cycle may represent a virtual write unit. Since header information is fixed to occupy 8 bytes, and is located in the first row (first period), 16 bytes of user data information are located in the second and third rows (second and third periods), and tag information is located in the fourth row (fourth period).
Referring to fig. 2B, a schematic diagram of another flash memory module according to an embodiment of the present application is shown. The diagram may represent a positional relationship of the title information, the user data information, and the mark information when the virtual writing unit is 16 bytes. As can be seen, a row is a cycle, and a cycle may represent a virtual write unit. Since header information is fixed to occupy 8 bytes and occupies half of the first line (half of the first period), 24 bytes of user data information are located in the remaining half of the first line (half of the first period) and the second line (second period). That is, a part of the user data information is stored after the header information of the first period (there is no data tag in this user data information), and another part of the user data information is stored in the second period until the entire second period is filled. The marking information is located in the third row (third period).
S104: based on the flag information, it is confirmed whether or not the writing of the header information and the user data information is valid.
The flag information may be used as a flag for judging whether writing of the header information and the user data information in the flash memory module is effective, thereby easily recognizing the accuracy of the data. By way of example, verifying whether the writing of the title information and the user data information is valid by the flag information may include the following scenarios:
scene one: referring to fig. 3A, a schematic diagram of power outage during a first writing process according to an embodiment of the present application is shown. During writing of user data information, a power outage occurs. Then, after power-up, the area of the mark information is free of any data, and the block information is considered to be damaged, and the writing of the block data, i.e., the header information and the user data information, cannot be used.
Scene II: referring to fig. 3B, a schematic diagram of power outage during a second writing process according to an embodiment of the present application is shown. A power outage occurs just after writing user data information. Similar to the scene one, after power-on, the area marked with information has no data, the block of information is considered to be damaged, and the block of data cannot be used , I.e. writing of header information and user data information is not valid.
Scene III: referring to fig. 3C, a schematic diagram of power outage during a third writing process according to an embodiment of the present application is shown. During writing of the mark information, a power outage occurs. Then, after power-up, the area of the mark information has data, but the data is incomplete, and writing of the title information and the user data information is considered valid.
Scene four: referring to fig. 3D, a schematic diagram of power outage during a fourth writing process according to an embodiment of the present application is shown. And powering off after the writing of the header information and the user data information is completed and the writing of the mark information is completed. Then, after power-up, the area of the mark information has data and the data is complete, the writing of the title information and the user data information is considered valid.
Referring to fig. 4A, a schematic diagram of a data storage format according to an embodiment of the present application is shown. When the minimum writing unit and the virtual writing unit of the flash memory module are both 8 bytes, the header information just occupies one virtual writing unit (first period), the user data information is stored in other areas (second period, N-1 th period), and the user data in the last period (N-1 th period) of the user data information is not completely written into one period, and 0 is needed to be supplemented. In the last period (nth period), the flag information is aligned with the dummy write unit, and 0 is required to be replenished when the data is insufficient.
Referring to fig. 4B, a schematic diagram of another data storage format according to an embodiment of the present application is shown. When the minimum writing unit and the dummy writing unit of the flash memory module are both 16 bytes, the header information does not occupy one dummy writing unit (first period), and the user data information needs to be filled. If there is more user data information remaining, the user data stored in the other area (second period, N-1 th period) and the last period of user data information (N-1 th period) is not completely written in one period, and 0 is added. In the last period (nth period), the flag information is aligned with the dummy write unit, and 0 is required to be replenished when the data is insufficient.
In summary, the application discloses a data writing method, which responds to the change of the minimum writing unit of a flash memory module to determine a virtual writing unit, wherein the number of bytes of the virtual writing unit is a positive integer multiple of the number of bytes of the minimum writing unit; the header information and the user data information are written according to the number of bytes of the virtual writing unit. Therefore, when the minimum writing unit of the flash memory module is changed, only the virtual writing unit is required to be changed into the positive integer multiple of the changed minimum writing unit, and the data writing format of the flash memory module can be changed without modifying the data writing code when the title information and the user data information are written, so that the development time and the development energy waste are reduced, and the data writing efficiency is improved.
Referring to fig. 5, a data writing device is provided in an embodiment of the present application. The data writing device 200 includes: a unit determination module 201 and a data writing module 202;
a unit determining module 201 for determining a virtual writing unit in response to a change of a minimum writing unit of the flash memory module, the number of bytes of the virtual writing unit being a positive integer multiple of the number of bytes of the minimum writing unit; the data writing module 202 is configured to write header information and user data information according to the number of bytes of the virtual writing unit.
In some specific implementations, the data writing module 202 includes: the first writing sub-module, the second writing sub-module and the third writing sub-module;
the first writing sub-module is used for writing the title information in a first period of the flash memory module; the second writing sub-module is used for writing user data information after the title information in the first period if the byte number of the virtual writing unit is larger than the byte number of the title information; and the third writing sub-module is used for continuously writing the user data information in the second period of the flash memory module if the byte number of the user data information is larger than the difference value between the byte number of the virtual writing unit and the byte number of the header information.
In some specific implementations, the data writing module 202 further includes: a fourth write sub-module;
and the fourth writing sub-module is used for writing the user data information in the second period if the number of bytes of the virtual writing unit is equal to the number of bytes of the header information.
In some specific implementations, the data writing module 202 further includes: a fifth write sub-module;
and a fifth writing sub-module, configured to, if the number of bytes of the user data information is smaller than the difference between the number of bytes of the virtual writing unit and the number of bytes of the header information, supplement 0 in the unwritten bytes of the first period.
In some specific implementations, the data writing apparatus 200 further includes: a mark writing module and an effective judging module;
the mark writing module is used for writing mark information according to the number of bytes of the virtual writing unit; and the validity judging module is used for confirming whether the writing of the title information and the user data information is valid or not according to the mark information.
In some specific implementations, the header information includes a header tag, a block number, a total number of writes for the block, and a valid flag; the user data information includes a data tag and user data.
In summary, the application discloses a data writing device, when the minimum writing unit of the flash memory module is changed, only the virtual writing unit is required to be changed into the positive integer multiple of the changed minimum writing unit, so that the data writing format of the flash memory module can be changed without modifying the data writing code when the header information and the user data information are written, thereby reducing the development time and the development energy waste and improving the data writing efficiency.
It should be noted that, in the embodiments of the present application, the "first" and the "second" in the names of "first" and "second" (where any exists) are only used to make name identifiers, and do not represent the first and second in sequence.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus general hardware platforms. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a read-only memory (ROM)/RAM, a magnetic disk, an optical disk, or the like, including several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a router) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment is mainly described in a different point from other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, with reference to the description of the method embodiments in part. The above-described apparatus and system embodiments are merely illustrative, in which elements illustrated as separate elements may or may not be physically separate, and elements illustrated as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing is merely one specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A method of writing data, the method comprising:
determining a virtual writing unit in response to a change of a minimum writing unit of the flash memory module, wherein the number of bytes of the virtual writing unit is a positive integer multiple of the number of bytes of the minimum writing unit;
and writing title information and user data information according to the byte number of the virtual writing unit.
2. The method of claim 1, wherein the writing of the title information and the user data information comprises:
writing title information in a first period of the flash memory module;
if the byte number of the virtual writing unit is greater than the byte number of the title information, writing user data information after the title information in the first period;
and if the byte number of the user data information is larger than the difference value between the byte number of the virtual writing unit and the byte number of the header information, continuing to write the user data information in the second period of the flash memory module.
3. The method according to claim 2, wherein the method further comprises:
and if the byte number of the virtual writing unit is equal to the byte number of the title information, writing user data information in the second period.
4. The method according to claim 2, wherein the method further comprises:
and if the byte number of the user data information is smaller than the difference value between the byte number of the virtual writing unit and the byte number of the header information, supplementing 0 in the unwritten bytes of the first period.
5. The method according to claim 1, wherein the method further comprises:
writing mark information according to the byte number of the virtual writing unit;
and confirming whether the writing of the title information and the user data information is effective according to the mark information.
6. The method of claim 1, wherein the header information includes a header tag, a block number, a total number of writes of the block, and a valid flag; the user data information includes a data tag and user data.
7. A data writing apparatus, the apparatus comprising: a unit determining module and a data writing module;
the unit determining module is used for determining a virtual writing unit in response to the change of the minimum writing unit of the flash memory module, wherein the number of bytes of the virtual writing unit is a positive integer multiple of the number of bytes of the minimum writing unit;
the data writing module is used for writing title information and user data information according to the byte number of the virtual writing unit.
8. The apparatus of claim 7, wherein the data writing module comprises: the first writing sub-module, the second writing sub-module and the third writing sub-module;
the first writing sub-module is used for writing title information in a first period of the flash memory module;
the second writing sub-module is configured to write user data information after the header information in the first period if the number of bytes of the virtual writing unit is greater than the number of bytes of the header information;
and the third writing sub-module is used for continuously writing the user data information in the second period of the flash memory module if the byte number of the user data information is larger than the difference value between the byte number of the virtual writing unit and the byte number of the header information.
9. The apparatus of claim 8, wherein the data writing module further comprises: a fourth write sub-module;
and the fourth writing sub-module is used for writing user data information in the second period if the byte number of the virtual writing unit is equal to the byte number of the title information.
10. The apparatus of claim 7, wherein the apparatus further comprises: a mark writing module and an effective judging module;
the mark writing module is used for writing mark information according to the number of bytes of the virtual writing unit;
and the validity judging module is used for confirming whether the writing of the title information and the user data information is valid or not according to the marking information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311486471.3A CN117348819A (en) | 2023-11-09 | 2023-11-09 | Data writing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311486471.3A CN117348819A (en) | 2023-11-09 | 2023-11-09 | Data writing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117348819A true CN117348819A (en) | 2024-01-05 |
Family
ID=89359544
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311486471.3A Pending CN117348819A (en) | 2023-11-09 | 2023-11-09 | Data writing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117348819A (en) |
-
2023
- 2023-11-09 CN CN202311486471.3A patent/CN117348819A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101427323B (en) | System and method for reading non-volatile computer memory | |
CN101576853B (en) | Data access method and controller and memory system using same | |
CN102346925B (en) | Electronic ticket storage equipment, electronic ticket checking system and method | |
CN104978148A (en) | Data writing method and device and data reading method and device | |
US20070046431A1 (en) | System and method for combining RFID tag memory | |
CN111192622B (en) | Flash memory controller and coding circuit and decoding circuit therein | |
CN102403041B (en) | Data programming circuit and method for one-time programmable memory | |
CN107678977B (en) | Reading and writing method and device of counter | |
CN116029080A (en) | Chip storage device design and verification method and device and electronic equipment | |
CN117348819A (en) | Data writing method and device | |
CN112328594A (en) | Embedded device model data management method and device | |
CN112558868A (en) | Method, device and equipment for storing configuration data | |
CN110008059B (en) | Data updating method and device for nonvolatile storage medium and storage medium | |
CN114201176A (en) | Intelligent contract compiling and matching method, device, equipment and storage medium | |
CN101571808B (en) | Method for improving production efficiency of telecommunication smart card | |
CN103559141A (en) | Management method and device for nonvolatile memory (NVM) | |
CN114924947A (en) | Code testing method and device, electronic equipment and storage medium | |
CN114300026A (en) | Monotonic counter, counting method, electronic device and storage medium | |
US8190841B2 (en) | Method of managing sectors of a non-volatile memory | |
CN108415814B (en) | Method for automatically recording field change, application server and computer readable storage medium | |
CN102043639A (en) | Method and system for starting processing system from NAND (NOT-AND) FLASH | |
US10223195B2 (en) | Counter in a flash memory | |
CN115309349B (en) | Deep learning sparse data storage method, computer device and storage medium | |
CN116610269B (en) | Data storage method, device, storage medium and controller | |
CN115509466B (en) | Data management method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |