CN110515554B - Content writing method, content writing device and electronic equipment - Google Patents

Content writing method, content writing device and electronic equipment Download PDF

Info

Publication number
CN110515554B
CN110515554B CN201910782835.XA CN201910782835A CN110515554B CN 110515554 B CN110515554 B CN 110515554B CN 201910782835 A CN201910782835 A CN 201910782835A CN 110515554 B CN110515554 B CN 110515554B
Authority
CN
China
Prior art keywords
content
writing
written
hard disk
storage device
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
CN201910782835.XA
Other languages
Chinese (zh)
Other versions
CN110515554A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910782835.XA priority Critical patent/CN110515554B/en
Publication of CN110515554A publication Critical patent/CN110515554A/en
Application granted granted Critical
Publication of CN110515554B publication Critical patent/CN110515554B/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/0604Improving or facilitating administration, e.g. storage management
    • 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/0674Disk device
    • G06F3/0676Magnetic disk device
    • 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/16Sound input; Sound output

Abstract

The present disclosure provides a content writing method performed by an electronic device, a content writing apparatus, and an electronic device. The content writing method of the present disclosure includes: detecting sound volume in the environment where the electronic equipment is located; under the condition that the sound volume is less than or equal to a preset volume threshold, writing content to be written into a storage device of the electronic equipment in a first mode; and under the condition that the sound volume is larger than the preset volume threshold, writing the content to be written into a storage device of the electronic equipment in a second mode.

Description

