CN111506272B - Storage method, device and equipment of note file and computer readable storage medium - Google Patents

Storage method, device and equipment of note file and computer readable storage medium Download PDF

Info

Publication number
CN111506272B
CN111506272B CN202010625096.6A CN202010625096A CN111506272B CN 111506272 B CN111506272 B CN 111506272B CN 202010625096 A CN202010625096 A CN 202010625096A CN 111506272 B CN111506272 B CN 111506272B
Authority
CN
China
Prior art keywords
file
note
compressed
processed
files
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.)
Active
Application number
CN202010625096.6A
Other languages
Chinese (zh)
Other versions
CN111506272A (en
Inventor
李林
许兆勇
王江南
钟洪耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Original Assignee
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianfenyi Intelligent Technology Co Ltd filed Critical Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority to CN202010625096.6A priority Critical patent/CN111506272B/en
Publication of CN111506272A publication Critical patent/CN111506272A/en
Application granted granted Critical
Publication of CN111506272B publication Critical patent/CN111506272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1847File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0605Improving or facilitating administration, e.g. storage management by facilitating the interaction with a user or administrator
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for storing a note file, wherein the method comprises the following steps: after detecting a note file to be processed sent by the terminal equipment, acquiring the note file to be processed, and zooming a preset page in the note file to be processed to obtain a thumbnail file; acquiring an edit file, and compressing the edit file, the note file to be processed and the thumbnail file to obtain a first compressed file of the edit file, a second compressed file of the note file to be processed and a third compressed file of the thumbnail file; and packaging the first compressed file, the second compressed file and the third compressed file to obtain a note file to be stored, and updating the note file in the FLASH memory FLASH based on the note file to be stored. The invention realizes the acquisition of the note file to be processed, the scaling of the preset page, the compression of the edit file, the note file to be processed and the thumbnail file, and the updating of the note file in the FLASH, thereby improving the storage efficiency of the note file.

Description

Storage method, device and equipment of note file and computer readable storage medium
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for storing a note file.
Background
At present, a note file storage method is mainly a note file independent storage method, and the note file independent storage method is to store all files related to a note file into a file system FATFS respectively. Since all files related to the note file need to be stored respectively, a plurality of independent files need to be generated, and therefore the file allocation table FAT table of the FATFS file system needs to be operated for many times, so that the FLASH memory FLASH erasing frequency is increased, FLASH memory wear is caused, and the storage speed of the note file is reduced.
Disclosure of Invention
The invention mainly aims to provide a note file storage method, a note file storage device, note file storage equipment and a computer readable storage medium, and aims to solve the technical problem that the existing note file storage method is low in note file storage efficiency.
In order to achieve the above object, the present invention provides a method for storing a note file, which comprises the following steps:
after detecting a note file to be processed sent by a terminal device, acquiring the note file to be processed, and zooming a preset page in the note file to be processed to obtain a thumbnail file;
acquiring an edit file, and compressing the edit file, the note file to be processed and the thumbnail file respectively to obtain a first compressed file corresponding to the edit file, a second compressed file corresponding to the note file to be processed and a third compressed file corresponding to the thumbnail file;
and packaging the first compressed file, the second compressed file and the third compressed file to obtain a note file to be stored, and updating the note file in the FLASH memory FLASH based on the note file to be stored.
Optionally, the step of packaging the first compressed file, the second compressed file, and the third compressed file to obtain a note file to be stored includes:
acquiring first position information corresponding to the first compressed file, second position information corresponding to the second compressed file and third position information corresponding to the third compressed file, and constructing a packet header file according to the first position information, the second position information and the third position information;
and packaging the first compressed file, the second compressed file, the third compressed file and the packet header file to obtain the note file to be stored.
Optionally, the step of obtaining the note file to be processed after detecting the note file to be processed sent by the terminal device, and zooming a preset page in the note file to be processed to obtain a thumbnail file includes:
after the note file to be processed sent by the terminal equipment is detected, the note file to be processed is obtained, and whether page data of the note file to be processed is larger than or equal to preset page data is detected;
if the page number data is detected to be larger than or equal to the preset page number data, acquiring a preset page corresponding to the preset page number data;
and zooming the horizontal pixels and the vertical pixels of the preset page through the same pixels to obtain the thumbnail file.
Optionally, the step of obtaining an edit file, and compressing the edit file, the to-be-processed note file, and the thumbnail file respectively to obtain a first compressed file corresponding to the edit file, a second compressed file corresponding to the to-be-processed note file, and a third compressed file corresponding to the thumbnail file includes:
acquiring the editing file, wherein the editing file comprises a stroke file and a coordinate file;
and compressing the editing file, the note file to be processed and the thumbnail file respectively through a preset compression format to correspondingly obtain the first compression file, the second compression file and the third compression file.
Optionally, after the step of packaging the first compressed file, the second compressed file, and the third compressed file to obtain a to-be-stored note file, and updating the note file in the FLASH memory FLASH based on the to-be-stored note file, the method further includes:
after detecting a file reading request sent by the terminal equipment, detecting a file type corresponding to the file reading request, and acquiring a corresponding compressed file in the FLASH according to the file type;
and decompressing the compressed file to obtain a corresponding decompressed file, and returning the decompressed file to the terminal equipment.
Optionally, the step of detecting a file type corresponding to the file reading request after detecting the file reading request sent by the terminal device, and acquiring a corresponding compressed file in the FLASH according to the file type includes:
detecting a file type corresponding to a file reading request sent by the terminal equipment after the file reading request is detected;
and if the file type is detected to be the view of the original file, determining a second compressed file corresponding to the note file to be stored in the note file of the FLASH as the compressed file through the packet header file.
Optionally, the editing file includes a stroke file and a coordinate file, and after the step of decompressing the compressed file to obtain a corresponding decompressed file and returning the decompressed file to the terminal device, the method further includes:
if an editing instruction sent by the terminal equipment is detected, acquiring a first compressed file corresponding to the editing file in a note file of the FLASH through a packet header file, and decompressing the first compressed file to obtain the stroke file and the coordinate file;
returning the stroke file and the coordinate file to the terminal equipment so that a user can edit the note file to be processed through the stroke file and the coordinate file and feed back the edited note file to be processed;
and compressing the edited note file to be processed, and updating the note file in the FLASH memory FLASH.
In addition, to achieve the above object, the present invention further provides a storage device for a note file, including:
the acquisition module is used for acquiring the note file to be processed after detecting the note file to be processed sent by the terminal equipment;
the zooming module is used for zooming a preset page in the note file to be processed to obtain a thumbnail file;
the acquisition module is also used for acquiring an editing file;
the compression module is used for respectively compressing the editing file, the note file to be processed and the thumbnail file to obtain a first compression file corresponding to the editing file, a second compression file corresponding to the note file to be processed and a third compression file corresponding to the thumbnail file;
the packaging module is used for packaging the first compressed file, the second compressed file and the third compressed file to obtain a note file to be stored;
and the updating module is used for updating the note files in the FLASH memory FLASH based on the note files to be stored.
In addition, in order to achieve the above object, the present invention further provides a storage device for a note file, where the storage device for a note file includes a memory, a processor, and a storage program for a note file stored in the memory and running on the processor, and the storage program for a note file implements the steps of the storage method for a note file as described above when the storage program for a note file is completed by the processor.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a storage program of a note file, the storage program of the note file realizing the steps of the storage method of the note file as described above when being completed by a processor.
The method comprises the steps of obtaining a note file to be processed, zooming a preset page in the note file to be processed to obtain a thumbnail file, then compressing an editing file, the note file to be processed and the thumbnail file to obtain a first compression file, a second compression file and a third compression file correspondingly, finally packaging the first compression file, the second compression file and the third compression file to obtain a note file to be stored, and storing the note file to be stored to FLASH. Therefore, in the process of obtaining the note files to be stored, the edit files, the note files to be processed and the thumbnail files need to be compressed, so that the size of the memory occupied by the note files is reduced, the note files can be stored quickly, and the storage efficiency of the note files is improved. Moreover, a plurality of files of the editing file, the note file to be processed and the thumbnail file are packaged into one file to obtain the note file to be stored, so that different files can be obtained by operating the FATFS file system FAT table once, the erasing frequency of FLASH is reduced, the abrasion of FLASH is reduced, and the storage efficiency of the note file is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for storing a note file according to a first embodiment of the present invention;
FIG. 2 is an analysis diagram of a first embodiment of a method for storing a note file according to the present invention;
FIG. 3 is a schematic structural diagram of a storage device for note files according to the present invention;
fig. 4 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a storage method of note files, and referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the storage method of note files of the invention.
The embodiment of the present invention provides an embodiment of a storage method for a note file, and it should be noted that although a logical order is shown in a flowchart, in some data, the steps shown or described may be completed in a different order.
The storage method of the note file comprises the following steps:
step S10, after detecting the note file to be processed sent by the terminal device, acquiring the note file to be processed, and zooming the preset page in the note file to be processed to obtain the thumbnail file.
Before the file system acquires the note file to be processed, a user edits the file on an editing page according to requirements in a note file APP (terminal software) pre-installed in terminal equipment, and after the file is edited, the edited note file to be processed is sent to the file system through a submitting instruction. The file system acquires the note file to be processed after detecting the note file to be processed sent by the terminal device, analyzes a stroke file in the file editing process through a User Interface (UI) layer logic code, namely, which points belong to a stroke, records information such as stroke type information, line width information and stroke color information, analyzes a coordinate file, namely, a pen point track coordinate, generates an editing file of each page in the note file to be processed according to the analysis stroke file and the coordinate file, acquires a corresponding page in the note file to be processed as an original image file of the note file to be processed, and zooms the original image file according to a preset zooming mode to obtain a corresponding thumbnail image file.
The terminal device includes, but is not limited to, a mobile phone, a tablet computer and an intelligent learning computer. The preset scaling modes include an equal pixel proportion scaling mode, an equal pixel scaling mode and the like. It should be noted that the stroke file and the coordinate file are generated during the file editing process.
Further, the step S10 includes:
step a, after the note file to be processed sent by the terminal equipment is detected, the note file to be processed is obtained, and whether page data of the note file to be processed is larger than or equal to preset page data is detected;
step b, if the page number data is detected to be larger than or equal to the preset page number data, acquiring a preset page corresponding to the preset page number data;
and c, zooming the horizontal pixels and the vertical pixels of the preset page through the same pixels to obtain the thumbnail file.
Specifically, after detecting a to-be-processed note file sent by a terminal device, a file system acquires the to-be-processed note file, acquires page data in the to-be-processed note file, then detects whether the page data in the to-be-processed note file is greater than or equal to preset page data, if it is detected that the page data is greater than or equal to the preset page data, the file system acquires a preset page corresponding to the preset page data as an original image file, and if it is detected that the page data is less than the preset page data, the file system acquires a preset page corresponding to page data 1 in the to-be-processed file as the original image file. After the file system acquires the preset page, the preset zooming requirement is acquired, and the horizontal pixels and the vertical pixels of the preset page are zoomed in a zooming mode of equal pixel scale zooming according to the preset zooming requirement, so that the corresponding thumbnail file is acquired. The preset zooming requirement is set by the user according to the requirement, and the embodiment is not limited.
In this embodiment, for example, the preset page code data is 5, the preset zoom requirement is reduced to one fourth of the original size, and the file system detects that the page code data of the to-be-processed note file is 8, then a page corresponding to the page code data of 5 in the to-be-processed note file is acquired as a preset page, and then both the horizontal pixels and the vertical pixels of the preset page are reduced to half of the original size, so as to obtain the thumbnail file. Further, the preset page code data is 5, if the file system detects that the page code data of the to-be-processed note file is 4, the page corresponding to the page code data 1 in the to-be-processed file is taken as the preset page, and then the horizontal pixels and the vertical pixels of the preset page are reduced to half of the original value, so that the thumbnail file is obtained.
Step S20, acquiring an edit file, and compressing the edit file, the note file to be processed and the thumbnail file respectively to obtain a first compressed file corresponding to the edit file, a second compressed file corresponding to the note file to be processed and a third compressed file corresponding to the thumbnail file.
The file system acquires the editing file stored in the memory, and then compresses the obtained editing file, the note file to be processed and the thumbnail file respectively through a preset compression format to obtain a first compression file corresponding to the editing file, a second compression file corresponding to the note file to be processed and a third compression file corresponding to the thumbnail file. The preset compression format includes, but is not limited to, LZO (data compression algorithm) compression format, ZIP (file format for data compression and document storage) compression format, and RAR (file format for data compression and archive packaging) compression format.
Further, the step S20 includes:
step d, acquiring the editing file, wherein the editing file comprises a stroke file and a coordinate file;
and e, compressing the editing file, the note file to be processed and the thumbnail file respectively through a preset compression format to correspondingly obtain the first compression file, the second compression file and the third compression file.
Specifically, the file system acquires an editing file stored in the memory, wherein the editing file comprises a stroke file and a coordinate file, and the editing file, a note file to be processed and a thumbnail file are respectively compressed through an LZO compression format, so that a first compression file is obtained correspondingly as the editing file, an LZO, a second compression file is obtained correspondingly as the thumbnail file, and the LZO and a third compression file are obtained correspondingly as the thumbnail file.
Further, when the editing page is subjected to file editing, the file system records information such as type information, color information and line width information of an editing tool on the editing page, and information such as position information, change sequence, end position and start position of all coordinates of the editing tool in the sliding process, and then determines the note file to be processed according to the sliding track of the editing tool. The information such as type information, color information, line width information and the like of the editing tool is a stroke file of the editing file, and the information such as position information, change sequence, end position, starting position and the like of all coordinates of the editing tool in the sliding process is a coordinate file of the editing file.
In this embodiment, for example, the stroke file is an editing tool of which the type is pen, the color is black, the line width is regular font 4, the editing tool is in the sliding process, the file system records that all coordinates and change sequences of the editing tool are (4, 12), (0, 7), (0, 4), (8, 4), (2, 10) and (2, 0), the sequence of the start coordinate positions is (4, 12), (0, 4) and (2, 10), the end coordinate positions are (0, 7), (8, 4) and (2, 0), the file system determines that the character "thousand" is included according to the sliding track of the editing tool, and determines the page corresponding to the character "thousand" as the note file to be processed, the editing file is an editing tool of which the type is pen, the color is black, the line width is regular font 4, and all coordinates and change sequences of the editing tool are (4, 12), (0, 7), (0, 4), (8, 4), (2, 10) and (2, 0), the order of the start coordinate positions is (4, 12), (0, 4) and (2, 10), and the end coordinate positions are (0, 7), (8, 4) and (2, 0).
Step S30, the first compressed file, the second compressed file, and the third compressed file are packaged to obtain a to-be-stored note file, and the note file in the FLASH memory FLASH is updated based on the to-be-stored note file.
After the file system obtains the first compressed file, the second compressed file and the third compressed file, the first compressed file, the second compressed file and the third compressed file are packaged in a preset packaging mode to obtain a note file to be stored, and then the note file to be stored replaces the original note file stored in the FLASH.
Further, the step S30 includes:
step f, acquiring first position information corresponding to the first compressed file, second position information corresponding to the second compressed file and third position information corresponding to the third compressed file, and constructing a packet header file according to the first position information, the second position information and the third position information;
and g, packaging the first compressed file, the second compressed file, the third compressed file and the packet header file to obtain the note file to be stored.
Specifically, the file system acquires first position information corresponding to a first compressed file, second position information corresponding to a second compressed file and third position information corresponding to a third compressed file from a database, combines the first position information, the second position information and the third position information, constructs a packet header file containing the first position information, the second position information and the third position information, and splices the packet header file with the first compressed file, the second compressed file and the third compressed file as a file identifier to obtain a note file to be stored.
It should be noted that, the header file records relative position information of the first compressed file, the second compressed file, and the third compressed file in the header file, and the corresponding compressed file can be acquired through the relative position information.
In this embodiment, for example, the file system obtains that the first position information is offset + file _ size, the second position information is offset + offset + file _ size, and the third position information is offset + offset + file _ size in the database, then combines offset + file _ size, offset + offset + file _ size, and offset + offset + offset + file _ size to construct a header file, and then splices the header file with the first compressed file, the second compressed file, and the third compressed file to obtain the to-be-stored note file.
Further, referring to fig. 2, fig. 2 is an analysis diagram of the storage method of the note file of the present invention, the file system performs LZO format compression on the thumbnail file, the file to be processed (large image file), the stroke file, and the coordinate file, and then performs packing and splicing on the compressed thumbnail file, LZO, the file to be processed, LZO, the stroke file, LZO, and the coordinate file, LZO, and the Header file (Header) to obtain a note file to be stored (synthetic note file), and finally stores the note file to be stored in FLASH. The header file records the relative position information of each compressed file in the whole note file to be stored.
According to the embodiment, the note file to be stored is obtained by obtaining the note file to be processed, zooming the preset page in the note file to be processed to obtain the thumbnail file, then compressing the edit file, the note file to be processed and the thumbnail file to obtain the first compressed file, the second compressed file and the third compressed file correspondingly, finally packing the first compressed file, the second compressed file and the third compressed file to obtain the note file to be stored, and storing the note file to be stored to FLASH. Therefore, in the process of obtaining the note files to be stored, the edit files, the note files to be processed and the thumbnail files need to be compressed, so that the size of the memory occupied by the note files is reduced, the note files can be stored quickly, and the storage efficiency of the note files is improved. Moreover, a plurality of files of the editing file, the note file to be processed and the thumbnail file are packaged into one file to obtain the note file to be stored, so that different files can be obtained by operating the FATFS file system FAT table once, the erasing frequency of FLASH is reduced, the abrasion of FLASH is reduced, and the storage efficiency of the note file is improved.
Further, a second embodiment of the storage method of the note file of the present invention is provided.
The second embodiment of the note file storage method is different from the first embodiment of the note file storage method in that the note file storage method further includes:
h, detecting a file type corresponding to the file reading request after detecting the file reading request sent by the terminal equipment, and acquiring a corresponding compressed file in the FLASH according to the file type;
and step i, decompressing the compressed file to obtain a corresponding decompressed file, and returning the decompressed file to the terminal equipment.
Specifically, after detecting a file reading request sent by a terminal device, a file system detects a file type corresponding to the file reading request, acquires position information corresponding to the file type in a header file, then acquires a compressed file corresponding to the file type in a FLASH according to the acquired position information, decompresses the acquired compressed file in a corresponding decompression mode to acquire a decompressed file corresponding to the file type, and sends the decompressed file to the terminal device, so that a user checks or edits the decompressed file through the terminal device.
When a file is decompressed, the decompression method of the decompressed file and the compression method are consistent, for example, the compression format is LZO, and the corresponding decompression format when the file is decompressed is LZO. The compression format is RAR, and the decompression format corresponding to the decompression is RAR.
Further, the step h includes:
step j, after detecting a file reading request sent by the terminal equipment, detecting a file type corresponding to the file reading request;
and k, if the file type is detected to be the view of the original file, determining a second compressed file corresponding to the note file to be stored in the note file of the FLASH through the packet header file as the compressed file.
Specifically, after detecting a file reading request sent by the terminal device, the file system detects a file type corresponding to the file reading request, and if the file type is detected to be an original image file, the file system acquires the position information of the file to be processed in the header file, and then acquires a second compressed file corresponding to the note file to be stored in the FLASH as a compressed file, namely, a compressed file of the file to be processed according to the position information. Further, if the file type is detected to be the view thumbnail file, the file system acquires the position information of the thumbnail file in the header file, and then acquires a third compressed file corresponding to the note file to be stored in the FLASH as a compressed file, namely the compressed file of the thumbnail file, according to the position information.
In this embodiment, after detecting a file reading request sent by a terminal device, a file type corresponding to the file reading request is detected, and a corresponding compressed file is obtained in a FLASH according to the file type, and then the compressed file is decompressed to obtain a corresponding decompressed file, and the decompressed file is returned to the terminal device. Therefore, in the embodiment, the corresponding position information is obtained in the header file according to the file type, the compressed file corresponding to the note file to be stored is obtained in the FLASH according to the position information, the compressed file is decompressed finally, and the decompressed file is returned to the terminal device, so that the corresponding compressed file can be obtained by operating the FLASH once, the erasing frequency of the FLASH is reduced, the abrasion of the FLASH is reduced, and the utilization rate of the FLASH is improved.
Further, a third embodiment of the storage method of the note file of the present invention is provided.
The third embodiment of the note file storage method is different from the first embodiment or/and the second embodiment of the note file storage method in that the note file storage method further comprises:
step l, if an editing instruction sent by the terminal equipment is detected, acquiring a first compressed file corresponding to the editing file in a note file of the FLASH through a packet header file, and decompressing the first compressed file to obtain the stroke file and the coordinate file;
step m, returning the stroke file and the coordinate file to the terminal equipment so that a user can edit the note file to be processed through the stroke file and the coordinate file and feed back the edited note file to be processed;
and n, compressing the edited note file to be processed, and updating the note file in the FLASH memory FLASH.
Specifically, after the file system acquires the second compressed file corresponding to the file to be processed, if an editing instruction sent by the terminal device is detected, the position information of the editing file in the header file is acquired, the first compressed file corresponding to the editing file is acquired in the note file of the FLASH through the position information, then the first compressed file is decompressed to obtain the corresponding stroke file and coordinate file, then the stroke file and coordinate file are returned to the terminal device, after the user receives the stroke file and coordinate file, the note file to be processed is edited in the terminal device through the stroke file and coordinate file to obtain the updated note file to be processed, and the updated note file to be processed is fed back to the file system through the terminal device, after the file system receives the updated note file to be processed, the updated note file to be processed is compressed according to the steps of the first embodiment, and then replace the original note file in FLASH.
If an editing instruction sent by the terminal device is detected, a first compressed file corresponding to the editing file is obtained in the note file of the FLASH memory through the header file, the first compressed file is decompressed to obtain a stroke file and a coordinate file, the stroke file and the coordinate file are returned to the terminal device, so that a user can edit the note file to be processed through the stroke file and the coordinate file, feed back the edited note file to be processed, compress the edited note file to be processed, and update the note file in the FLASH memory. Therefore, when editing a file, the embodiment only needs to acquire the position information through the same message file, then acquires the editing file through the position information to edit the file, and does not need to acquire the editing file in another file, so that the use of the FAT table in the file system is reduced, the erasing frequency of the FLASH is reduced, the abrasion of the FLASH is reduced, and the utilization rate of the FLASH is improved.
In addition, the present invention also provides a storage apparatus for a note file, and referring to fig. 3, the storage apparatus for a note file includes:
the acquiring module 10 is configured to acquire a to-be-processed note file after detecting the to-be-processed note file sent by a terminal device;
the zooming module 20 is configured to zoom a preset page in the note file to be processed to obtain a thumbnail file;
the obtaining module 10 is further configured to obtain an editing file;
the compression module 30 is configured to compress the edit file, the to-be-processed note file, and the thumbnail file respectively to obtain a first compressed file corresponding to the edit file, a second compressed file corresponding to the to-be-processed note file, and a third compressed file corresponding to the thumbnail file;
the packaging module 40 is configured to package the first compressed file, the second compressed file, and the third compressed file to obtain a to-be-stored note file;
and the updating module 50 is used for updating the note file in the FLASH memory FLASH based on the note file to be stored.
Further, the obtaining module 10 is further configured to obtain first location information corresponding to the first compressed file, second location information corresponding to the second compressed file, and third location information corresponding to the third compressed file.
Further, the packing module 40 includes:
the constructing unit is used for constructing a packet header file according to the first position information, the second position information and the third position information;
and the packaging unit is used for packaging the first compressed file, the second compressed file, the third compressed file and the packet header file to obtain the note file to be stored.
Further, the obtaining module 10 is further configured to obtain the to-be-processed note file after detecting the to-be-processed note file sent by the terminal device.
Further, the scaling module 20 includes:
and the detection unit is used for detecting whether the page number data of the note file to be processed is greater than or equal to preset page number data.
Further, the obtaining module 10 is further configured to obtain a preset page corresponding to the preset page data if it is detected that the page data is greater than or equal to the preset page data;
the scaling module 20 is further configured to scale the horizontal pixels and the vertical pixels of the preset page by using the same pixels to obtain the thumbnail file.
Further, the obtaining module 10 is further configured to obtain the editing file, where the editing file includes a stroke file and a coordinate file;
the compression module 30 is further configured to compress the edit file, the note file to be processed, and the thumbnail file respectively according to a preset compression format, so as to obtain the first compressed file, the second compressed file, and the third compressed file correspondingly.
Further, the storage device of the note file further comprises:
the detection module is used for detecting a file reading request sent by the terminal equipment and then detecting a file type corresponding to the file reading request;
the obtaining module 10 is further configured to obtain a corresponding compressed file in the FLASH according to the file type;
the decompression module is used for decompressing the compressed file to obtain a corresponding decompressed file;
and the sending module is used for returning the decompressed file to the terminal equipment.
Furthermore, the detection module is further configured to detect a file type corresponding to the file reading request after detecting the file reading request sent by the terminal device.
Further, the obtaining module 10 includes:
and the determining unit is used for determining a second compressed file corresponding to the note file to be stored in the note file of the FLASH as the compressed file through the header file if the file type is detected to be the view original file.
Further, the obtaining module 10 is further configured to obtain, if an editing instruction sent by the terminal device is detected, a first compressed file corresponding to the editing file from a note file of the FLASH through a header file;
the decompression module is further used for decompressing the first compressed file to obtain the stroke file and the coordinate file;
the sending module is further configured to return the stroke file and the coordinate file to the terminal device, so that a user can edit the to-be-processed note file through the stroke file and the coordinate file and feed back the edited to-be-processed note file;
the compression module 30 is further configured to compress the edited note file to be processed;
the updating module 50 is also used for updating the note files in the FLASH memory FLASH.
The specific implementation of the storage device based on the note file is basically the same as that of the above storage method based on the note file, and is not described herein again.
In addition, the invention also provides a storage device of the note file. As shown in fig. 4, fig. 4 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
It should be noted that fig. 4 is a schematic structural diagram of a hardware operating environment of a storage device, which may be a note file.
As shown in fig. 4, the storage device of the note file may include: a processor 1001, such as a CPU (central processing Unit), a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. A communication bus 1002 is used to enable connection communications between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a keyboard (board), and the optional user interface 1003 may include a standard wired interface (e.g., a USB (Universal Serial Bus) interface), and a wireless interface (e.g., a bluetooth interface). The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the storage device of the note file may further include RF (Radio Frequency) circuits, sensors, WiFi modules, and the like.
Those skilled in the art will appreciate that the storage device configuration for note files shown in FIG. 4 does not constitute a limitation on the storage device for note files, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 4, a storage 1005, which is a kind of computer storage medium, may include a storage program of an operating device, a network communication module, a user interface module, and a note file therein. The operating device is a program for managing and controlling hardware and software resources of a storage device for note files, a storage program for supporting note files, and the running of other software or programs.
In the storage device of note files shown in the figure, the user interface 1003 is mainly used for a terminal device, so that a user sends a file reading request and an editing instruction to a file system through the terminal device, and the user views files through the terminal device; the network interface 1004 is mainly used for a file system, and performs data communication with the terminal device to receive a file reading request and an editing instruction sent by the terminal device and return a corresponding file to the terminal device; the processor 1001 may be configured to call a storage program of the note file stored in the memory 1005 and complete the steps of the control method of the storage device of the note file as described above.
The specific implementation of the storage device for the note file of the present invention is basically the same as that of the embodiments of the storage method for the note file, and is not described herein again.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a storage program of a note file is stored on the computer-readable storage medium, and when the storage program of the note file is completed by a processor, the steps of the above-described storage method of the note file are implemented.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the storage method of the note file, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation manner in many cases. Based on such understanding, the technical solution of the present invention may be embodied in the form of software goods, which are stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and include instructions for enabling a storage device of a note file to perform the method according to the embodiments of the present invention.

Claims (10)

1. A storage method of note files is characterized by comprising the following steps:
after detecting a note file to be processed sent by a terminal device, acquiring the note file to be processed, and zooming a preset page in the note file to be processed to obtain a thumbnail file;
acquiring an edit file, and compressing the edit file, the note file to be processed and the thumbnail file respectively to obtain a first compressed file corresponding to the edit file, a second compressed file corresponding to the note file to be processed and a third compressed file corresponding to the thumbnail file;
and packaging the first compressed file, the second compressed file and the third compressed file to obtain a note file to be stored, and updating the note file in the FLASH memory FLASH based on the note file to be stored.
2. The method for storing note files according to claim 1, wherein the step of packing the first compressed file, the second compressed file, and the third compressed file to obtain the note files to be stored comprises:
acquiring first position information corresponding to the first compressed file, second position information corresponding to the second compressed file and third position information corresponding to the third compressed file, and constructing a packet header file according to the first position information, the second position information and the third position information;
and packaging the first compressed file, the second compressed file, the third compressed file and the packet header file to obtain the note file to be stored.
3. The method for storing the note file according to claim 1, wherein the step of obtaining the note file to be processed after detecting the note file to be processed sent by the terminal device, and zooming a preset page in the note file to be processed to obtain the thumbnail file comprises:
after the note file to be processed sent by the terminal equipment is detected, the note file to be processed is obtained, and whether page data of the note file to be processed is larger than or equal to preset page data is detected;
if the page number data is detected to be larger than or equal to the preset page number data, acquiring a preset page corresponding to the preset page number data;
and zooming the horizontal pixels and the vertical pixels of the preset page through the same pixels to obtain the thumbnail file.
4. The method for storing note files according to claim 1, wherein the step of obtaining the edit file and compressing the edit file, the note file to be processed, and the thumbnail file respectively to obtain a first compressed file corresponding to the edit file, a second compressed file corresponding to the note file to be processed, and a third compressed file corresponding to the thumbnail file comprises:
acquiring the editing file, wherein the editing file comprises a stroke file and a coordinate file;
and compressing the editing file, the note file to be processed and the thumbnail file respectively through a preset compression format to correspondingly obtain the first compression file, the second compression file and the third compression file.
5. The method for storing a note file according to claim 1, wherein after the step of packaging the first compressed file, the second compressed file, and the third compressed file to obtain a note file to be stored, and updating the note file in the FLASH memory FLASH based on the note file to be stored, the method further comprises:
after detecting a file reading request sent by the terminal equipment, detecting a file type corresponding to the file reading request, and acquiring a corresponding compressed file in the FLASH according to the file type;
and decompressing the compressed file to obtain a corresponding decompressed file, and returning the decompressed file to the terminal equipment.
6. The method for storing the note file according to claim 5, wherein the step of detecting the file type corresponding to the file reading request after detecting the file reading request sent by the terminal device, and acquiring the corresponding compressed file in the FLASH according to the file type comprises:
detecting a file type corresponding to a file reading request sent by the terminal equipment after the file reading request is detected;
and if the file type is detected to be the view of the original file, determining a second compressed file corresponding to the note file to be stored in the note file of the FLASH as the compressed file through the packet header file.
7. The method for storing note files according to any one of claims 5 to 6, wherein the editing files comprise stroke files and coordinate files, and after the step of decompressing the compressed files to obtain corresponding decompressed files and returning the decompressed files to the terminal device, the method further comprises the following steps:
if an editing instruction sent by the terminal equipment is detected, acquiring a first compressed file corresponding to the editing file in a note file of the FLASH through a packet header file, and decompressing the first compressed file to obtain the stroke file and the coordinate file;
returning the stroke file and the coordinate file to the terminal equipment so that a user can edit the note file to be processed through the stroke file and the coordinate file and feed back the edited note file to be processed;
and compressing the edited note file to be processed, and updating the note file in the FLASH memory FLASH.
8. A storage device for note files, the storage device for note files comprising:
the acquisition module is used for acquiring the note file to be processed after detecting the note file to be processed sent by the terminal equipment;
the zooming module is used for zooming a preset page in the note file to be processed to obtain a thumbnail file;
the acquisition module is also used for acquiring an editing file;
the compression module is used for respectively compressing the editing file, the note file to be processed and the thumbnail file to obtain a first compression file corresponding to the editing file, a second compression file corresponding to the note file to be processed and a third compression file corresponding to the thumbnail file;
the packaging module is used for packaging the first compressed file, the second compressed file and the third compressed file to obtain a note file to be stored;
and the updating module is used for updating the note files in the FLASH memory FLASH based on the note files to be stored.
9. A note file storage device comprising a memory, a processor, and a note file storage program stored on the memory and running on the processor, wherein the note file storage program when executed by the processor implements the steps of the note file storage method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a storage program of a note file, which when completed by a processor implements the steps of the storage method of a note file according to any one of claims 1 to 7.
CN202010625096.6A 2020-07-02 2020-07-02 Storage method, device and equipment of note file and computer readable storage medium Active CN111506272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010625096.6A CN111506272B (en) 2020-07-02 2020-07-02 Storage method, device and equipment of note file and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010625096.6A CN111506272B (en) 2020-07-02 2020-07-02 Storage method, device and equipment of note file and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111506272A CN111506272A (en) 2020-08-07
CN111506272B true CN111506272B (en) 2020-10-27

Family

ID=71877145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010625096.6A Active CN111506272B (en) 2020-07-02 2020-07-02 Storage method, device and equipment of note file and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111506272B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100419756C (en) * 2005-09-13 2008-09-17 北京中星微电子有限公司 File distribution list file system read-write method and device
JP6708476B2 (en) * 2016-05-27 2020-06-10 キヤノン株式会社 Document storage processing system
CN110794984A (en) * 2019-09-18 2020-02-14 深圳市鹰硕技术有限公司 Note recording and storing method, device, terminal, storage medium and system

Also Published As

Publication number Publication date
CN111506272A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN110446062B (en) Receiving processing method for big data file transmission, electronic device and storage medium
CN101410787A (en) Method and apparatus to generate XHTML data in device
JP2003150145A (en) Image display method and portable information equipment
CN105224302B (en) Skin processing method of input method and input method system
CN106155542B (en) Picture processing method and device
US6715127B1 (en) System and method for providing editing controls based on features of a raster image
CN112836086A (en) Video processing method and device and electronic equipment
AU2018202646B2 (en) Storing psd compatible photoshop documents in a container for efficient identification and transmission of modified document subsets
CN111506272B (en) Storage method, device and equipment of note file and computer readable storage medium
US9282331B2 (en) Image processing method and electronic device
CN113438526A (en) Screen content sharing method, screen content display device, screen content equipment and storage medium
JP2005182735A (en) Document data display device, cellular phone device, document data display method, document data display program, computer-readable recording medium with it recorded, document data printer, document data output device, document data output method, document data output program, and computer-readable recording medium with it recorded
CN111931708A (en) Form generation method and device
CN112689170A (en) Content playing method of display terminal, display terminal and readable storage medium
CN107515704B (en) Method and device for previewing compressed file
CN110457264B (en) Conference file processing method, device, equipment and computer readable storage medium
CN104427174B (en) The acquisition methods of mobile communication terminal and reading data from image processing apparatus
CN107679063B (en) Picture display method, server and computer-readable storage medium
CN112445394A (en) Screenshot method and device
KR20150000030A (en) Contents sharing service
US11074392B2 (en) Information processing apparatus and non-transitory computer readable medium for switching between an attribute information mode and an image information mode
CN112130738A (en) Screenshot processing method and device, electronic equipment and storage medium
CN112346684A (en) Data display method and device, television and computer readable storage medium
CN100356390C (en) Method of proceeding optical character recognition for displaying operation terminal
CN113691729B (en) Image processing method and device

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
GR01 Patent grant
GR01 Patent grant