CN106776684B - Audio file management method and device and terminal - Google Patents

Audio file management method and device and terminal Download PDF

Info

Publication number
CN106776684B
CN106776684B CN201610973122.8A CN201610973122A CN106776684B CN 106776684 B CN106776684 B CN 106776684B CN 201610973122 A CN201610973122 A CN 201610973122A CN 106776684 B CN106776684 B CN 106776684B
Authority
CN
China
Prior art keywords
file
audio
audio file
information
attribute information
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
CN201610973122.8A
Other languages
Chinese (zh)
Other versions
CN106776684A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610973122.8A priority Critical patent/CN106776684B/en
Publication of CN106776684A publication Critical patent/CN106776684A/en
Application granted granted Critical
Publication of CN106776684B publication Critical patent/CN106776684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/61Indexing; Data structures therefor; Storage structures

Landscapes

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

Abstract

The invention discloses an audio file management method, an audio file management device and an audio file management terminal. Thus, when the audio file is changed, the original audio file does not exist, the file record of the audio file in the media database is not deleted, and after the changed audio file is recovered, the file record of the audio file in the media database can be correspondingly retrieved; meanwhile, the record of the file in the inactivated state is not displayed on the user interaction display interface of the recording application, so that the playing and editing of the nonexistent file can be avoided, and the satisfaction degree of user experience can be further improved.

Description