Content writing method, content writing device and electronic equipment
Technical Field
The present disclosure relates to a content writing method, a content writing apparatus, and an electronic device.
Background
Along with the development of scientific technology, electronic equipment is changing day by day, and electronic equipment also has a lot of problems that expose user's privacy when bringing the life convenience for the user, and along with people's concern about the safety privacy problem, many users that have the security consciousness can strengthen the protection to self privacy through forbidding the sensor on the electronic equipment. However, even in this case, the physical attack surface exposed by the non-sensing device is often ignored, for example, during the process of writing content on the mechanical hard disk, sound information in the surrounding environment can be recorded, and the hidden danger of revealing the privacy of the user exists.
Disclosure of Invention
One aspect of the present disclosure provides a content writing method performed by an electronic device, including: detecting sound volume in the environment where the electronic equipment is located; under the condition that the sound volume is less than or equal to a preset volume threshold, writing content to be written into a storage device of the electronic equipment in a first mode; and under the condition that the sound volume is larger than the preset volume threshold, writing the content to be written into a storage device of the electronic equipment in a second mode.
According to an embodiment of the present disclosure, the storage device includes a first storage device and a second storage device, wherein the first storage device is a mechanical hard disk; the writing the content to be written into the storage device of the electronic equipment by adopting the first mode comprises the following steps: writing the content to be written into the mechanical hard disk; the writing the content to be written into the storage device of the electronic equipment by adopting the second mode comprises the following steps: and writing the content to be written into the second storage device.
According to an embodiment of the present disclosure, the storage device is a mechanical hard disk; the content writing method further includes: dividing the content to be written into a plurality of content parts according to the logic sequence of the content; the writing the content to be written into the storage device of the electronic equipment by adopting the first mode comprises the following steps: sequentially writing the plurality of content parts into the mechanical hard disk according to a first arrangement order; the writing the content to be written into the storage device of the electronic equipment by adopting the second mode comprises the following steps: and sequentially writing the plurality of content parts into the mechanical hard disk according to a second arrangement sequence.
According to an embodiment of the present disclosure, in the first arrangement order, the plurality of content parts are arranged in a front-rear logical order of contents; in the second arrangement order, the at least two content parts are arranged out of order that is different from a front-to-back logical order of the content.
According to an embodiment of the present disclosure, the storage device is a mechanical hard disk; the content writing method further includes: dividing the content to be written into a plurality of content parts according to the front and back logic sequence of the content; the writing the content to be written into the storage device of the electronic equipment by adopting the first mode comprises the following steps: sequentially writing the plurality of content parts into the mechanical hard disk according to a first arrangement order; the writing the content to be written into the storage device of the electronic equipment by adopting the second mode comprises the following steps: inserting invalid content between at least two adjacent content portions; and sequentially writing the plurality of content parts and the invalid content into the mechanical hard disk according to the inserted sequence.
According to an embodiment of the present disclosure, the content writing method further includes: detecting the sound volume in the environment where the electronic equipment is located in the content writing process; and switching the writing mode of the content to be written under the condition that the sound volume is changed between the volume threshold value and the volume threshold value.
Another aspect of the present disclosure provides a content writing apparatus including: the detection module is used for detecting the sound volume in the environment where the electronic equipment is located; the first writing module is used for writing the content to be written into a storage device of the electronic equipment in a first mode under the condition that the sound volume is smaller than a preset volume threshold; and the second writing module is used for writing the content to be written into the storage device of the electronic equipment in a second mode under the condition that the sound volume is greater than a preset volume threshold.
According to an embodiment of the present disclosure, the storage device includes a first storage device and a second storage device, wherein the first storage device is a mechanical hard disk; the first writing module is used for writing the content to be written into the mechanical hard disk; the second writing module is used for writing the content to be written into the second storage device.
According to an embodiment of the present disclosure, the storage device is a mechanical hard disk; the content writing device further comprises a splitting module, wherein the splitting module is used for dividing the content to be written into a plurality of content parts according to the front and back logic sequence of the content; the first writing module is used for sequentially writing the plurality of content parts into the mechanical hard disk according to a first arrangement sequence; the second writing module is used for sequentially writing the plurality of content parts into the mechanical hard disk according to a second arrangement sequence; wherein the first arrangement order is different from the second arrangement order.
Another aspect of the present disclosure provides an electronic device including: one or more processors; memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
fig. 1 schematically shows an application scenario of a content writing method according to an embodiment of the present disclosure;
fig. 2 schematically shows a flow chart of a content writing method performed by an electronic device according to an embodiment of the present disclosure;
FIG. 3A schematically illustrates a partial structural view of a mechanical hard disk according to an embodiment of the present disclosure;
FIG. 3B schematically shows a schematic view of a disk face according to an embodiment of the present disclosure;
FIG. 4 schematically shows a block diagram of a content writing apparatus according to an embodiment of the disclosure; and
fig. 5 schematically shows a block diagram of an electronic device adapted for a content writing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
An embodiment of the present disclosure provides a content writing method performed by an electronic device, including: detecting sound volume in the environment where the electronic equipment is located; under the condition that the sound volume is less than or equal to a preset volume threshold, writing content to be written into a storage device of the electronic equipment in a first mode; and under the condition that the sound volume is larger than the preset volume threshold, writing the content to be written into a storage device of the electronic equipment in a second mode.
The content writing method provided by the embodiment of the disclosure can write the content to be written into the electronic device by adopting the first writing method when the peripheral sound is detected to be small, for example, when the user does not speak or speaks the sound to be small, and write the content to be written into the electronic device by adopting the second writing method when the peripheral sound is detected to be large, for example, when the user speaks loudly or speaks by using a loudspeaker in a conference process. For example, in the case that the electronic device has both a solid-state disk and a mechanical hard disk, the first mode is to write the content to be written into the mechanical hard disk of the electronic device, and the second mode is to write the content to be written into the solid-state disk of the electronic device, so that the mechanical hard disk can be prevented from recording the sound information of the user and the sound information of the surrounding environment of the user; for another example, the first mode is to write the contents to be written into the mechanical hard disk in a normal order, and the second mode is to write the contents to be written into the mechanical hard disk in a disorder order or insert invalid contents into the contents during the writing process, so that when the sound information recorded by the mechanical hard disk is restored, the restored sound information is in a disorder or incomplete state, and thus, important sound information of a user can be prevented from being leaked.
Fig. 1 schematically shows an application scenario of a content writing method according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the content writing method according to the embodiment of the disclosure may be applied to a notebook computer 100, and a mechanical hard disk is disposed in the notebook computer 100, and the mechanical hard disk may be connected to the notebook computer 100 through an interface such as IDE, SCSI, USB, or the like. In the process of writing operation performed by the mechanical hard disk, when a user speaks voice or sound waves of ambient environment sound are transmitted to the mechanical hard disk, small changes of the mechanical hard disk during operation are caused, and the mechanical hard disk generates a recording effect. The magnetic head of the mechanical hard disk can generate certain position deviation when being interfered by sound waves, and the mechanical hard disk can record the position of the magnetic head, so that the effect of recording sound is achieved, and the recorded sound can be restored according to the position deviation of the magnetic head.
In order to prevent the sound of the user from being leaked, the mechanical hard disk should be prevented from acquiring the sound information of the user as much as possible or acquiring continuous and complete sound information of the user during the process of writing data into the notebook computer 100. According to the content writing method provided by the embodiment of the disclosure, the writing mode of data can be adjusted according to the size of the ambient sound, and the size of the sound can refer to the amplitude of the sound wave. When the peripheral sound is detected to be small, the sound wave is not large enough to enable the mechanical hard disk to record the sound, the content can be written in a common mode, and when the peripheral sound is detected to be large, in order to prevent the sound from being recorded, the content can be written in a mode of interfering the mechanical hard disk to steal sound information, for example, the content is written in a solid state disk, or the content is written in the mechanical hard disk in a disordered mode or an invalid sector mode, so that the mechanical hard disk cannot record the sound or cannot record the sound completely and continuously.
It is understood that the application scenario in fig. 1 is only an example, and the content writing method may be applied to other electronic devices that may have a mechanical hard disk, such as a host of a desktop computer, a kiosk, and the like, besides a notebook computer.
Fig. 2 schematically shows a flow chart of a content writing method performed by an electronic device according to an embodiment of the present disclosure.
As shown in fig. 2, the content writing method of an embodiment of the present disclosure may include operations S210 to S230.
In operation S210, detecting a sound volume in an environment where the electronic device is located;
in operation S220, when the sound volume is less than or equal to the preset volume threshold, writing the content to be written into the storage device of the electronic device in a first manner;
in operation S230, in the case that the sound volume is greater than the preset volume threshold, the content to be written is written into the storage device of the electronic device in the second manner.
According to an embodiment of the disclosure, the content writing method may be executed by an electronic device, for example, may be executed by a notebook computer, and is used to implement a privacy protection function of the electronic device, where for a user with a higher security requirement or in a scene with a higher security requirement, the user may open the privacy protection function, for example, the user may open the privacy protection function when in a meeting.
The storage device at least comprises a mechanical hard disk, and can also comprise other storage devices such as a solid state disk and the like.
Fig. 3A schematically illustrates a partial structural schematic diagram of a mechanical hard disk 300 according to an embodiment of the present disclosure.
As shown in fig. 3A, the mechanical hard disk 300 includes a magnetic head 310 and a disk 320, the number of the disk 320 may be multiple, each disk 320 includes two faces, and each disk face is correspondingly provided with a magnetic head.
FIG. 3B schematically shows a schematic view of a disk face according to an embodiment of the present disclosure.
As shown in fig. 3B, a plurality of tracks are disposed on the disk surface, the plurality of tracks are in a concentric circle structure, a plurality of straight lines extending along the radial direction divide each track into a plurality of arc segments, and one arc segment on each track is referred to as a sector, such as the sector 321, the sector 322, and the sector 323 in fig. 3B.
The magnetic head is placed on one side of the disk and keeps a certain distance with the disk, the disk rotates around the rotating shaft in the process of writing operation of the mechanical hard disk, the magnetic head moves relative to the disk, and the magnetic head magnetizes the magnetic tracks on the disk in the relative movement process. The magnetic head has different standard positions corresponding to different writing contents, for example, the standard position of the magnetic head is, for example, 0.05mm when writing "0", and the standard position of the magnetic head is, for example, 0.2mm when writing "1", and during reading, the position of the magnetic head can be read to distinguish whether "0" or "1" is recorded at the corresponding position of the disk. It should be noted that the specific numerical values given in the embodiments of the present disclosure are merely examples to enable those skilled in the art to understand the technical solutions of the present disclosure, and are not intended to limit the technical solutions of the present disclosure.
The mechanical hard disk has high requirement on the control precision of the position of the self read-write magnetic head, and the magnetic head can tolerate the error of the deviation from the center only on the nanometer level under the normal condition, so even the tiny air pressure oscillation caused by the sound wave can be sensed by the magnetic head. During the process of writing data in the mechanical hard disk, if a user speaks, sound waves can be transmitted to the mechanical hard disk, a magnetic head on the mechanical hard disk is vibrated to generate a certain position deviation, for example, when writing '1', the position of the magnetic head can deviate to 0.19mm, a disk can record the position error, and the larger the amplitude of the vibration is, the larger the position error of the magnetic head is. When data is read from the mechanical hard disk, the actual position of the magnetic head can be read, and the current sound information can be restored according to the deviation of the actual position and the standard position.
According to the embodiment of the disclosure, before data is written, the sound volume in the environment where the electronic device is located may be detected, and whether the sound volume is smaller than a preset volume threshold may be determined, where the preset volume threshold may be, for example, 70 db. The sound below the volume threshold is not enough to record the sound by the mechanical hard disk, so that the mechanical hard disk can normally write data, for example, the data is written in a system default mode without interference; sounds above the volume threshold can be sensed by the mechanical hard disk, and in order to prevent the sound information from being leaked, a certain protection measure needs to be taken, for example, writing operation is performed by adopting other storage devices, or writing operation is performed by making the mechanical hard disk out of order or inserting invalid sectors.
According to an embodiment of the present disclosure, the storage device includes a first storage device and a second storage device, where the first storage device is a mechanical hard disk, and the second storage device is another storage device different from the mechanical hard disk, and may be a solid state hard disk, for example.
Writing the content to be written into a storage device of the electronic device by adopting a first mode comprises the following steps: writing the content to be written into the mechanical hard disk; writing the content to be written into the storage device of the electronic device in a second mode comprises: and writing the content to be written into the second storage device.
Specifically, when the ambient sound is small, the data can be written by using a mechanical hard disk, and certainly, the data can also be written by using a solid state disk according to actual situations. When the ambient sound is large, the solid state disk SSD is used for data writing, specifically, the data can be written into a cache based on the SSD, and the sound can be prevented from being recorded by the mechanical hard disk.
If no other storage device is provided in the electronic device, or the mechanical hard disk is necessary to be used for writing in some specific cases, for example, when the cache is not allowed during power on or power off, or when the security requirement is high, such as processing an online banking service. In such a case where data writing must be performed using a mechanical hard disk, the mechanical hard disk may be caused to perform writing operation in the following manner.
According to an embodiment of the present disclosure, the content writing method of an embodiment of the present disclosure further includes: dividing the content to be written into a plurality of content parts according to the logic sequence of the content;
writing the content to be written into a storage device of the electronic device by adopting a first mode comprises the following steps: sequentially writing the plurality of content parts into the mechanical hard disk according to a first arrangement order, wherein the plurality of content parts are arranged according to the logic order of the content in the first arrangement order;
writing the content to be written into the storage device of the electronic device in a second mode comprises: the plurality of content portions are sequentially written into the mechanical hard disk in a second arrangement order, and at least two content portions are arranged in a disorder different from the logical order of the content in the second arrangement order.
Specifically, the content to be written is, for example, a piece of video, and the system allocates three sectors to the content to be written, for example, sectors 321, 322, and 323 that are distributed in series.
The logical order division of the content may refer to division in the front-back order of the content, for example, if the content to be written is an article, the article may be divided into three parts, i.e., front, middle and back, in the front-back order of the content.
The content to be written includes, for example, content a, content B, and content C, and is written in the sector 321, the sector 322, and the sector 323, respectively. The logical order of the content to be written is: content a, content B, content C.
In a first mode, writing is performed in consecutive sectors, the first arrangement order being: content a, content B, and content C are written in this order into sector 321, content B into sector 322, and content C into sector 323.
In a second mode, writing is performed in a non-sequential sector mode, the second arrangement order is any order different from the first arrangement order, and the second arrangement order may be, for example: content a, content C, and content B are written in this order into sector 321, content C into sector 323, and content B into sector 322. In this way, when the sound on the mechanical hard disk is restored, the sound is restored according to the logical sequence of the content, namely the sound on the sector 321, the sector 322 and the sector 323 is restored in sequence, and the sound recorded on the sector 323 is earlier than the sound recorded on the sector 322, so that the sound obtained by restoration is disordered and is discontinuous, and the information leakage is effectively avoided.
In addition to the out-of-order writing method, an invalid sector can be added during the writing process.
According to an embodiment of the present disclosure, writing content to be written into a storage device of an electronic device in a first manner includes: the plurality of content portions are written sequentially in a logical order into the mechanical hard disk.
For example, the logical order of the content to be written is: in the first mode, the content a, the content B, and the content C may be written in the sector 321, the content B in the sector 322, and the content C in the sector 323 in this order.
Writing the content to be written into the storage device of the electronic device in a second mode comprises: inserting invalid content between at least two adjacent content portions; and writing the plurality of content parts and the invalid content into the mechanical hard disk in sequence according to the inserted sequence.
For example, an invalid content E is inserted among the content a, the content B, and the content C, and for example, the order after inserting the invalid content is: when the sectors 324 and 325 are increased, the content a, the content E, the content B, the content E, and the content C may be written in the sector 321, the content E, the sector 322, the content B, the sector 324, and the sector 325 in this order in which the invalid content is inserted. The contents of the invalid sectors 322 and 324 can be deleted later, so that the sound obtained by the restoration is incomplete and discontinuous during the restoration, and the leakage of information can be effectively avoided.
In the case that the data size of the content to be written is not enough to fill up one sector, the content to be written may also be divided, and each part of the content may be allocated to a different sector for writing according to the second method described above.
According to an embodiment of the present disclosure, the content writing method of an embodiment of the present disclosure further includes: detecting the sound volume of the environment where the electronic equipment is located in the content writing process; and switching the writing mode of the content to be written under the condition that the sound volume changes between being larger than the volume threshold and being smaller than or equal to the volume threshold.
In the process of writing the content, the sound of the surrounding environment can be monitored in real time, and if the relation between the volume of the environment sound and the preset volume threshold value changes, the corresponding writing mode can be switched. For example, if it is detected that the volume is smaller than the preset volume threshold before the content is written, the content is written by using a mechanical keyboard, but it is monitored that the volume of the environmental sound exceeds the volume threshold in the content writing process, the writing operation may be switched from the mechanical hard disk to the solid state disk for execution, or the mechanical hard disk may be switched to a disorder mode or an invalid sector mode for execution, and after it is monitored that the volume is smaller than the preset volume threshold, the first mode may be switched back again.
Another aspect of the disclosed embodiments provides a content writing apparatus. The content writing apparatus may perform the method described above with reference to fig. 2 to 3B.
Fig. 4 schematically shows a block diagram of a content writing apparatus 400 according to an embodiment of the present disclosure.
As shown in fig. 4, the content writing apparatus 400 of the embodiment of the present disclosure includes:
the detection module 410 is used for detecting the sound volume in the environment where the electronic device is located;
the first writing module 420 is configured to write, in a first manner, content to be written into a storage device of the electronic device when the sound volume is smaller than a preset volume threshold;
the second writing module 430 is configured to write the content to be written into the storage device of the electronic device in a second manner when the sound volume is greater than the preset volume threshold.
Specifically, the detecting module 410 may perform the operation S210 described above, the first writing module 420 may perform the operation S220 described above, and the second writing module 430 may perform the operation S230 described above, for example, which is not described herein again.
According to an embodiment of the present disclosure, a storage device includes a first storage device and a second storage device, wherein the first storage device is a mechanical hard disk.
The first writing module is used for writing the content to be written into the mechanical hard disk;
the second writing module is used for writing the content to be written into the second storage device.
According to an embodiment of the present disclosure, the storage device is a mechanical hard disk. The content writing device of the embodiment of the disclosure further includes a splitting module, and the splitting module is configured to divide the content to be written into a plurality of content parts according to a front-back logic sequence of the content.
The first writing module is used for sequentially writing a plurality of content parts into the mechanical hard disk according to a first arrangement sequence;
the second writing module is used for sequentially writing the plurality of content parts into the mechanical hard disk according to a second arrangement sequence; wherein the first arrangement order is different from the second arrangement order.
According to an embodiment of the present disclosure, in the first arrangement order, the plurality of content parts are arranged in a logical order of contents; in the second arrangement order, the at least two content parts are arranged out of order that is different from the logical order of the content.
According to the embodiment of the disclosure, the storage device is a mechanical hard disk, and the content writing device of the embodiment of the disclosure further comprises a splitting module, wherein the splitting module is used for dividing the content to be written into a plurality of content parts according to the front and back logic sequence of the content.
The first writing module is used for sequentially writing the plurality of content parts into the mechanical hard disk according to the logic sequence;
the second writing module is used for inserting invalid content between at least two adjacent content parts; and sequentially writing the plurality of content parts and the invalid content into the mechanical hard disk according to the inserted sequence.
According to an embodiment of the present disclosure, the content writing apparatus further includes:
the switching module is used for detecting the sound volume of the environment where the electronic equipment is located in the content writing process; and switching the writing mode of the content to be written under the condition that the sound volume changes between being larger than the volume threshold and being smaller than or equal to the volume threshold.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the detection module 410, the first writing module 420, the second writing module 430, the splitting module, and the switching module may be combined in one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the detecting module 410, the first writing module 420, the second writing module 430, the splitting module, and the switching module may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or implemented by a suitable combination of any several of them. Alternatively, at least one of the detection module 410, the first writing module 420, the second writing module 430, the splitting module and the switching module may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
Another aspect of the disclosed embodiments provides an electronic device. The method comprises the following steps: one or more processors; memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as above.
Fig. 5 schematically shows a block diagram of an electronic device 500 adapted to implement the above described method according to an embodiment of the present disclosure. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 includes a processor 510 and a computer-readable storage medium 520. The electronic device 500 may perform a method according to an embodiment of the present disclosure.
In particular, processor 510 may include, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. The processor 510 may also include on-board memory for caching purposes. Processor 510 may be a single processing unit or a plurality of processing units for performing different actions of a method flow according to embodiments of the disclosure.
Computer-readable storage media 520, for example, may be non-volatile computer-readable storage media, specific examples including, but not limited to: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and so on.
The computer-readable storage medium 520 may include a computer program 521, which computer program 521 may include code/computer-executable instructions that, when executed by the processor 510, cause the processor 510 to perform a method according to an embodiment of the disclosure, or any variation thereof.
The computer program 521 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code in computer program 521 may include one or more program modules, including for example 521A, modules 521B, … …. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, and when these program modules are executed by the processor 510, the processor 510 may execute the method according to the embodiment of the present disclosure or any variation thereof.
According to an embodiment of the present invention, at least one of the detection module 410, the first writing module 420, the second writing module 430, the splitting module, and the switching module may be implemented as a computer program module described with reference to fig. 5, which, when executed by the processor 510, may implement the respective operations described above.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.

