CN111506272A - 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
CN111506272A
CN111506272A CN202010625096.6A CN202010625096A CN111506272A CN 111506272 A CN111506272 A CN 111506272A CN 202010625096 A CN202010625096 A CN 202010625096A CN 111506272 A CN111506272 A CN 111506272A
Authority
CN
China
Prior art keywords
file
note
compressed
processed
thumbnail
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.)
Granted
Application number
CN202010625096.6A
Other languages
Chinese (zh)
Other versions
CN111506272B (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 note file storage method, device, equipment and storage medium, wherein the method comprises the steps of obtaining a note file to be processed after detecting the note file to be processed sent by terminal equipment, zooming a preset page in the note file to be processed to obtain a thumbnail file, obtaining an edit file, 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, packaging the first compressed file, the second compressed file and the third compressed file to obtain the note file to be stored, and updating the note file in a flash memory F L ASH based on the note file to be stored.

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
The existing method for storing the note files mainly comprises a note file independent storage method, wherein the note file independent storage method is used for storing all files related to the note files into a file system FATFS respectively.
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 a flash memory F L ASH 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 F L ASH 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 F L ASH 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 F L ASH 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 original file, determining a second compressed file corresponding to the note file to be stored as the compressed file in the note file of the F L ASH through the 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 from a note file of F L ASH 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 F L ASH.
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 file in the flash memory F L ASH based on the note file 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.
According to the method, the note file to be processed is obtained, the preset page in the note file to be processed is scaled to obtain the thumbnail file, the edit file, the note file to be processed and the thumbnail file are compressed to obtain the first compressed file, the second compressed file and the third compressed file correspondingly, finally the first compressed file, the second compressed file and the third compressed file are packaged to obtain the note file to be stored, and the note file to be stored is stored in F L ASH.
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 an edited file stored in the memory, and then compresses the obtained edited 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 edited file, a second compression file corresponding to the note file to be processed and a third compression file corresponding to the thumbnail file, wherein the preset compression format comprises but is not limited to L ZO (data compression algorithm) compression format, ZIP (file format for data compression and document storage) compression format and RAR (file format for data compression and filing 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 editing files stored in the memory, wherein the editing files comprise stroke files and coordinate files, the editing files, note files to be processed and thumbnail files are respectively compressed through a L ZO compression format, and accordingly a first compression file, which is an editing file, L ZO, a second compression file, which is a file to be processed, L ZO and a third compression file, which is a thumbnail file, L ZO are obtained.
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 F L ASH 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 is replaced with the original note file stored in the F L ASH.
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 a storage method of note files according to the present invention, a file system compresses a thumbnail file, a file to be processed (a large image file), a stroke file, and a coordinate file in L ZO format, then packs and splices the compressed thumbnail file, L ZO, the file to be processed, L ZO, the stroke file, L ZO, and the coordinate file, L ZO, with a Header file (Header), to obtain a note file to be stored (a composite note file), and finally stores the note file to be stored in F L ASH, wherein the Header file records relative position information of each compressed file in the whole note file to be stored.
According to the method, the note file to be processed is obtained, the preset page in the note file to be processed is scaled to obtain the thumbnail file, the edit file, the note file to be processed and the thumbnail file are compressed to obtain the first compressed file, the second compressed file and the third compressed file correspondingly, finally the first compressed file, the second compressed file and the third compressed file are packaged to obtain the note file to be stored, and the note file to be stored is stored in the F L ASH.
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:
step h, 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 F L ASH 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, obtains location information corresponding to the file type in a header file, then obtains a compressed file corresponding to the file type in F L ASH according to the obtained location information, decompresses the obtained compressed file in a corresponding decompression manner to obtain a decompressed file corresponding to the file type, sends the decompressed file to the terminal device, and a user views or edits the decompressed file through the terminal device.
When a file is decompressed, the decompression method and the compression method of the decompressed file are consistent, for example, the compression format is L ZO, the decompression format corresponding to the decompression is L ZO. compression format 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 original file, determining a second compressed file corresponding to the note file to be stored as the compressed file in the note files of the F L ASH through the packet header file.
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, and if the file type is detected to be an original view file, the file system obtains location information of a file to be processed in a header file, and then obtains a second compressed file corresponding to a note file to be stored in an F L ASH as a compressed file, that is, a compressed file of the file to be processed according to the location information.
According to the method, 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 F L ASH according to the position information, the compressed file is finally decompressed and returned to the terminal device, so that the corresponding compressed file can be obtained by operating the F L ASH once, the erasing frequency of the F L ASH is reduced, the abrasion of the F L ASH is reduced, and the utilization rate of the F L ASH 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 device is detected, acquiring a first compressed file corresponding to the editing file from a note file of F L ASH 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 F L ASH.
Specifically, after the file system acquires the second compressed file corresponding to the to-be-processed file, if an editing instruction sent by the terminal device is detected, 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 F L ASH through the position information, the first compressed file is decompressed to acquire a corresponding stroke file and a coordinate file, the stroke file and the coordinate file are returned to the terminal device, after the user receives the stroke file and the coordinate file, the to-be-processed note file is edited in the terminal device through the stroke file and the coordinate file to acquire an updated to-be-processed note file, the updated to-be-processed note file is fed back to the file system through the terminal device, and after the updated to-be-processed note file is received by the file system, the updated to-be-processed note file is compressed according to the steps of the first embodiment, and then the original note file in F L ASH is replaced.
If an editing instruction sent by the terminal device is detected, a first compressed file corresponding to an editing file is obtained in a note file of the F L ASH through a 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 F L ASH.
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 configured to update the note file in the flash memory F L ASH 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 F L ASH 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 configured to determine, if the file type is the view original file, a second compressed file corresponding to the to-be-stored note file as the compressed file in the note file of the F L ASH through the packet header file.
Further, the obtaining module 10 is further configured to, if an editing instruction sent by the terminal device is detected, obtain, through the header file, a first compressed file corresponding to the editing file from the note file of F L ASH;
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 update module 50 is also used to update the note file in the flash memory F L ASH.
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 a flash memory F L ASH 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 F L ASH 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 F L ASH 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 F L ASH 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 original file, determining a second compressed file corresponding to the note file to be stored as the compressed file in the note file of the F L ASH through the 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 from a note file of F L ASH 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 F L ASH.
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 file in the flash memory F L ASH based on the note file 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 true CN111506272A (en) 2020-08-07
CN111506272B 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)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744090A (en) * 2005-09-13 2006-03-08 北京中星微电子有限公司 File distribution list file system read-write method and device
US10515286B2 (en) * 2016-05-27 2019-12-24 Canon Kabushiki Kaisha Image processing apparatus that performs compression processing of document file and compression method of document file and storage medium
CN110794984A (en) * 2019-09-18 2020-02-14 深圳市鹰硕技术有限公司 Note recording and storing method, device, terminal, storage medium and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744090A (en) * 2005-09-13 2006-03-08 北京中星微电子有限公司 File distribution list file system read-write method and device
US10515286B2 (en) * 2016-05-27 2019-12-24 Canon Kabushiki Kaisha Image processing apparatus that performs compression processing of document file and compression method of document file and storage medium
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
CN111506272B (en) 2020-10-27

Similar Documents

Publication Publication Date Title
US10810453B2 (en) Apparatus and method for reproducing handwritten message by using handwriting data
US6839068B2 (en) Picture displaying method and information device
CN110446062B (en) Receiving processing method for big data file transmission, electronic device and storage medium
US8184166B2 (en) Method, device, mobile terminal and computer program product for a camera motion detection based scheme for improving camera input user interface functionalities
US9165340B2 (en) Image display system, image display method, image display program, and computer-readable recording medium storing said program
CN104182419A (en) Method and device for processing character information in picture
US9282331B2 (en) Image processing method and electronic device
CN111506272B (en) Storage method, device and equipment of note file and computer readable 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
CN107770206B (en) Document editing method, device and system
CN112689170A (en) Content playing method of display terminal, display terminal and readable storage medium
CN112198998A (en) Text input control method, related device, equipment and medium
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN107515704B (en) Method and device for previewing compressed file
CN110457264B (en) Conference file processing method, device, equipment and computer readable storage medium
CN107679063B (en) Picture display method, server and computer-readable storage medium
KR101779825B1 (en) Apparatus and method for managering content data in portable terminal
KR20150000030A (en) Contents sharing service
CN113438526A (en) Screen content sharing method, screen content display device, screen content equipment and storage medium
CN109643221B (en) Encoding print data and transmitting print data by host device
CN113691729B (en) Image processing method and device
CN113569821B (en) Gesture recognition method, device, equipment and computer readable storage medium
CN111984173B (en) Expression package generation method and device
JP2017167575A (en) Electronic record information display device, electronic record information display program, and electronic record information display method
EP2372989A1 (en) Apparatus and method for writing message in mobile terminal

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