Audio file management method and device and terminal
Technical Field
The present invention relates to the field of file management, and in particular, to an audio file management method, an audio file management apparatus, and a terminal.
Background
In the era of mobile internet, along with the popularization of intelligent terminals, the recording function of the terminals becomes more and more intelligent, and the use frequency of recording applications becomes higher and higher.
When the existing recording application is operated, file records in a system media database are called, so that audio files under corresponding folders are found. However, if the audio files in the folder are changed, and the recording application operates again, the file records corresponding to the changed audio files in the media database of the system are deleted. For example, when the corresponding audio files such as "audio 1", "audio 2", and "audio 3" in the recording playlist of the recording application are stored in the SD (Secure Digital) card, the SD card is removed, and then the "audio 1", "audio 2", and "audio 3" in the recording playlist of the recorder are operated (for example, operations such as playing or editing), it is found that the audio files do not exist, and at this time, the file records of the audio files in the media database of the recording application are deleted. Therefore, when the existing recording application is operated, the file records in the media database cannot be actively and correspondingly updated according to the change of the audio file, so that when the file does not exist, a user operates the file which does not exist in the user interaction interface of the recording application, the file is found to be absent, and the user is misled to carry out unnecessary operation; meanwhile, when the existing recording application operates on a non-existing file and finds that the file does not exist, the file record in the database is updated by directly deleting the file record, so that when the non-existing file returns to the original audio folder again, the file record cannot be normally recovered due to the deleted file record, and the satisfaction degree of user experience is reduced.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: when the current recording is applied to operation, file records in a media database can not be actively and correspondingly updated according to the change of an audio file, the operation of a user can be misled, meanwhile, when a nonexistent file is operated and the file is found to be nonexistent, the file records in the database are updated by directly deleting the file records, and when the nonexistent file returns to an original audio folder again, the file records cannot be normally recovered due to being deleted, so that the satisfaction degree of user experience is reduced. Aiming at the technical problem, a method, a device and a terminal for managing the audio file are provided.
In order to solve the above technical problem, the present invention provides an audio file management method, including:
checking the audio files in the audio folder of the recording application;
when the condition that a certain audio file does not exist under the audio file folder is checked, setting the file record of the audio file in the media database of the recording application to be in an inactivated state; and recording the file in the inactivated state for not displaying on a user interaction display interface of the recording application.
Further, checking the audio files under the audio folder comprises: scanning inspection and/or spot inspection:
the scanning inspection comprises:
when a preset scanning condition is triggered, acquiring audio file attribute information of each current audio file in the audio folder, and acquiring file attribute record information in each current file record in the media database;
matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result;
the spot check includes:
when receiving an audio file update notification of an audio file folder sent by a third-party application, acquiring audio file attribute information of the audio file, and acquiring file attribute recording information of the audio file in the media database;
and matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result.
Further, when the checking of the audio files in the audio folder includes scanning and checking, the preset scanning condition includes at least one of:
starting the recording application or entering a user interaction display interface of the recording application;
external memory card removal or insertion;
and receiving an audio folder content updating notice sent by the third-party application.
Further, the audio file attribute information and the file attribute recording information both comprise a file storage path and a file duration; matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result comprises the following steps:
when the file storage path and the file duration in certain file attribute recording information are not matched with the storage path and the file duration in each audio file attribute information, determining that the audio file corresponding to the file attribute recording information does not exist;
when the file storage path and the file duration in certain audio file attribute information are not matched with the storage path and the file duration in each file attribute recording information, determining the audio file corresponding to the audio file attribute information as a newly added file;
when the file storage path and the file duration in certain audio file attribute information are matched with the file storage path and the file duration in certain file attribute recording information, but the file record corresponding to the file attribute recording information is in an inactivated state, determining that the audio file corresponding to the audio file attribute information is a recovery file;
when the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the certain audio file attribute information and the file attribute recording information are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file storage path corresponding to the audio file attribute information is modified;
when the file duration in certain audio file attribute information is matched with the file durations in at least two pieces of file attribute recording information, but the file storage path in the audio file attribute information is not matched with the storage paths in the at least two pieces of file attribute recording information, determining that the audio file corresponding to the audio file attribute information is a newly added file;
and when the file storage path in certain audio file attribute information is matched with the file storage path in certain file attribute recording information, the file time lengths contained in the file storage path and the file storage path are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file time length corresponding to the audio file attribute information is modified.
Further, when the determined result is that the audio file is a recovery file, modifying the file record corresponding to the audio file from an inactivated state to an activated state;
when the determined result is that the audio file is a newly added file, extracting the file record of the newly added file and adding the file record into the media database;
when the determined result is that the storage path of the audio file is modified, updating the storage path in the file record corresponding to the audio file to the storage path in the audio file attribute information of the audio file.
And when the determined result is that the duration of the audio file is modified, updating the file duration in the file record corresponding to the audio file to the file duration in the audio file attribute information of the audio file.
Further, the method further comprises:
acquiring file records in the media database, wherein the file records are in an inactivated state and meet failure conditions as failure file records, and the failure conditions are that the nonuse time exceeds a preset time value and/or the use frequency is less than a preset use frequency;
and deleting the acquired failure file record.
Further, at least part of file records in the media database comprise key recovery attribute information, wherein the key recovery attribute information comprises at least one of file remark information, file label information and time dotting information;
the method further comprises the following steps: before taking a file record which is in an inactivated state and meets the failure condition as a failure file record, judging whether the file record contains key recovery attribute information, and if not, taking the file record as the failure file record.
Further, the present invention provides an audio file management apparatus, comprising:
the file checking module is used for checking the audio files in the audio folder of the recording application;
the processing module is used for setting the file record of the audio file in the media database of the recording application to be in an inactivated state when the audio file does not exist under the audio folder; and recording the file in the inactivated state for not displaying on a user interaction display interface of the recording application.
Further, the file checking module is configured to, when a preset scanning condition is triggered, obtain audio file attribute information of each current audio file in the audio folder, and obtain file attribute record information in each current file record in the media database; matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result;
and/or the file checking module is used for acquiring the audio file attribute information of the audio file and acquiring the file attribute recording information of the audio file in the media database when receiving an audio file updating notification of an audio folder sent by a third party application; and matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result.
Further, the audio file attribute information and the file attribute recording information both comprise a file storage path and a file duration; the file check module is used for:
when judging that the file storage path and the file duration in certain file attribute recording information are not matched with the storage path and the file duration in each audio file attribute information, determining that the audio file corresponding to the file attribute recording information does not exist;
when judging that the file storage path and the file duration in certain audio file attribute information are not matched with the storage path and the file duration in each file attribute recording information, determining the audio file corresponding to the audio file attribute information as a newly added file;
judging that a file storage path and file duration in certain audio file attribute information are matched with a storage path and file duration in certain file attribute recording information, and determining that an audio file corresponding to the audio file attribute information is a recovery file when a file record corresponding to the file attribute recording information is in an inactivated state;
when judging that the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the two are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file storage path corresponding to the audio file attribute information is modified;
when judging that the file time length in certain audio file attribute information is matched with the file time lengths in at least two pieces of file attribute recording information, but the file storage path in the audio file attribute information is not matched with the storage paths in the at least two pieces of file attribute recording information, determining that the audio file corresponding to the audio file attribute information is a newly added file;
and when judging that the file storage path in certain audio file attribute information is matched with the file storage path in certain file attribute recording information, the file time lengths contained in the two are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file time length corresponding to the audio file attribute information is modified.
Further, the processing module is further configured to modify a file record corresponding to the audio file from an inactive state to an active state when the result determined by the file checking module is that the audio file is a recovery file.
Furthermore, the invention also provides a terminal comprising the audio file management device.
Advantageous effects
According to the audio file management method, the device and the terminal, the audio files under the audio folder of the recording application are checked, when the fact that a certain audio file does not exist under the audio folder is checked, the file record of the audio file in the media database of the recording application is set to be in an inactivated state, the file record set to be in the inactivated state is recorded, and the file record is not displayed on a user interaction display interface of the recording application. Thus, when the audio file is changed, the original audio file does not exist, the file record of the audio file in the media database is not deleted, and after the changed audio file is recovered, the file record of the audio file in the media database can be correspondingly retrieved; meanwhile, the record of the file in the inactivated state is not displayed on the user interaction display interface of the recording application, so that the playing and editing of the nonexistent file can be avoided, and the satisfaction degree of user experience is improved.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
FIG. 2 is a flowchart illustrating an audio file management method according to an embodiment of the present invention;
FIG. 3 is a schematic view of a scanning inspection process according to an embodiment of the present invention;
FIG. 4 is a schematic view of a fixed-point inspection process according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an audio file screening process according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a process of clearing a record of a failed file according to an embodiment of the present invention;
FIG. 7 is a diagram of a display interface of a recording application according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal including an audio file management apparatus according to a third embodiment of the present invention;
FIG. 9 is a schematic structural diagram of an audio file management apparatus according to a third embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a more specific audio file management apparatus according to a third embodiment of the present invention;
fig. 11 is a flowchart illustrating an audio file management method according to a fourth embodiment of the present invention.
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.
A terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal, however, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for mobile purposes.
Fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented, and that more or fewer components may instead be implemented, the elements of the mobile terminal being described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
The broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel may include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112. The broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of digital video broadcasting-handheld (DVB-H), and the like. The broadcast receiving module 111 may receive a signal broadcast by using various types of broadcasting systems. In particular, the broadcast receiving module 111 may receive digital broadcasting by using a digital broadcasting system such as a data broadcasting system of multimedia broadcasting-terrestrial (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video broadcasting-handheld (DVB-H), forward link media (MediaFLO @), terrestrial digital broadcasting integrated service (ISDB-T), and the like. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet module 113 supports wireless internet access of the mobile terminal. The module may be internally or externally coupled to the terminal. The wireless internet access technology to which the module relates may include WLAN (wireless LAN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave access), HSDPA (high speed downlink packet access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetooth (TM), Radio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbee (TM), and the like.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module 115 can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 122, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display module 151. The image frames processed by the cameras 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 121 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display module 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device. The sensing unit 140 may include a proximity sensor 141.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner.
The output unit 150 may include a display module 151, an audio output module 152, an alarm module 153, and the like.
The display module 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display module 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display module 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display module 151 and the touch pad are stacked on each other in the form of layers to form a touch screen, the display module 151 may serve as an input device and an output device. The display module 151 may include at least one of a Liquid Crystal Display (LCD), a thin film transistor LCD (TFT-LCD), an Organic Light Emitting Diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. The mobile terminal 100 may include two or more display modules (or other display devices) according to a particular desired implementation, for example, the mobile terminal may include an external display module (not shown) and an internal display module (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The alarm module 153 may provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alarm module 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm module 153 may provide an output in the form of a vibration, and when a call, a message, or some other incoming communication (communicating communication) is received, the alarm module 153 may provide a tactile output (i.e., vibration) to inform the user thereof. By providing such a tactile output, the user can recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm module 153 may also provide an output notifying the occurrence of an event via the display module 151 or the audio output module 152.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The following is a detailed description of specific examples.
First embodiment
The embodiment provides an audio file management method, which can be used for checking audio files in daily life of a user; and when the absence of a certain audio file is checked, setting the file record of the audio file in the media database to be in an inactivated state. Therefore, if the audio file is recovered, the file recording information in the media database corresponding to the audio file cannot be lost, and the satisfaction degree of user experience is improved.
It should be understood that, in the present embodiment, the audio file does not exist means that the audio file already exists, but the audio file does not exist at the time of checking. For example, audio file 1 is stored in the SD card, and when the SD card is removed, it is checked that audio file 1 does not exist, and the file record of audio file 1 in the media database is set to the inactive state. The absence of an audio file includes permanent deletion or temporary removal, both of which are resumed later.
In this embodiment, the audio file management method can be shown in fig. 2, and includes:
s201, checking the audio files in the audio folder of the recording application;
s202, when the condition that a certain audio file does not exist under the audio folder is checked, file records of the audio file in a media database of the recording application are set to be in an inactivated state.
In this embodiment, the record of the file in the inactivated state is not displayed on the user interaction display interface of the recording application. It should be understood that the user interaction display interface is refreshed, and only the file record in the activated state is displayed on the user interaction display interface through refreshing, and the file record in the inactivated state is hidden.
In this embodiment, the file record in the inactive state can be activated after the activation condition is satisfied, and the file record information will not be lost after activation.
It should be understood that, in the present embodiment, the sound recording application may correspond to one audio folder, and may also correspond to a plurality of audio folders. For example, the recording application only corresponds to one audio folder, and the check is only performed on the audio files in the audio folder, and the check is not performed on the other folders except the audio folder.
For another example, the recording application corresponds to two audio folders, one of the audio folders is disposed in a memory of the terminal, the other audio folder is disposed in the SD card, the checking is performed on the audio files in the two audio folders, and when the audio file in any one of the audio folders changes, whether the corresponding audio file exists can be checked. It should be understood that in this example, the memory of the terminal or the audio folder in the SD card may be provided in plural number instead of only one.
It should be understood that, in the present embodiment, the user interaction display interface includes, but is not limited to: a playlist display interface and a file editing display interface. When it is determined that an audio file does not exist, the file record of the audio file is not displayed on a user interaction display interface such as a playlist display interface and a file editing display interface.
In this embodiment, the manner of checking the audio files in the audio folder at least includes one of scanning check and fixed point check.
Referring to fig. 3, a process of checking audio files in an audio folder by a scanning checking method includes:
s301, judging whether a preset scanning condition is triggered or not; if yes, go to S302; otherwise, go to S306;
s302, acquiring audio file attribute information of each current audio file in an audio folder;
s303, acquiring file attribute record information in each current file record in the media database;
s304, matching the acquired audio file attribute information with the file attribute recording information;
and S305, determining the updating condition of the audio file according to the matching result.
S306, returning to the step S301 to carry out the next judgment.
It should be noted that in this embodiment, a scanning condition is preset, and only when the preset scanning condition is triggered, the audio files in the audio folder can be checked through a scanning checking manner. This check would check all audio files under the audio folder.
It should be understood that the preset scanning condition at least includes the sound recording application starting or entering a user interactive display interface of the sound recording application; external memory card removal or insertion; and receiving one of the audio folder content updating notifications sent by the third-party application. I.e. including at least one of the following three cases:
when the recording application is started or enters a user interaction display interface of the recording application, for example, the recording application is entered or the playlist display interface is returned, all audio files in the audio folder are scanned and checked.
When an external memory card is removed or inserted, for example, when SD card removal or insertion occurs, all audio files under the audio folder are scan checked. It should be understood that the external memory card in this embodiment refers to an external storage device having a storage space, and the storage space and the access terminal can be used as an extended storage space, and besides the SD card, the external storage device may also be an external storage device such as a usb disk and a mobile hard disk.
When receiving an audio folder content update notification sent by a third-party application, for example, registering a monitoring broadcast, and when receiving such a broadcast, the recording application performs a scanning check on all audio files in the audio folder. It should be understood that the audio folder content update notification at this time is a notification that a scan check is performed on all audio files under the audio folder.
Referring to fig. 4, a process of checking audio files in an audio folder by a fixed-point checking method includes:
s401, judging whether an update notice of a certain audio file in an audio folder sent by a third-party application is received or not; if yes, go to S402; otherwise, go to S406;
s402, acquiring the audio file attribute information of the audio file;
s403, acquiring file attribute recording information of the audio file in the media database;
s404, matching the acquired audio file attribute information with the file attribute recording information;
and S405, determining the updating condition of the audio file according to the matching result.
S406, returning to the step S401 to make the next judgment.
It should be noted that in this embodiment, only when an update notification of an audio file in an audio folder sent by a third-party application is received, the audio file in the audio folder is checked in a fixed-point checking manner. This check is made only for certain audio files under the audio folder in which the third party application sent the update notification.
For example, when an audio file in an audio folder of a recording application changes, a broadcast informing that the audio file has been updated is received, and then the audio file attribute information and the file attribute recording information of the audio file are obtained and matched, so as to determine the update condition of the audio file.
It should be understood that the received notification of the update of an audio file in an audio folder sent by the third-party application may only inform the recording application that the audio file has been updated, and a fixed-point check may be performed; or a notification containing the file attribute information before the update of the audio file and the current file attribute information of the audio file.
For example, the update notification sent by the third-party application only informs that the audio file 1 in the audio folder is updated, and then the audio file attribute information of the audio file needs to be acquired, and at the same time, the file attribute recording information of the audio file is acquired in the media database, and then matching is performed and the update result is determined.
For another example, in the update notification sent by the third-party application, the file attribute information before the update of the audio file 1 in the audio folder and the current file attribute information are notified, so that the recording application can directly match the obtained file attribute record information of the audio file 1 in the media database according to the current file attribute information and determine the update result.
In this embodiment, the file attribute record information may be directly obtained by obtaining the entire file record, or may be extracted only as part of information for matching with the audio file attribute information.
In this embodiment, the audio file attribute information and the file attribute recording information both include a file storage path and a file duration; the audio file attribute information and the file attribute recording information used for matching at least comprise a file storage path and file duration.
In this embodiment, before the audio files in the audio folder are checked, the audio files in the audio folder are screened once to select the audio files in the audio folder. Specifically, referring to fig. 5, the screening process includes:
s501, judging whether the file suffix is in audio formats such as mp3/. amr; if yes, go to S504; otherwise, go to S502;
s502, analyzing file header information;
s503, judging whether the Mimetype contains an audio/' field; if yes, go to S504; otherwise, ending.
S504, the file is determined to be an audio file.
Specifically, for example, if file 1 in the audio folder in the update notification is updated, the suffix of file 1 is determined, and if the file 1 is in the audio format such as. mp3/. amr, the file 1 is determined to be an audio file, and the check is performed; if the file is not in the audio format such as mp3/. amr, the header information of the file 1 is analyzed, whether the Mimetype contains the audio/' field or not is judged, if the Mimetype contains the audio/' field or not is judged, the file 1 is judged to be the audio file, the check is carried out, and if the Mimetype does not contain the audio/' field, the file 1 is judged not to be the audio file, and the check is not carried out.
It should be understood that the audio files in the audio folder of the recording application may be the audio files obtained by screening the files in the audio folder once, and may be directly checked; it may be non-screened and screened before the examination.
In this embodiment, referring to fig. 6, the audio file management method further includes:
s601, acquiring file records in a media database;
s602, judging whether the acquired file record is in an inactivated state; if yes, go to S603; otherwise, go to S605;
s603, judging whether the acquired file record meets the failure condition; if yes, go to S604; otherwise, go to S605;
and S604, taking the acquired file record as an invalid file record and deleting the invalid file record.
The file record continues to be maintained in the media database S605.
In this embodiment, the failure condition includes at least one of the unused time exceeding a preset time value and the usage frequency being less than a preset usage frequency. The preset frequency of use may be: the number of times a certain file record is used/the total number of times all file records are used; or the file records the number of times used per day, etc. Namely, the failure condition includes at least the following three cases:
for example, if the preset time value is 30 days and the file record 1 has not been used for 31 days, it is determined that the file record 1 satisfies the invalidation condition, and if the file record 1 is in an inactive state, the file record 1 is an invalidated file record and the file record 1 is deleted.
For example, assuming that the preset usage frequency is 0.1 (the number of times a certain file record is used/the total number of times all file records are used), and the usage frequency of the file record 1 is 0.09, it is determined that the file record 1 satisfies the revocation condition, and if the file record 1 is in an inactivated state, the file record 1 is a revoked file record, and the file record 1 is deleted.
For another example, if the preset time value is 6 months, the preset frequency of use is 0.1, the file record 1 is unused for more than 6 months, and the frequency of use of the file record 1 is lower than 0.1, it is determined that the file record 1 satisfies the invalidation condition, and if the file record 1 is in an inactive state, the file record 1 is an invalidated file record, and the file record 1 is deleted.
In this embodiment, before taking a file record that is in a certain state and is in an inactive state and meets an invalidation condition as an invalidated file record, the method further includes: and judging whether the file record contains key recovery attribute information or not, and if not, taking the file record as a failure file record.
It should be understood that the key recovery attribute information includes: at least one of file remark information, file label information and time dotting information; at least a portion of the file records in the media database include the key recovery attribute information. Taking fig. 7 as an example, fig. 7 is a display interface diagram of a certain recording application, wherein 71 is document remark information including recording pictures, characters and other information; 72 is file label information, and the label information in the graph is 'interview'; time dotting information is 73.
The operation steps of the audio file management method provided in this embodiment can be specifically implemented by a controller built in the terminal as shown in fig. 1.
In the audio file management method provided by this embodiment, by checking the audio files in the audio folder of the recording application, when it is checked that a certain audio file does not exist in the audio folder, the file record of the audio file in the media database of the recording application is set to the inactive state, and the file record set to the inactive state is not displayed on the user interaction display interface of the recording application. Thus, after the state of the audio file is updated, the file record in the media database before the state of the audio file is updated is not deleted, and after the audio file with the updated state is recovered, the file record of the audio file in the media database can be correspondingly retrieved; meanwhile, the record of the file in the inactivated state is not displayed on the user interaction display interface of the recording application, so that the playing and editing of the nonexistent file can be avoided, and the satisfaction degree of user experience is improved.
Second embodiment
In order to better understand the present invention, in this embodiment, on the basis of the first embodiment, taking the example that the audio file attribute information and the file attribute recording information both include the file storage path and the file duration, the specific process of the audio file management method of the present invention is further exemplified.
In this embodiment, matching the acquired audio file attribute information with the file attribute recording information, and determining the update condition of the audio file according to the matching result includes:
when the file storage path and the file duration in certain file attribute recording information are not matched with the storage path and the file duration in each audio file attribute information, determining that the audio file corresponding to the file attribute recording information does not exist;
it should be understood that the absence of an audio file in this embodiment includes both permanent deletion and temporary removal.
For example, after an audio file is deleted by a third-party application (such as a file manager), all files in the recording folder are traversed, the file storage path and the file duration in the original file attribute recording information of the audio file are not matched with the storage path and the file duration in the existing attribute information of each audio file, it is determined that the audio file does not exist, the corresponding file record in the database is updated, and the file record is set to be in an inactivated state.
For another example, an audio folder is set in the SD card, and the audio folder has a part of audio files therein. And removing the SD card, wherein part of the audio files are lost temporarily (removed temporarily), traversing all files in the existing recording folder, determining that the part of the audio files do not exist, updating corresponding file records in the database, and setting the file records to be in an inactivated state, wherein file storage paths and file durations in file attribute record information of the part of the audio files stored in the SD card are not matched with storage paths and file durations in the existing audio file attribute information.
And when the file storage path and the file duration in certain audio file attribute information are not matched with the storage path and the file duration in each file attribute recording information, determining the audio file corresponding to the audio file attribute information as a newly added file.
In this embodiment, when the determined result is that the audio file is a newly added file, the file record of the newly added file is extracted and added to the media database.
For example, an audio file 1 is newly added under a recording folder through a third-party application (such as a file manager), at this time, a file storage path and file duration in the attribute information of the audio file 1 are obtained and are not matched with storage paths and file durations in the attribute record information of each file in the media database, the audio file 1 is determined to be a newly added file, and file records of the audio file 1 are extracted and added into the media database.
And when the file storage path and the file duration in certain audio file attribute information are matched with the file storage path and the file duration in certain file attribute recording information, but the file record corresponding to the file attribute recording information is in an inactivated state, determining that the audio file corresponding to the audio file attribute information is a recovery file.
In this embodiment, when the determined result is that the audio file is a recovery file, the file record corresponding to the audio file is modified from the inactive state to the active state.
For example, an audio folder is set in the SD card, and the audio folder has a part of audio files therein. The SD card is previously removed and is now moved in. When the audio file is moved out, the corresponding file record in the media database is not deleted, at this time, the check can still find that the file storage path and the file duration in the part of the audio file attribute information are matched with the storage path and the file duration in the part of the file attribute record information in the media database, the part of the audio file is determined to be a recovery file, and meanwhile, the file record corresponding to the part of the audio file is modified from an inactivated state to an activated state.
And when the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the certain audio file attribute information and the file attribute recording information are not matched with the file attribute information of other files, determining that the audio file storage path corresponding to the audio file attribute information is modified.
In this embodiment, when the determined result is that the storage path of the audio file is modified, the method further includes updating the storage path in the file record corresponding to the audio file to the storage path in the audio file attribute information of the audio file.
For example, when an audio file is renamed to another file name, the audio file still exists, the storage path in the file attribute information is changed, but the other attribute information is not changed. This is a specific case that the storage path of the audio file corresponding to the attribute information of the audio file is modified. At this time, the file duration in the audio file attribute information is matched with the file durations in all the file attribute recording information in the media database, and the file duration in one file attribute recording information can be successfully matched, if only one file attribute recording information is successfully matched with the file duration and the file storage paths of the two file attribute recording information are not matched, the storage path of the file attribute recording information is changed into the storage path in the current file attribute information of the audio file, and other information is kept unchanged.
When the file duration in certain audio file attribute information is matched with the file durations in at least two pieces of file attribute recording information, but the file storage path in the audio file attribute information is not matched with the storage paths in the at least two pieces of file attribute recording information, determining that the audio file corresponding to the audio file attribute information is a newly added file;
referring to the above example, when an audio file is renamed to another file name, the audio file still exists, the storage path in the file attribute information is changed, but the other attribute information is not changed. At this time, the file duration in the audio file attribute information is matched with the file durations in all the file attribute recording information in the media database, and if the file durations in a plurality of file attribute recording information are all matched, the storage path is not determined to be modified, but the audio file is determined to be a newly added file, and the file record of the audio file is extracted and added into the media database.
And when the file storage path in certain audio file attribute information is matched with the file storage path in certain file attribute recording information, the file time lengths contained in the file storage path and the file storage path are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file time length corresponding to the audio file attribute information is modified.
In this embodiment, when the determined result is that the duration of the audio file is modified, the method further includes updating the file duration in the file record corresponding to the audio file to the file duration in the attribute information of the audio file.
For example, after an audio file in the audio folder is deleted, a new audio file is copied and named as the file name of the deleted audio file. At this time, the storage path of the file is not changed, and the file duration is changed. This is a specific case that the file duration of the audio file corresponding to the audio file attribute information is modified. At this time, the storage path in the audio file attribute information is matched with the storage paths in all the file attribute recording information in the media database, and it is inevitable that one storage path in the file attribute recording information can be successfully matched, if the file durations of the two storage paths are not matched, the file duration in the file attribute recording information is changed into the file duration in the current file attribute information of the audio file, and other information is kept unchanged.
It should be understood that, in the present embodiment, both the audio file attribute information and the file attribute recording information further include modification time. When a certain audio file is modified, the storage path and the file duration in the audio file attribute information are still matched with the storage path and the file duration in the corresponding file attribute recording information, and the modification time in the corresponding file attribute recording information is modified to be the modification time in the audio file attribute information.
Referring to the above example, after an audio file in the audio folder is deleted, a new audio file is copied and named as the file name of the deleted audio file. If the storage path and the file duration in the file attribute recording information are successfully matched with the storage path and the file duration in the audio file attribute information, only the modification time in the file attribute recording information is modified to be the modification time in the audio file attribute information.
The operation steps of the audio file management method provided in this embodiment can be specifically implemented by a controller built in the terminal as shown in fig. 1.
The audio file management method provided in this embodiment has been exemplified according to different matching situations between the storage path energy and the file duration in the audio file attribute information and the file attribute recording information. The operation processing method of the audio file under different updating conditions is specifically analyzed, the recovery and the retention of the key information of the corresponding file record in the media database after the audio file is deleted, recovered and modified are realized, and the satisfaction degree of user experience is improved.
Third embodiment
Referring to fig. 8, fig. 8 is a schematic structural diagram of a terminal according to a third embodiment of the present invention, including an audio file management apparatus 2, and the structure of the audio file management apparatus 2 is shown in fig. 9, including:
and the file checking module 21 is used for checking the audio files in the audio folder of the recording application.
And the processing module 22 is configured to set a file record of an audio file in a media database of the recording application to an inactive state when it is checked that the audio file does not exist under the audio folder.
In this embodiment, the record of the file in the inactivated state is not displayed on the user interaction display interface of the recording application.
In this embodiment, the file record in the inactive state can be activated after the activation condition is satisfied, and the file record information will not be lost after activation.
It should be understood that, in the present embodiment, the sound recording application may correspond to one audio folder, and may also correspond to a plurality of audio folders. For example, the recording application corresponds to only one audio folder, and the file checking module 21 only checks the audio files in the audio folder and does not check the other folders except the audio folder.
For another example, the recording application corresponds to two audio folders, one of the audio folders is disposed in the memory of the terminal, and the other audio folder is disposed in the SD card, during the check, the file checking module 21 will perform the check on the audio files in the two audio folders, and when the audio file in any one of the audio folders changes, the file checking module 21 can check whether the corresponding audio file exists. It should be understood that in this example, the memory of the terminal or the audio folder in the SD card may be provided in plural number instead of only one.
It should be understood that, in the present embodiment, the user interaction display interface includes, but is not limited to: a playlist display interface and a file editing display interface.
In this embodiment, the checking the audio files in the audio folder of the recording application by the file checking module 21 includes: when the preset scanning condition is triggered, acquiring audio file attribute information of each current audio file in an audio folder, and acquiring file attribute record information in each current file record in a media database; matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result;
and/or when receiving an audio file update notification of an audio folder sent by a third-party application, acquiring audio file attribute information of the audio file, and acquiring file attribute recording information of the audio file in a media database; and matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result.
It should be noted that, in the embodiment, the file checking module 21 checks the audio files in the audio folder of the recording application when the preset scanning condition is triggered, and checks all the audio files in the audio folder.
It should be understood that, in the present embodiment, the preset scanning condition at least includes that the recording application starts or enters a user interaction display interface of the recording application; external memory card removal or insertion; and receiving one of three audio folder content updating notifications sent by the third-party application. Specifically, the method comprises the following steps:
when the file checking module 21 detects that the recording application is started or enters the user interaction display interface of the recording application, for example, enters the recording application or returns to the playlist display interface, all audio files in the audio folder are checked.
When the file checking module 21 detects external memory card removal or insertion, for example, when SD card removal or insertion occurs, all audio files under the audio folder are checked.
When receiving an audio folder content update notification sent by a third-party application, for example, registering a listening broadcast, and when the recording application receives such a broadcast, the file checking module 21 checks all audio files under the audio folder. It should be understood that the audio folder content update notification at this time is to notify the file checking module 21 to check all audio files under the audio folder.
It should be noted that, in this embodiment, the file checking module 21 checks the audio file in the audio folder of the recording application when receiving an update notification of a certain audio file in the audio folder sent by the third-party application, and only checks the certain audio file in the audio folder sent by the third-party application.
For example, when an audio file in an audio folder of a recording application changes, the file checking module 21 receives a broadcast that informs that the audio file has been updated, and then obtains and matches the audio file attribute information and the file attribute record information of the audio file, thereby determining the update condition of the audio file.
It should be understood that the received notification of the update of an audio file in an audio folder sent by the third-party application may simply inform that the audio file has been updated, and the audio file may be checked; or a notification containing the file attribute information before the update of the audio file and the current file attribute information of the audio file.
In this embodiment, the file checking module 21 may directly obtain the file attribute record information by obtaining the whole file record, or may extract only the information of the portion for matching with the audio file attribute information.
In this embodiment, the audio file attribute information and the file attribute recording information both include a file storage path and a file duration; the audio file attribute information and the file attribute recording information used for matching by the file checking module 21 both include at least a file storage path and a file duration.
In this embodiment, the file checking module 21 is further configured to:
and when judging that the file storage path and the file duration in certain file attribute recording information are not matched with the storage path and the file duration in each audio file attribute information, determining that the audio file corresponding to the file attribute recording information does not exist.
It should be understood that the absence of an audio file in this embodiment includes both permanent deletion and temporary removal. For example, an audio file is deleted by a third party application (e.g., a file manager), or an SD card holding a portion of the audio file is removed.
And when judging that the file storage path and the file duration in certain audio file attribute information are not matched with the storage path and the file duration in each file attribute recording information, determining the audio file corresponding to the audio file attribute information as a newly added file. For example, an audio file is newly added under the recording folder by a third party application (e.g., a file manager).
And when the file record corresponding to the file attribute recording information is in an inactivated state, determining that the audio file corresponding to the audio file attribute information is a recovery file.
In this embodiment, when the result determined by the file checking module 21 is that the audio file is a recovery file, the processing module 22 modifies the file record corresponding to the audio file from an inactive state to an active state. For example, the removed SD card storing part of the audio file is moved back, and at this time, the processing module 22 modifies the file record corresponding to the audio file in the SD card from the inactive state to the active state.
And when judging that the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the two are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file storage path corresponding to the audio file attribute information is modified. For example, a certain audio file is renamed to other file names, and the file duration in the audio file attribute information is matched with the file duration in one file attribute record information in the media database.
And when the file time length in certain audio file attribute information is judged to be matched with the file time lengths in at least two pieces of file attribute recording information, but the file storage path in the audio file attribute information is not matched with the storage paths in at least two pieces of file attribute recording information, determining that the audio file corresponding to the audio file attribute information is a newly added file. For example, a certain audio file is renamed to other file names, and the file duration in the audio file attribute information is matched with the file duration in two or more file attribute record information in the media database.
And when judging that the file storage path in certain audio file attribute information is matched with the file storage path in certain file attribute recording information, the file time lengths contained in the two are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file time length corresponding to the audio file attribute information is modified. For example, when a new audio file is copied after an audio file in the audio folder is deleted, and the file name of the deleted audio file is named. In this embodiment, the audio file management further includes an audio file screening module 23, see fig. 10, configured to screen the files in the audio folder once before the file checking module 21 checks the audio files in the audio folder, so as to select the audio files in the folder. Specifically, whether the file is an audio file may be determined by whether the file suffix is in an audio format such as. mp3/. amr, or by parsing the file header information, whether the Mimetype thereof includes an "audio/" field, or the like.
For example, the file checking module 21 receives that the file 1 in the audio folder in the update notification is updated, the audio file filtering module 23 determines the suffix of the file 1, and if the file 1 is in the audio format such as. mp3/. amr, the file 1 is determined to be an audio file, and then the file is checked; if the file is not in the audio format such as mp3/. amr, the header information of the file 1 is analyzed, whether the Mimetype contains the audio/' field or not is judged, if the Mimetype contains the audio/' field or not is judged, the file 1 is judged to be the audio file, the check is carried out, and if the Mimetype does not contain the audio/' field, the file 1 is judged not to be the audio file, and the check is not carried out.
It should be understood that the audio files in the audio folder of the recording application may be the audio files obtained by the audio file screening module 23 after once screening the files in the audio folder, and may be directly checked; it may be non-screened and screened before the examination.
In this embodiment, the processing module 22 is further configured to obtain a file record in the media database, where the file record is in an inactive state and meets the failure condition, as a failed file record, and delete the obtained failed file record.
In this embodiment, the failure condition includes at least one of the unused time exceeding a preset time value and the usage frequency being less than a preset usage frequency. The preset frequency of use may be: the number of times a certain file record is used/the total number of times all file records are used; or the file records the number of times used per day, etc.
In this embodiment, before the processing module 22 uses a file record in which a certain state is an inactive state and which satisfies a failure condition as a failed file record, it will also determine whether the file record contains key recovery attribute information, and if not, use the file record as the failed file record.
It should be understood that the key recovery attribute information includes: at least one of file remark information, file label information and time dotting information; at least a portion of the file records in the media database include the key recovery attribute information.
The specific structure of the terminal including the audio file management apparatus 2 provided in the present embodiment can be referred to fig. 1. The functions of the file checking module 21, the processing module 22 and the audio file screening module 23 of the file management apparatus 2 can be implemented by a controller of the terminal shown in fig. 1, and the file checking module 21, the processing module 22 and the audio file screening module 23 can be specifically configured in the controller of the terminal shown in fig. 1.
In the terminal including the audio file management apparatus 2 provided in this embodiment, the file checking module 21 checks the audio files in the audio folder of the recording application, and when it is checked that a certain audio file in the audio folder does not exist, the processing module 22 sets the file record of the audio file in the media database of the recording application to an inactive state, and sets the file record of the audio file to the inactive state, and does not display the file record on the user interaction display interface of the recording application. Thus, after the state of the audio file is updated, the file record in the media database before the state of the audio file is updated is not deleted, and after the audio file with the updated state is recovered, the file record of the audio file in the media database can be correspondingly retrieved; meanwhile, the file record in the inactivated state is not displayed on the user interaction display interface of the recording application, so that the situation that the user plays and edits the nonexistent file is avoided, and the satisfaction degree of user experience is improved.
Fourth embodiment
In order to better understand the present invention, in this embodiment, based on the third embodiment, taking the example that the audio file attribute information and the file attribute recording information both include the file storage path and the file duration as an example, further example is made on an optional specific working process of the terminal including the audio file management apparatus 2 provided by the present invention, referring to fig. 11, which includes:
s1101, screening the files in the audio folder by the audio file screening module 23;
when the audio file screening module 23 performs screening, it determines from a file suffix and parsed file header information, and screens out an audio file in the audio folder.
S1102, the file checking module 21 checks the audio file;
the file checking module 21 determines whether to check all audio files in the audio folder or only to check the designated audio files in the audio folder according to the preset scanning condition being triggered and receiving the audio folder content update notification sent by the third-party application.
When the recording application is started, or a user interaction display interface of the recording application is entered, or an external memory card is removed or inserted (for example, an SD card is moved in or out), or an audio folder content update notification sent by a third-party application is received (for example, registered broadcast information is monitored), the file checking module 21 may check all audio files in the audio folder.
S1103, the file checking module 21 determines the updating condition of the audio file according to the checking result;
when checking, the file checking module 21 respectively obtains a file storage path and a file duration in the audio file attribute information of the audio file and a file storage path and a file duration in the file attribute recording information in the file record in the media database, matches them, and determines the update condition of the audio file according to the matching result.
The update condition of the audio file at least comprises the following steps: the audio file is not present; the audio file is a newly added file; the audio file is a recovery file; the file storage path and the file duration of the audio file are modified.
S1104, the processing module 22 respectively carries out different media database updating operations according to different updating conditions;
wherein the audio file not existing comprises: and when the original audio file is deleted and the SD card is moved out, and the like, the corresponding file record in the media database is set to be in an inactivated state.
The audio file is a newly added file and comprises the following steps: and copying a new audio file to an audio folder, and the like, adding a corresponding file record in the media database at the moment, and setting the file record to be in an activated state.
The audio file is a recovery file comprising: and the SD card is inserted again, and the file record corresponding to the inactivated state is set to be in the activated state in the media database.
The file storage path of the audio file is modified including: the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the audio file attribute information and the file attribute recording information are not matched, and the file attribute recording information and other file attribute information are not matched; such as the case of renaming an audio file to another file name.
The modifying of the file duration of the audio file comprises: matching a file storage path in certain audio file attribute information with a file storage path in certain file attribute recording information, wherein the file storage paths in the certain audio file attribute information and the file storage path in the certain file attribute recording information are not matched, and the file time lengths contained in the certain audio file attribute information and the file storage path in the certain file attribute recording information are not matched, and the file attribute recording information is not matched with other file attribute information; for example, when an audio file in the audio folder is deleted, a new audio file is copied and named as the file name of the deleted audio file.
S1105, the processing module 22 deletes the file record which meets the failure condition and does not include the key recovery attribute information in the file records in the inactivated state.
The specific structure of the terminal including the audio file management apparatus 2 provided in the present embodiment can be referred to fig. 1. The functions of the file checking module 21, the processing module 22 and the audio file screening module 23 of the file management apparatus 2 can be implemented by a controller of the terminal shown in fig. 1, and the file checking module 21, the processing module 22 and the audio file screening module 23 can be specifically configured in the controller of the terminal shown in fig. 1.
In the terminal including the audio file management apparatus 2 provided in this embodiment, when an audio file performs operations such as renaming, deleting, and removing an SD card, file records of media database data are synchronously updated in real time, so as to ensure consistency between the audio file and the file records; meanwhile, when the media database is synchronized, the states of the audio files are respectively set to be activated and inactivated according to the existence of the audio files, so that the integrity of the information of the audio files is ensured; after the file record meets the preset deleting condition, the file record can be deleted, so that the problem that useless file records occupy the data space of the media database is avoided, and the satisfaction degree of user experience is improved.
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 in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An audio file management method, comprising:
checking the audio files in the audio folder of the recording application;
when the audio file does not exist under the audio folder, wherein the audio file does not exist and comprises the audio file which is deleted permanently or removed temporarily, the file record of the audio file in the media database of the recording application is set to be in an inactivated state; recording files in an inactivated state for not displaying on a user interaction display interface of the recording application;
the checking of the audio files under the audio folder comprises: scanning inspection and/or spot inspection:
the scanning inspection comprises:
when a preset scanning condition is triggered, acquiring audio file attribute information of each current audio file in the audio folder, and acquiring file attribute record information in each current file record in the media database;
matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result;
the spot check includes:
when receiving an audio file update notification of an audio file folder sent by a third-party application, acquiring audio file attribute information of the audio file, and acquiring file attribute recording information of the audio file in the media database;
and matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result.
2. The audio file management method according to claim 1, wherein when the checking of the audio files under the audio folder includes a scanning check, the preset scanning condition includes at least one of:
starting the recording application or entering a user interaction display interface of the recording application;
external memory card removal or insertion;
and receiving an audio folder content updating notice sent by the third-party application.
3. The audio file management method according to claim 1 or 2, wherein the audio file attribute information and the file attribute recording information each include a file storage path and a file duration; matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result comprises the following steps:
when the file storage path and the file duration in certain file attribute recording information are not matched with the storage path and the file duration in each audio file attribute information, determining that the audio file corresponding to the file attribute recording information does not exist;
when the file storage path and the file duration in certain audio file attribute information are not matched with the storage path and the file duration in each file attribute recording information, determining the audio file corresponding to the audio file attribute information as a newly added file;
when the file storage path and the file duration in certain audio file attribute information are matched with the file storage path and the file duration in certain file attribute recording information, but the file record corresponding to the file attribute recording information is in an inactivated state, determining that the audio file corresponding to the audio file attribute information is a recovery file;
when the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the certain audio file attribute information and the file attribute recording information are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file storage path corresponding to the audio file attribute information is modified;
when the file duration in certain audio file attribute information is matched with the file durations in at least two pieces of file attribute recording information, but the file storage path in the audio file attribute information is not matched with the storage paths in the at least two pieces of file attribute recording information, determining that the audio file corresponding to the audio file attribute information is a newly added file;
and when the file storage path in certain audio file attribute information is matched with the file storage path in certain file attribute recording information, the file time lengths contained in the file storage path and the file storage path are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file time length corresponding to the audio file attribute information is modified.
4. The audio file management method according to claim 3, wherein when the audio file is a restored file as a result of the determination, further comprising modifying a file record corresponding to the audio file from an inactivated state to an activated state;
when the determined result is that the audio file is a newly added file, extracting the file record of the newly added file and adding the file record into the media database;
when the determined result is that the storage path of the audio file is modified, updating the storage path in the file record corresponding to the audio file to the storage path in the audio file attribute information of the audio file;
and when the determined result is that the duration of the audio file is modified, updating the file duration in the file record corresponding to the audio file to the file duration in the audio file attribute information of the audio file.
5. The audio file management method of any one of claims 1-2, wherein the method further comprises:
acquiring file records in the media database, wherein the file records are in an inactivated state and meet failure conditions as failure file records, and the failure conditions are that the nonuse time exceeds a preset time value and/or the use frequency is less than a preset use frequency;
and deleting the acquired failure file record.
6. The audio file management method of claim 5, wherein at least a portion of the file records in the media database include key restore attribute information, the key restore attribute information including at least one of file remark information, file tag information, and time dotting information;
the method further comprises the following steps: before taking a file record which is in an inactivated state and meets the failure condition as a failure file record, judging whether the file record contains key recovery attribute information, and if not, taking the file record as the failure file record.
7. An audio file management apparatus comprising:
the file checking module is used for checking the audio files in the audio folder of the recording application;
the processing module is used for setting the file record of the audio file in the media database of the recording application to be in an inactivated state when the audio file does not exist under the audio folder, wherein the audio file does not exist and comprises the audio file which is deleted permanently or removed temporarily; recording files in an inactivated state for not displaying on a user interaction display interface of the recording application;
the file checking module is used for acquiring the audio file attribute information of each current audio file in the audio folder and acquiring the file attribute record information in each current file record in the media database when a preset scanning condition is triggered; matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result;
and/or the file checking module is used for acquiring the audio file attribute information of the audio file and acquiring the file attribute recording information of the audio file in the media database when receiving an audio file updating notification of an audio folder sent by a third party application; and matching the acquired audio file attribute information with the file attribute recording information, and determining the updating condition of the audio file according to the matching result.
8. The audio file management apparatus of claim 7, wherein the audio file attribute information and the file attribute recording information each include a file storage path and a file duration; the file check module is used for:
when judging that the file storage path and the file duration in certain file attribute recording information are not matched with the storage path and the file duration in each audio file attribute information, determining that the audio file corresponding to the file attribute recording information does not exist;
when judging that the file storage path and the file duration in certain audio file attribute information are not matched with the storage path and the file duration in each file attribute recording information, determining the audio file corresponding to the audio file attribute information as a newly added file;
judging that a file storage path and file duration in certain audio file attribute information are matched with a storage path and file duration in certain file attribute recording information, and determining that an audio file corresponding to the audio file attribute information is a recovery file when a file record corresponding to the file attribute recording information is in an inactivated state;
when judging that the file time length in certain audio file attribute information is matched with the file time length in certain file attribute recording information, the file storage paths contained in the two are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file storage path corresponding to the audio file attribute information is modified;
when judging that the file time length in certain audio file attribute information is matched with the file time lengths in at least two pieces of file attribute recording information, but the file storage path in the audio file attribute information is not matched with the storage paths in the at least two pieces of file attribute recording information, determining that the audio file corresponding to the audio file attribute information is a newly added file;
and when judging that the file storage path in certain audio file attribute information is matched with the file storage path in certain file attribute recording information, the file time lengths contained in the two are not matched, and the file attribute recording information is not matched with other file attribute information, determining that the audio file time length corresponding to the audio file attribute information is modified.
9. The audio file management apparatus of claim 8, wherein the processing module is further configured to modify a file record corresponding to the audio file from an inactive state to an active state when the file check module determines that the audio file is a recovery file.
10. A terminal characterized by comprising an audio file management apparatus according to any one of claims 7 to 9.
CN201610973122.8A 2016-10-28 2016-10-28 Audio file management method and device and terminal Active CN106776684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610973122.8A CN106776684B (en) 2016-10-28 2016-10-28 Audio file management method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610973122.8A CN106776684B (en) 2016-10-28 2016-10-28 Audio file management method and device and terminal

Publications (2)

Publication Number Publication Date
CN106776684A CN106776684A (en) 2017-05-31
CN106776684B true CN106776684B (en) 2021-01-22

Family

ID=58971985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610973122.8A Active CN106776684B (en) 2016-10-28 2016-10-28 Audio file management method and device and terminal

Country Status (1)

Country Link
CN (1) CN106776684B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595500B (en) * 2018-03-18 2022-09-30 平安科技(深圳)有限公司 Recording management and control method, system, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799851A (en) * 2009-12-31 2010-08-11 黄定 Method for canceling activation after networking activation of software
CN102999564A (en) * 2012-11-06 2013-03-27 华为技术有限公司 Method, device and equipment for writing in data
CN105426386A (en) * 2015-10-23 2016-03-23 小米科技有限责任公司 File synchronization method and apparatus, and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8109444B2 (en) * 2007-09-12 2012-02-07 Devicefidelity, Inc. Selectively switching antennas of transaction cards

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799851A (en) * 2009-12-31 2010-08-11 黄定 Method for canceling activation after networking activation of software
CN102999564A (en) * 2012-11-06 2013-03-27 华为技术有限公司 Method, device and equipment for writing in data
CN105426386A (en) * 2015-10-23 2016-03-23 小米科技有限责任公司 File synchronization method and apparatus, and terminal device

Also Published As

Publication number Publication date
CN106776684A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US10949188B2 (en) Mobile terminal and control method thereof
US9535592B2 (en) Mobile terminal having multi-function executing capability and executing method thereof
US8798684B2 (en) Mobile terminal and controlling method thereof
CN105426403B (en) Bookmark synchronization method and device
US20130024794A1 (en) Mobile device and control method thereof
CN106227867B (en) A kind of method and device of file management
KR20090114719A (en) Mobile terminal and its call contents management method
CN106559563B (en) Image data processing method and device
CN106250268B (en) Content of text recovery device and method
CN105357370A (en) Chat message positioning method and terminal
US9954998B2 (en) Method of editing call history information in mobile device and mobile device controlling the same
CN105245703A (en) Mobile terminal and method for storing files in classification way
CN105072279B (en) A kind of back-up device based on mobile terminal and method
CN107229468B (en) File backup method and mobile terminal
CN110287958B (en) Method, terminal and computer readable storage medium for intelligently adjusting character recognition rate
CN106776684B (en) Audio file management method and device and terminal
CN106021530A (en) Method and device for hiding applications
CN105791588A (en) Mobile terminal desktop setting device and mobile terminal desktop setting method
CN106557555A (en) media playing method and device
CN106791217B (en) Image management optimization method of mobile terminal and mobile terminal
KR20110116377A (en) Mobile terminal and method for controlling the same
CN106911896B (en) Image processing device and method
CN106055428A (en) Method and apparatus for backing up data
CN111290882A (en) Data file backup method, data file backup device and electronic equipment
CN106658197B (en) Video playing method, device and 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