Claims (4)

1. A content writing method performed by an electronic device, comprising:
detecting sound volume in the environment where the electronic equipment is located;
under the condition that the sound volume is less than or equal to a preset volume threshold value, writing content to be written into a storage device of the electronic equipment in a first mode, wherein the storage device comprises a mechanical hard disk; and
under the condition that the sound volume is larger than the preset volume threshold, writing the content to be written into a storage device of the electronic equipment in a second mode;
dividing the content to be written into a plurality of content parts according to the logic sequence of the content;
the writing the content to be written into the storage device of the electronic equipment by adopting the first mode comprises the following steps: sequentially writing the plurality of content parts into the mechanical hard disk according to a first arrangement order, wherein the plurality of content parts are arranged according to a logical order of contents in the first arrangement order;
the writing the content to be written into the storage device of the electronic equipment by adopting the second mode comprises the following steps: and sequentially writing the plurality of content parts into the mechanical hard disk according to a second arrangement order, wherein at least two content parts are arranged in a random order different from the logical order of the content in the second arrangement order, or invalid content is inserted between at least two content parts in the second arrangement order, and the plurality of content parts and the invalid content are arranged in the inserted order.
2. The method of claim 1, further comprising:
detecting the sound volume in the environment where the electronic equipment is located in the content writing process;
and switching the writing mode of the content to be written under the condition that the sound volume is changed between the volume threshold value and the volume threshold value.
3. A content writing apparatus comprising:
the detection module is used for detecting the sound volume of the environment where the electronic equipment is located;
the first writing module is used for writing contents to be written into a storage device of the electronic equipment in a first mode under the condition that the sound volume is smaller than a preset volume threshold, wherein the storage device comprises a mechanical hard disk;
the second writing module is used for writing the content to be written into the storage device of the electronic equipment in a second mode under the condition that the sound volume is larger than a preset volume threshold; the content writing device further comprises a splitting module, wherein the splitting module is used for dividing the content to be written into a plurality of content parts according to the front and back logic sequence of the content;
the first writing module is used for sequentially writing the content parts into the mechanical hard disk according to a first arrangement sequence, wherein the content parts are arranged according to a logic sequence of contents in the first arrangement sequence;
the second writing module is configured to sequentially write the plurality of content parts into the mechanical hard disk according to a second arrangement order, where at least two content parts are arranged in a disorder different from a logical order of the content in the second arrangement order, or an invalid content is inserted between at least two content parts in the second arrangement order, and the plurality of content parts and the invalid content are arranged in the inserted order.
4. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-2.
CN201910782835.XA 2019-08-22 2019-08-22 Content writing method, content writing device and electronic equipment Active CN110515554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910782835.XA CN110515554B (en) 2019-08-22 2019-08-22 Content writing method, content writing device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910782835.XA CN110515554B (en) 2019-08-22 2019-08-22 Content writing method, content writing device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110515554A CN110515554A (en) 2019-11-29
CN110515554B true CN110515554B (en) 2021-08-17

Family

ID=68627340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910782835.XA Active CN110515554B (en) 2019-08-22 2019-08-22 Content writing method, content writing device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110515554B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975401A (en) * 2016-04-29 2016-09-28 郑州天迈科技股份有限公司 Sequential writing and quick recovery system and method of vehicle-mounted disk

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030142552A1 (en) * 2002-01-28 2003-07-31 Columbia Data Products, Inc. Emulating volume having selected storage capacity
CN104992720B (en) * 2015-07-06 2017-11-03 浙江宇视科技有限公司 A kind of vehicle-mounted mechanical hard vibration method and system and vehicle-mounted video recording equipment
CN106775463B (en) * 2016-11-30 2019-08-13 Oppo广东移动通信有限公司 Date storage method, device and mobile terminal
CN108279989B (en) * 2017-12-13 2021-09-03 北京中电万联科技股份有限公司 Vehicle-mounted key data safe storage method and system thereof
CN108563403A (en) * 2018-04-03 2018-09-21 北京公共交通控股(集团)有限公司 A kind of bus date storage method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975401A (en) * 2016-04-29 2016-09-28 郑州天迈科技股份有限公司 Sequential writing and quick recovery system and method of vehicle-mounted disk

Also Published As

Publication number Publication date
CN110515554A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
US20090204758A1 (en) Systems and methods for asymmetric raid devices
US9304930B2 (en) HDD write buffer zone for vibration condition
US10490227B2 (en) Shingled magnetic recording storage system
US9236073B1 (en) Write fault threshold for a set of tracks
US9098421B2 (en) Shingled media write operation
US9864533B2 (en) SMR auto-tiering
JP5521926B2 (en) Storage system, control device, and storage device
CN110515554B (en) Content writing method, content writing device and electronic equipment
CN104657088B (en) A kind of acquisition methods and device of hard disk bad block message
US10031793B2 (en) Tape volume overwrite protection during error recovery
US20060149969A1 (en) Authentication method of hard disk drive and recording medium storing the same
CN110210201B (en) User identification method, user identification device and electronic equipment
US9620157B2 (en) Encoding information on tape using write offset gaps
US20120300330A1 (en) Tape storage processing
US10832728B2 (en) Location selection based on adjacent location errors
US10379972B1 (en) Minimizing reads for reallocated sectors
US8830619B1 (en) Overwrite threshold number of tracks
US9164694B1 (en) Data storage device detecting read-before-write conditions and returning configurable return data
JP2006004376A (en) Information reproducing device
JP6441630B2 (en) Optical disc drive management apparatus, optical disc drive management method, and program
US20160063263A1 (en) Data storage system with information security protection
JP4336981B2 (en) Backup system and method
JP2008293161A (en) Recording and reproducing device
RU2634216C1 (en) Method of restoring information state of data storage devices
US20100265611A1 (en) Controller, disk drive having the controller, and data processing system having the disk drive

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