Recording data importing and backing-up method and device based on iOS operating system
Technical Field
The invention relates to a recording technology, in particular to a recording data importing and backup method and device based on an apple mobile (iOS) operating system.
Background
An apple mobile (iOS, iPhone OS) operating system is used as a mobile operating system developed by iOS devices such as iPhone, iPad, iPod and the like of apple company, and because a large amount of application software can be compatible, the individual requirements of different users are met, and more users are applied; meanwhile, with the continuous development of information science and technology, more and more application software is installed on the iOS device by a user, so that the data volume on the iOS device is rapidly increased. However, since the iOS os is a closed os, an application developer can only use a development interface provided by apple inc to open the outside to develop application software, so that functions that can be implemented by the developed application software for the iOS os are limited by the provided development interface. For example, after recording is performed on a user by recording software in the iOS operating system, because the apple company does not provide a relevant interface for importing and exporting recording data at present, recording data recorded in the iOS device can only be stored in the iOS device, so that the security of the recording data is low in a scene where the recording data needs to be backed up to improve the security of the recording data; meanwhile, recording data recorded by the external device cannot be imported into the iOS device, so that the experience of user services is influenced.
Currently, for a non-iOS device, for example, a fixed terminal device, some software is developed for implementing import and export of recording data in the non-iOS device. For example, apple's official application iTunes, or third party application itol, may import and export recorded data from non-iOS devices, where iTunes is a free application that plays all digital music and video, and itols is a computer-side software used to synchronize iOS devices. However, since iTunes and itol are based on OSX operating system or windows operating system, the OSX operating system is a proprietary operating system developed by apple for Mac series products, and is based on UNIX system. Due to the difference of the interfaces, it cannot be applied to the iOS operating system. Therefore, there is no technical solution in the prior art that can export the recording data from the iOS operating system and import the external recording data into the iOS operating system.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a recording data importing and backing up method and apparatus based on the iOS operating system, which overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided a recording data backup method based on an iOS operating system, the method comprising:
calling an SQLite C language interface provided with a recording data reading authority and provided by an iOS operating system through an application program, and reading recording data under a preset path;
and according to the format fed back by the wireless communication interface, converting the format of the read recording data, and outputting the converted recording data to the wireless communication interface, so that the wireless communication interface packages the format-converted recording data, and outputs the packaged recording data to a preset external device for storage.
Preferably, the wireless communication interface feedback comprises:
and feeding back according to the type of the external equipment or a preset format.
Preferably, the feedback according to the external device type includes:
the method comprises the steps that a consultation request is sent by a C language interface of the SQLite, wherein the consultation request comprises a wireless communication interface identifier and a recording format supported by the consultation request;
the wireless communication interface sends the negotiation request to the external equipment, the external equipment receives the negotiation request, an intersection of a recording format supported by the external equipment and a recording format supported by the SQLite C language is obtained, a recording format is selected from the intersection and carried in the negotiation request response, and the recording format is fed back to the SQLite C language interface through the wireless communication interface.
Preferably, the external device is an optical disc player, and the recording formats supported by the external device include: vob, ifo, ac3, dts.
Preferably, the external device is an mp3 player, and the recording formats supported by the external device include: mp3, mp2, mod, wav, voc, avi, ogg, wmv.
Preferably, after the reading of the recorded data under the predetermined path, the method further includes:
and calling the Framework of the Media layer of the IOSSDK, and performing format conversion and/or editing on the read recording data.
Preferably, after the converting, before outputting to the wireless communication interface, the method further comprises:
and carrying out format conversion and/or encrypting the edited recording data according to a preset encryption algorithm.
Preferably, the encryption algorithm comprises: an enhanced data privacy protocol algorithm, a data encryption standard algorithm and a three-layer data encryption standard algorithm.
Preferably, after the reading of the recorded data under the predetermined path, the method further includes:
extracting a recording data file name contained in the read recording data, calling a Framework or an iOS operating system API of a CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the recording data file name;
and outputting the read configuration file of the recording data to preset external equipment through the called Framework or iOS operating system API of the CoreServices layer of the iOSSDK.
Preferably, the recording data is stored in the predetermined path according to a preset ZRECORDING table, and the predetermined path is: db/var/mobile/Media/Recordings.
Preferably, the fields in the ZRECORDING table include: z _ PK, ZITUNESPERSISTENTID, ZLABELPSET, ZDATE, ZDURRATION, ZCUSTOMLABEL, ZPATH, wherein,
the Z _ PK field is a recording data identifier recorded by the iOS equipment;
the field "zitunesperstentid" is a synchronization identifier for subsequent synchronization of the recorded data, for example, a synchronization identifier for subsequent synchronization with an external device through iTunes;
the ZLABELPSET field is the number of a recording data label preset by the iOS operating system;
the ZDATE field is the recording data creation date;
the ZDURATION field is the duration of the recorded data;
the ZCUSTOMLABEL field is a self-defined recording data tag;
the ZPATH field is a record data file name storage path corresponding to the record data.
Preferably, the data in the configuration file is stored in a format of a key value, the key is recording data filename information in a zpage field in the zrecord table, and the value includes a synchronization identifier and a recording data display name, wherein the synchronization identifier corresponds to a value of a zitunessistististististidentipid field in the zrecord table, and the recording data display name corresponds to a value of a zcustumlayback field in the zrecord table, or a value of a ZLABELPRESET field.
Preferably, before the calling the SQLite C language interface provided by the iOS operating system, the method further comprises:
and receiving a recording data backup request input by a user.
Preferably, the method further comprises:
and after the recording data are determined to be output to preset external equipment for storage, deleting the recording data in the iOS equipment.
Preferably, the method further comprises:
and outputting the recording data to a privacy storage area of the external equipment for storage.
Preferably, the C language interface of the SQLite for setting the recording data reading authority includes:
acquiring a root authority of the iOS operating system;
searching a memory variable of a read permission in a C language interface process of the SQLite;
and adding the memory variable of the recording data reading authority into the memory variable of the reading authority.
According to another aspect of the present invention, there is provided a recording data importing method based on an iOS operating system, including:
calling an SQLite C language interface provided by an iOS operating system through an application program, receiving the recording data to be imported from a wireless communication interface, and performing format conversion on the received recording data to be imported according to a preset format;
extracting a recording data file name contained in the received recording data, calling a Framework or an iOS operating system API of a CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the recording data file name;
writing the read configuration file of the recording data into the iOS device through the Framework or the iOS operating system API of the CoreServices layer of the called iOSSDK;
and writing the format-converted recording data into the iOS device for storage through the C language interface of the SQLite provided by the called iOS operating system.
Preferably, the method further comprises:
and decrypting the received recording data.
Preferably, the method further comprises:
and calling the Framework of the Media layer of the IOSSDK, and performing format conversion and/or editing on the received sound recording data.
Preferably, the preset format is a preset ZRECORDING table, and the fields in the ZRECORDING table include: z _ PK, ZITUNESPERSISTENTID, ZLABELPSET, ZDATE, ZDURRATION, ZCUSTOMLABEL, ZPATH, wherein,
the Z _ PK field is a recording data identifier recorded by the iOS equipment;
the field "zitunesperstentid" is a synchronization identifier for subsequent synchronization of the recorded data, for example, a synchronization identifier for subsequent synchronization with an external device through iTunes;
the ZLABELPSET field is the number of a recording data label preset by the iOS operating system;
the ZDATE field is the recording data creation date;
the ZDURATION field is the duration of the recorded data;
the ZCUSTOMLABEL field is a self-defined recording data tag;
the ZPATH field is a record data file name storage path corresponding to the record data.
According to still another aspect of the present invention, there is provided an iOS operating system-based recorded data backup apparatus, the apparatus comprising: a recording data reading module, a configuration file output module and a recording data backup module, wherein,
the recording data reading module is used for calling an SQLite C language interface provided with a recording data reading authority and provided by the iOS operating system through an application program and reading the recording data under a preset path;
the configuration file reading module is used for extracting the file name of the read recording data contained in the recording data, calling the Framework or iOS operating system API of the CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the file name of the recording data;
a configuration file output module, configured to output a configuration file of the read recording data to a preset external device through a Framework or an iOS operating system API of a CoreServices layer of the called iOSSDK;
and the recording data backup module is used for converting the format of the read recording data according to the format fed back by the wireless communication interface, outputting the recording data to the wireless communication interface so that the wireless communication interface packages the recording data after format conversion, and outputting the packaged recording data to preset external equipment for storage.
Preferably, the format of the wireless communication interface feedback comprises:
the method comprises the steps that a consultation request is sent by a C language interface of the SQLite, wherein the consultation request comprises a wireless communication interface identifier and a recording format supported by the consultation request;
the wireless communication interface sends the negotiation request to the external equipment, the external equipment receives the negotiation request, an intersection of a recording format supported by the external equipment and a recording format supported by the SQLite C language is obtained, a recording format is selected from the intersection and carried in the negotiation request response, and the recording format is fed back to the SQLite C language interface through the wireless communication interface.
Preferably, the apparatus further comprises:
and the recording data editing module is used for calling the Framework of the Media layer of the iOSSDK, and performing format conversion and/or editing on the recording data read by the recording data reading module.
Preferably, the apparatus further comprises:
and the encryption module is used for carrying out encryption processing on the recording data or format conversion and/or the edited recording data according to a preset encryption algorithm.
Preferably, the apparatus further comprises:
and the recording data deleting module is used for deleting the recording data in the iOS equipment after the recording data backup module is determined to be successful in recording data backup.
According to still another aspect of the present invention, there is provided an iOS operating system-based recording data importing apparatus, the apparatus including: a recording data import module, a configuration file acquisition module, a configuration file write-in module and a recording data storage module, wherein,
the recording data import module is used for calling an SQLite C language interface provided by the iOS through an application program and receiving recording data to be imported;
the configuration file acquisition module is used for extracting the file name of the sound recording data contained in the received sound recording data, calling the Framework or iOS operating system API of the CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the file name of the sound recording data;
a configuration file writing module, configured to write the configuration file of the read sound recording data into the iOS device through the Framework or the iOS operating system API of the coresevices layer of the called iOSSDK;
and the recording data storage module is used for writing the received recording data into the iOS equipment for storage according to a preset format through the C language interface of the SQLite provided by the called iOS operating system.
Preferably, the apparatus further comprises:
and the decryption module is used for decrypting the received recording data.
Preferably, the apparatus further comprises:
and the recording data modification module is used for calling the Framework of the Media layer of the iOSSDK, and performing format conversion and/or editing on the received recording data.
According to the recording data importing and backing up method and device based on the iOS operating system, recording data can be read by utilizing an SQLite C language interface provided by the iOS operating system, and a configuration file (AssetManifest. plist) is read by utilizing a Framework of a coreServices layer of the iOSSDK or an iOS operating system API, so that the recording data can be imported and backed up. Therefore, the technical problems that recording data cannot be backed up from the iOS operating system and external recording data is imported into the iOS operating system are solved, and the beneficial effects that the recording data in the iOS operating system can be shared with external equipment and the storage safety of the recording data is improved are achieved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a recording data backup method flow based on an iOS operating system according to an embodiment of the present invention;
FIG. 2 shows a flow of a recording data importing method based on an iOS operating system according to an embodiment of the present invention;
FIG. 3 shows a recording data backup apparatus structure based on an iOS operating system according to an embodiment of the present invention; and the number of the first and second groups,
fig. 4 shows a configuration of the recording data importing apparatus based on the iOS operating system according to the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the prior art, after recording software in the iOS operating system records a user, because the current apple company does not provide a relevant interface for importing and backing up recording data, interaction between the recording data recorded in the iOS equipment and external equipment cannot be realized, so that the security of the recording data is low, and the experience of user services is affected.
In the iOS operating system architecture, the method comprises the following steps: a CoreOS layer, a coreservics layer, a Media layer, and a cocotouch layer, wherein,
the Core (Core) OS layer is an open-source Unix Core conforming to the POSIX standard and is used for providing basic functions of the iOS operating system, wherein the basic functions can be provided through C language APIs, and the Core (Core) OS layer comprises: hardware drive, memory management, program management, thread management (POSIX), file system, standard input and output, and the like. Wherein the hardware driver functionality of the core OS layer is used to provide an interface between the hardware and the system framework. Due to security-based considerations, only a limited class of system frameworks can access the hardware drivers in an iOS operating system.
The coresevices layer is arranged on the CoreOS layer, and provides richer functions based on the CoreOS layer, namely providing basic system services for all application programs, which is the basis for building the basic system services and comprises the following steps: framework function, wherein the framework (framework) is an API belonging to Objective-C, and the corefusion is an API belonging to C language, and is used for providing basic functions of processing strings, arrangements, combinations, calendars, times, and the like.
The Media layer is used to provide multimedia functions such as pictures, music, movies, and the like.
The CocoaTouch layer is located at the uppermost layer and is API of Objective-C, wherein the most core part is UIKit. As one of the functions, the CocoaTouch layer may provide various component presentations on an application program interface.
The C language APIs of the CoreOS layer and the coresevices layer are implemented by using a C/C + + conventional interface function, and the C/C + + conventional interface function controls the SQLite database to connect the object and the preset object, and includes: sqlite3_ open (), sqlite3_ prepare (), sqlite3_ step (), sqlite3_ column (), sqlite3_ finish (), sqlite3_ close (). Wherein, the SQLite database is a light relational database, can support the mainstream operating systems such as Windows/Linux/Unix and the like, the system realizes the association between a user and a database by utilizing a Client/Server (C/S, Client/Server) two-layer architecture, the Client calls a uniform C language API function (C/C + + conventional interface function), the connection is established with a remote server through the Internet, the bottom layer of the server is associated with the SQLite database, the client side proposes a data access method, firstly the server takes over the data access method, the server submits the access methods to the SQLite database one by one for processing, the results of the processing are then sent by the server to the client, since the server is accessible to all of the multiple user interfaces, yet supports network connectivity, therefore, all client connections and accesses are managed through the server, and the SQLite database has a multi-user network access function.
In the embodiment of the invention, the recording data is read by using an SQLite C language interface provided by an iOS operating system, and a configuration file (AssetManifest. plist) is read by using a Framework of a CoreServices layer of the iOSSDK or an iOS operating system API (application program interface) so as to import and backup the recording data, and a specific implementation scheme for backing up the recording data from the iOS operating system and importing external recording data into the iOS operating system is provided, so that the recording data in the iOS operating system can be shared with external equipment, and the storage safety of the recording data is improved.
Fig. 1 shows a recording data backup method flow based on an iOS operating system according to an embodiment of the present invention. Referring to fig. 1, the method includes:
step 101, calling an SQLite C language interface provided with a recording data reading authority and provided by an iOS operating system through an application program, and reading recording data under a preset path;
in this step, a C language interface of the SQLite provided by the iOS operating system is set as an interface for importing and backing up recording data in the iOS device, and recording data or recording data (records.db) generated by recording of the iOS device is read through the C language interface of the SQLite.
In this step, the C language interface of the SQLite that sets up the recording data read permission includes:
acquiring a root authority of the iOS operating system;
searching a memory variable of a read permission in a C language interface process of the SQLite;
and adding the memory variable of the recording data reading authority into the memory variable of the reading authority.
In the embodiment of the present invention, as an optional embodiment, the recording data (recording database file) is stored in a preset ZRECORDING table in an iOS operating system such as iOS4, iOS5, iOS6, and iOS7, and a path for storing the recording data (ZRECORDING table) is set as follows: db/var/mobile/Media/Recordings.
Db database, the fields in the zrecord table include: z _ PK, ZITUNESPERSISTENTID, ZLABBELPRESET, ZDATE, ZDURATION, ZCUSTOMLABEL, ZPATH, etc. Wherein,
the Z _ PK field is a recording data identifier recorded by the iOS equipment;
the field "zitunesperstentid" is a synchronization identifier for subsequent synchronization of the recorded data, for example, a synchronization identifier for subsequent synchronization with an external device through iTunes;
the ZLABELPSET field is the number of a recording data label preset by the iOS operating system;
the ZDATE field is the recording data creation date;
the ZDURATION field is the duration of the recorded data;
the ZCUSTOMLABEL field is a self-defined recording data tag;
the ZPATH field is a record data file name storage path corresponding to the record data.
As an optional embodiment, after the audio record data is read, the read audio record data may be edited and modified to meet the personalized requirements of the user. Thus, the method further comprises:
and calling the Framework of the Media layer of the IOSSDK, and performing format conversion and/or editing on the read recording data.
In this step, a recording data format that the iOS device and the external device can be compatible with each other may be negotiated based on the recording data format supported by the iOS device and the recording data format supported by the external device connected to the iOS device in a wired or wireless manner, and format conversion may be performed on the read recording data according to the negotiated recording data format. For example, the external device supports the audio record data in the avi format, and the iOS device supports the audio record data in the avi, swf, and rm formats, and then the negotiation is performed to adopt the avi format, and if the audio record data format generated by the iOS device is avi, the format conversion is not needed, and if the audio record data generated by the iOS device is in the swf and rm formats, the audio record data in the swf and rm formats is converted into the audio record data in the avi format. The specific flow of format conversion is a well-known technique, and the detailed description is omitted here. Of course, in practical applications, the format conversion of the recording data may be performed on the external device side.
Editing may provide a function of editing the recorded sound data for a user, for example, the user may implement functions of intercepting a part of the recorded sound, increasing the volume, changing the tone of the sound, and the like by editing the recorded sound data. After the recording data is edited, the corresponding fields in the ZRECORDING table may be updated accordingly according to the edited recording data.
Further, in order to ensure the security of the recorded data during the transmission process, after performing format conversion and editing on the recorded data, the method may further include:
and carrying out format conversion and/or encrypting the edited recording data according to a preset encryption algorithm.
In this step, the encryption algorithm includes: enhanced data encryption protocol (AES), Data Encryption Algorithm (DEA), Data Encryption Standard (DES), and triple data encryption standard (3DES, TripleDES), and the like. As to which encryption algorithm is used, it can be determined by negotiation between the iOS apparatus and the external apparatus, and a detailed description thereof is omitted.
As an alternative embodiment, before calling the C language interface of SQLite provided by the iOS operating system, the method further comprises:
and receiving a recording data backup request input by a user.
In this step, in order to backup the recording data in the iOS device to the external device so that the external device backs up the recording data in the iOS device, thereby improving the security of the recording data, after the iOS device is connected (wirelessly or by wire) to the external device, a recording data backup request is sent to the iOS device, thereby triggering and calling the SQLite C language interface provided by the iOS operating system.
The external device may be a smart terminal device, including: mobile intelligent terminal equipment, fixed intelligent terminal equipment and other electronic equipment. Such as computers, personal digital assistants, mobile phones, hard disks, flash memory, etc.
Step 102, extracting a recording data file name contained in the read recording data, calling a Framework or iOS operating system API of a CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the recording data file name;
in this step, the recording data file name included in the recording data is extracted through the C language interface of the SQLite provided by the called iOS operating system.
A Software Development Kit (SDK) is a set of development tools that are pre-configured to create application software for a particular software package, software framework, hardware platform, operating system, etc.
The configuration file refers to information such as a storage path, a creation date, a file name, and recording data of the recording data.
In the configuration file (assetmorific. plist), data is stored in a format of Key-Value, Key is a file name of sound recording data, namely, in database records.db, sound recording data file name information in zptath field in zrecord table, and Value contains synchronous identification (pid) and sound recording data display name. Wherein pid corresponds to the ZITUNESERSISTENTID field value in the database ZRECORDING table, and the recorded data display name corresponds to the ZCUSTOMLABEL field value in the ZRECORDING table, or the ZLABLPRESET field value.
In the embodiment of the invention, the Key matched with the file name of the recording data is obtained by extracting the file name of the recording data contained in the read recording data and traversing the Key in the stored configuration file, and then the Framework or iOS operating system API of the coresevics layer of the iOSSDK is called to read the configuration file where the matched Key is located.
It should be noted that step 102 is an optional step for synchronizing with subsequent external devices to maintain the consistency of the recorded data, so as not to affect the synchronization mechanism of the iOS device and iTunes recorded data.
Step 103, outputting the read configuration file of the recording data to a preset external device through the Framework or iOS operating system API of the CoreServices layer of the called iOSSDK;
in this step, the configuration file may be output in a manner of AirDrop (AirDrop), short message, and mail, and the received configuration file may be stored in the external device. In the subsequent process, the configuration file stored in the external device is compared with the configuration file stored in the iOS device, if the configuration files are the same, the recording data in the iOS device and the recording data in the external device are consistent, namely synchronous, and if the configuration files are not consistent, the recording data in the iOS device and the recording data in the external device are not synchronous, and a user can be prompted whether to perform the overlay processing on the configuration file in the external device.
It should be noted that step 103 is an optional step.
And 104, converting the format of the read recording data according to the format fed back by the wireless communication interface, and outputting the converted recording data to the wireless communication interface, so that the wireless communication interface packages the format-converted recording data, and outputs the packaged recording data to a preset external device for storage.
In this step, if the format conversion, editing, or encryption processing is performed on the sound recording data, the sound recording data subjected to the format conversion, editing, or encryption processing is output to the wireless communication interface through the C language interface of the SQLite provided by the called iOS operating system, and is transmitted to the external device through the output to the wireless communication interface.
The wireless communication interface feedback comprises:
and feeding back according to the type of the external equipment or a preset format.
The feedback according to the external device type comprises the following steps:
the method comprises the steps that a consultation request is sent by a C language interface of the SQLite, wherein the consultation request comprises a wireless communication interface identifier and a recording format supported by the consultation request;
the wireless communication interface sends the negotiation request to the external equipment, the external equipment receives the negotiation request, an intersection of a recording format supported by the external equipment and a recording format supported by the SQLite C language is obtained, a recording format is selected from the intersection and carried in the negotiation request response, and the recording format is fed back to the SQLite C language interface through the wireless communication interface.
The recording formats supported by the external devices may vary depending on the external device. For example, if the external device is an optical disc player, the recording formats supported by the external device may include: vob, ifo, ac3, dts; for another example, if the external device is an mp3 player, the recording formats supported by the external device may include: mp3, mp2, mod, wav, voc, avi, ogg, wmv. For another example, if the external device is a desktop computer and a storm audio/video player is installed (the recording formats supported by the external device installed with different software may also be different), the supported recording formats may include: avi, wmv, wmp, asf; wma, wav, mid, midi; rm, ram, rmvb, smi; vob, ifo, ac3, dts.
As an alternative embodiment, the recorded data may be transmitted by AirDrop (AirDrop), short message, and mail. After the recording data is stored, the external device can modify the corresponding fields in the ZRECORDING table accordingly.
As an alternative embodiment, the received sound recording data is stored in a private storage area of the external device. For example, the privacy storage area can be a mobile phone guard safe box, so that only users with corresponding rights can access the recording data, and the storage safety of the recording data is improved.
Further, in order to avoid leakage of the recording data in the iOS device, for a case where the recording data is backed up by the user to a private storage area of the external device for storage, the method may further include:
and deleting the recording data in the iOS device.
In the step, after the recording data is imported into the mobile phone guard safe, the recording data is deleted from the iOS operating system of the iOS device, so that the privacy of a user can be effectively protected, and the recording data is only stored in the mobile phone guard safe. Furthermore, the stored recording number is provided with the encryption key, so that other users cannot acquire the recording data provided with the encryption key without acquiring the encryption key, thereby further improving the security of the recording data.
In the embodiment of the invention, iOS equipment such as iPhone is connected to a computer through wires or wireless, recording data is backed up from the iOS and imported into the computer, and iTunes synchronizes the recording data with an iTunes database in iTunes software installed in the computer. When the recording data is synchronized to iTunes, the recording data remains in the recording data application of the iOS device. After the recording data is effectively backed up, the recording data in the iOS device may be deleted, and if the recording data in the iPhone is deleted, the recording data may not be deleted from the "voice memo" playlist of iTunes. However, if a voice memo (recording data) is deleted from iTunes, the recording data will be automatically deleted from the iPhone the next time the iOS device is synchronized with iTunes.
The following describes a recording data backup method based on the iOS operating system in detail according to an embodiment of the present invention.
Suppose that seven recording data are included in the recording data list corresponding to the iOS6 operating system recording program in the iOS6 apparatus. Wherein the file name of the first recording data is Idea, the recording is carried out at 13.7.2617:22, and the recording duration is 5 seconds(s); the second recording data file name is forest bird calls, recorded at 13.7.2617:22, and recording time is 5 seconds(s); the file name of the third recording data is Interview, the third recording data is recorded at 13.7.712:09, and the recording time duration is 9 minutes (m) and 15 seconds(s); the fourth recording data has a file name of feature, is recorded at 13.7.711:56, and has a recording time of 8 minutes (m) and 8 seconds(s); the fifth recording data has the file name of Meeting, is recorded at 13.7.78:33, and has the recording time of 1 minute (m) and 26 seconds(s); the sixth recording data has the file name of Memo, is recorded at 13.7.78:05, and has the recording time of 15 minutes (m) and 9 seconds(s); the seventh recording data has the file name of the school bus recording, is recorded at 13.7.67:19, and has the recording time of 12 minutes (m) and 11 seconds(s). One or more recording data are selected, a recording data backup request is triggered and generated by clicking a sharing control in a recording data list interface, an application program calls an SQLite C language interface provided by an iOS operating system, and the selected recording data can be output to preset external equipment through a wireless communication interface connected with the SQLite C language interface. After the selected recording data is determined to be imported into the external equipment, the selected recording data can be deleted by clicking a deletion control in the recording data list interface.
Fig. 2 shows a flow of a recording data importing method based on an iOS operating system according to an embodiment of the present invention. Referring to fig. 2, the method includes:
step 201, calling an SQLite C language interface provided by an iOS operating system through an application program, and receiving recording data to be imported from a wireless communication interface;
in this step, the iOS device receives the recording data through the wireless communication interface after monitoring the recording data from the external device.
As an alternative embodiment, the method further comprises:
and decrypting the received recording data.
In this step, if the recording data is encrypted, the recording data to be imported is decrypted, and the decryption algorithm includes: enhanced data encryption protocol (AES), Data Encryption Algorithm (DEA), Data Encryption Standard (DES), and triple data encryption standard (3DES, TripleDES), and the like.
As an alternative embodiment, the method further comprises:
and calling the Framework of the Media layer of the IOSSDK, and performing format conversion and/or editing on the received sound recording data.
In this step, a recording data format that the iOS device and the external device can be compatible with each other may be negotiated based on the recording data format supported by the iOS device and the recording data format supported by the external device connected to the iOS device in a wired or wireless manner, and format conversion may be performed on the read recording data according to the negotiated recording data format.
In this step, if the recording data is encrypted, the recording data to be imported is decrypted before format conversion and editing.
Step 202, extracting a recording data file name contained in the received recording data, calling a Framework or iOS operating system API of a CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the recording data file name;
in this step, a configuration file corresponding to the file name of the recording data is read from the received recording data by calling a Framework or an iOS operating system API of a CoreServices layer of the iOSSDK.
Step 203, writing the configuration file of the read recording data into the iOS device through the Framework of the coresevices layer of the called iOSSDK or the iOS operating system API;
in this step, the iOS device stores the received configuration file. In the subsequent process, the configuration file stored in the external device is compared with the configuration file stored in the iOS device, if the configuration files are the same, the recording data in the iOS device and the recording data in the external device are consistent, namely synchronous, and if the configuration files are not consistent, the recording data in the iOS device and the recording data in the external device are not synchronous, and a user can be prompted whether to perform the overlay processing on the configuration file in the external device.
And step 204, calling an SQLite C language interface provided by the iOS operating system, performing format conversion on the received recording data to be imported according to a preset format, and writing the recording data into the iOS equipment for storage.
In this step, the preset format is a preset zrecord table, and the fields in the zrecord table include: z _ PK, ZITUNESPERSISTENTID, ZLABBELPRESET, ZDATE, ZDURATION, ZCUSTOMLABEL, ZPATH, etc.
In the embodiment of the present invention, as an optional embodiment, a path for storing the recording data (ZRECORDING table) may be set as: db/var/mobile/Media/Recordings.
As can be seen from the above, in the embodiment of the present invention, by setting the interface for importing and backing up the recording data, it is possible to implement backing up the recording data from the iOS operating system and importing the external recording data into the iOS operating system, thereby implementing effective backup of the recording data, and thus improving the security of the recording data; furthermore, for the recording data with privacy, encryption processing can be performed during recording data backup, so that the safety of the recording data is improved; moreover, the recording data from other places can be imported into the recording program of the iOS device, the management of the recording data is more convenient and centralized, the backup, encryption and return of the recording data of the iOS operating system are realized, the external recording data information can be communicated with the recording data of the iOS operating system, and the information cannot be lost when the recording data is returned, and the synchronization mechanism between the recording data and iTunes is not influenced.
Fig. 3 shows a recording data backup device structure based on the iOS operating system according to the embodiment of the present invention. Referring to fig. 3, the apparatus is an iOS device comprising: a recording data reading module, a configuration file output module and a recording data backup module, wherein,
the recording data reading module is used for calling an SQLite C language interface provided with a recording data reading authority and provided by the iOS operating system through an application program and reading the recording data under a preset path;
in the embodiment of the invention, the recording data is stored in a preset ZRECORDING table, and the storage path in the iOS device is as follows: db/var/mobile/Media/Recordings.
The fields in the ZRECORDING table include: z _ PK, ZITUNESPERSISTENTID, ZLABBELPRESET, ZDATE, ZDURATION, ZCUSTOMLABEL, ZPATH, etc. Wherein,
the Z _ PK field is a recording data identifier recorded by the iOS equipment;
the field "zitunesperstentid" is a synchronization identifier for subsequent synchronization of the recorded data, for example, a synchronization identifier for subsequent synchronization with an external device through iTunes;
the ZLABELPSET field is the number of a recording data label preset by the iOS operating system;
the ZDATE field is the recording data creation date;
the ZDURATION field is the duration of the recorded data;
the ZCUSTOMLABEL field is a self-defined recording data tag;
the ZPATH field is a record data file name storage path corresponding to the record data.
The configuration file reading module is used for extracting the file name of the read recording data contained in the recording data, calling the Framework or iOS operating system API of the CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the file name of the recording data;
in the embodiment of the invention, data in a configuration file (assetmorific. plist) is stored in a Key-Value format, wherein the Key is recording data file name information in a ZPATH field in a ZRECORDING table, and the Value comprises a synchronous identifier (pid) and a recording data display name. Wherein pid corresponds to the ZITUNESERSISTENTID field value in the database ZRECORDING table, and the recorded data display name corresponds to the ZCUSTOMLABEL field value in the ZRECORDING table, or the ZLABLPRESET field value.
A configuration file output module, configured to output a configuration file of the read recording data to a preset external device through a Framework or an iOS operating system API of a CoreServices layer of the called iOSSDK;
and the recording data backup module is used for converting the format of the read recording data according to the format fed back by the wireless communication interface, outputting the recording data to the wireless communication interface so that the wireless communication interface packages the recording data after format conversion, and outputting the packaged recording data to preset external equipment for storage.
In this embodiment of the present invention, the format of the wireless communication interface feedback includes:
the method comprises the steps that a consultation request is sent by a C language interface of the SQLite, wherein the consultation request comprises a wireless communication interface identifier and a recording format supported by the consultation request;
the wireless communication interface sends the negotiation request to the external equipment, the external equipment receives the negotiation request, an intersection of a recording format supported by the external equipment and a recording format supported by the SQLite C language is obtained, a recording format is selected from the intersection and carried in the negotiation request response, and the recording format is fed back to the SQLite C language interface through the wireless communication interface.
As an alternative embodiment, the external device is an optical disc player, and the recording formats supported by the external device include: vob, ifo, ac3, dts.
As another alternative, the external device is an mp3 player, and the recording formats supported by the external device include: mp3, mp2, mod, wav, voc, avi, ogg, wmv.
As still another alternative, if the external device is a desktop computer with a storm audio/video player installed therein, the supported recording formats may include: avi, wmv, wmp, asf; wma, wav, mid, midi; rm, ram, rmvb, smi; vob, ifo, ac3, dts.
As an alternative embodiment, the apparatus may further comprise:
and the recording data editing module is used for calling the Framework of the Media layer of the iOSSDK, and performing format conversion and/or editing on the recording data read by the recording data reading module.
In the embodiment of the invention, the iOS device negotiates a recording data format which can be compatible with the external device according to the recording data format supported by the iOS device and the recording data format supported by the external device connected in a wired or wireless way, and performs format conversion on the read recording data according to the negotiated recording data format.
As another alternative, the apparatus may further include:
and the encryption module is used for carrying out encryption processing on the format conversion and/or the edited recording data according to a preset encryption algorithm.
In the embodiment of the invention, the encryption algorithm comprises the following steps: enhanced data security protocol, data encryption algorithm, data encryption standard algorithm, three-layer data encryption standard algorithm and the like.
As still another alternative, the apparatus may further include:
and the recording data deleting module is used for deleting the recording data in the iOS equipment after the recording data backup module is determined to be successful in recording data backup.
Fig. 4 shows a configuration of the recording data importing apparatus based on the iOS operating system according to the embodiment of the present invention. Referring to fig. 4, the apparatus is an iOS device, comprising: a recording data import module, a configuration file acquisition module, a configuration file write-in module and a recording data storage module, wherein,
the recording data import module is used for calling an SQLite C language interface provided by the iOS through an application program and receiving recording data to be imported;
the configuration file acquisition module is used for extracting the file name of the sound recording data contained in the received sound recording data, calling the Framework or iOS operating system API of the CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the file name of the sound recording data;
a configuration file writing module, configured to write the configuration file of the read sound recording data into the iOS device through the Framework or the iOS operating system API of the coresevices layer of the called iOSSDK;
and the recording data storage module is used for writing the received recording data into the iOS equipment for storage according to a preset format through the C language interface of the SQLite provided by the called iOS operating system.
In the embodiment of the present invention, the preset format is a preset ZRECORDING table, and the fields in the ZRECORDING table include: z _ PK, ZITUNESPERSISTENTID, ZLABBELPRESET, ZDATE, ZDURATION, ZCUSTOMLABEL, ZPATH, etc.
As an alternative embodiment, the apparatus further comprises:
and the decryption module is used for decrypting the received recording data.
As another alternative embodiment, the apparatus further comprises:
and the recording data modification module is used for calling the Framework of the Media layer of the iOSSDK, and performing format conversion and/or editing on the received recording data.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the iOS operating system based recorded data importing apparatus and the iOS operating system based recorded data backup apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet web server or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses A1 and a recording data backup method based on an iOS operating system, which comprises the following steps:
calling an SQLite C language interface provided with a recording data reading authority and provided by an iOS operating system through an application program, and reading recording data under a preset path;
and according to the format fed back by the wireless communication interface, converting the format of the read recording data, and outputting the converted recording data to the wireless communication interface, so that the wireless communication interface packages the format-converted recording data, and outputs the packaged recording data to a preset external device for storage.
A2. The method of a1, the wireless communication interface feedback comprising:
and feeding back according to the type of the external equipment or a preset format.
A3. The method of a2, wherein the feedback by external device type includes:
the method comprises the steps that a consultation request is sent by a C language interface of the SQLite, wherein the consultation request comprises a wireless communication interface identifier and a recording format supported by the consultation request;
the wireless communication interface sends the negotiation request to the external equipment, the external equipment receives the negotiation request, an intersection of a recording format supported by the external equipment and a recording format supported by the SQLite C language is obtained, a recording format is selected from the intersection and carried in the negotiation request response, and the recording format is fed back to the SQLite C language interface through the wireless communication interface.
A4. The method of a3, the external device being an optical disc player, the external device supporting recording formats including: vob, ifo, ac3, dts.
A5. The method of a3, the external device being an mp3 player, the external device supporting recording formats comprising: mp3, mp2, mod, wav, voc, avi, ogg, wmv.
A6. The method of a1, after the reading of the recorded data under the predetermined path, the method further comprising:
and calling the Framework of the Media layer of the IOSSDK, and performing format conversion and/or editing on the read recording data.
A7. The method of any of a 1-a 6, further comprising, after the converting, prior to outputting to the wireless communication interface:
and carrying out format conversion and/or encrypting the edited recording data according to a preset encryption algorithm.
A8. The method of a7, the encryption algorithm comprising: an enhanced data privacy protocol algorithm, a data encryption standard algorithm and a three-layer data encryption standard algorithm.
A9. The method of a1, after the reading of the recorded data under the predetermined path, the method further comprising:
extracting a recording data file name contained in the read recording data, calling a Framework or an iOS operating system API of a CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the recording data file name;
and outputting the read configuration file of the recording data to preset external equipment through the called Framework or iOS operating system API of the CoreServices layer of the iOSSDK.
A10. According to the method of a9, the sound recording data is stored in the predetermined path in a preset ZRECORDING table, and the predetermined path is: db/var/mobile/Media/Recordings.
A11. According to the method of a10, the fields in the ZRECORDING table include: z _ PK, ZITUNESPERSISTENTID, ZLABELPSET, ZDATE, ZDURRATION, ZCUSTOMLABEL, ZPATH, wherein,
the Z _ PK field is a recording data identifier recorded by the iOS equipment;
the field "zitunesperstentid" is a synchronization identifier for subsequent synchronization of the recorded data, for example, a synchronization identifier for subsequent synchronization with an external device through iTunes;
the ZLABELPSET field is the number of a recording data label preset by the iOS operating system;
the ZDATE field is the recording data creation date;
the ZDURATION field is the duration of the recorded data;
the ZCUSTOMLABEL field is a self-defined recording data tag;
the ZPATH field is a record data file name storage path corresponding to the record data.
A12. According to the method described in a11, the data in the configuration file is stored in a key value format, the key is the recording data filename information in the zpage field in the zrecord table, and the value includes a synchronization identifier and a recording data display name, wherein the synchronization identifier corresponds to the value of the ZITUNESPERSISTENTID field in the zrecord table, and the recording data display name corresponds to the value of the zcumstore layer field in the zrecord table, or the value of the zlabel reset field.
A13. According to the method of A1, before the calling the C language interface of SQLite provided by the iOS operating system, the method further comprises:
and receiving a recording data backup request input by a user.
A14. The method of a1, the method further comprising:
and after the recording data are determined to be output to preset external equipment for storage, deleting the recording data in the iOS equipment.
A15. The method of a1, the method further comprising:
and outputting the recording data to a privacy storage area of the external equipment for storage.
A16. According to the method A1, the C language interface of the SQLite for setting the read authority of the recorded data comprises the following steps:
acquiring a root authority of the iOS operating system;
searching a memory variable of a read permission in a C language interface process of the SQLite;
and adding the memory variable of the recording data reading authority into the memory variable of the reading authority.
A17. An IOS operating system-based recording data importing method comprises the following steps:
calling an SQLite C language interface provided by an iOS operating system through an application program, receiving the recording data to be imported from a wireless communication interface, and performing format conversion on the received recording data to be imported according to a preset format;
extracting a recording data file name contained in the received recording data, calling a Framework or an iOS operating system API of a CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the recording data file name;
writing the read configuration file of the recording data into the iOS device through the Framework or the iOS operating system API of the CoreServices layer of the called iOSSDK;
and writing the format-converted recording data into the iOS device for storage through the C language interface of the SQLite provided by the called iOS operating system.
A18. The method of a17, the method further comprising:
and decrypting the received recording data.
A19. The method of a17, the method further comprising:
and calling the Framework of the Media layer of the IOSSDK, and performing format conversion and/or editing on the received sound recording data.
A20. According to the method of a17, the preset format is a preset ZRECORDING table, and the fields in the ZRECORDING table include: z _ PK, ZITUNESPERSISTENTID, ZLABELPSET, ZDATE, ZDURRATION, ZCUSTOMLABEL, ZPATH, wherein,
the Z _ PK field is a recording data identifier recorded by the iOS equipment;
the field "zitunesperstentid" is a synchronization identifier for subsequent synchronization of the recorded data, for example, a synchronization identifier for subsequent synchronization with an external device through iTunes;
the ZLABELPSET field is the number of a recording data label preset by the iOS operating system;
the ZDATE field is the recording data creation date;
the ZDURATION field is the duration of the recorded data;
the ZCUSTOMLABEL field is a self-defined recording data tag;
the ZPATH field is a record data file name storage path corresponding to the record data.
A21. An iOS operating system-based recorded data backup apparatus, the apparatus comprising: a recording data reading module, a configuration file output module and a recording data backup module, wherein,
the recording data reading module is used for calling an SQLite C language interface provided with a recording data reading authority and provided by the iOS operating system through an application program and reading the recording data under a preset path;
the configuration file reading module is used for extracting the file name of the read recording data contained in the recording data, calling the Framework or iOS operating system API of the CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the file name of the recording data;
a configuration file output module, configured to output a configuration file of the read recording data to a preset external device through a Framework or an iOS operating system API of a CoreServices layer of the called iOSSDK;
and the recording data backup module is used for converting the format of the read recording data according to the format fed back by the wireless communication interface, outputting the recording data to the wireless communication interface so that the wireless communication interface packages the recording data after format conversion, and outputting the packaged recording data to preset external equipment for storage.
A22. The apparatus of a21, the format of the wireless communication interface feedback comprising:
the method comprises the steps that a consultation request is sent by a C language interface of the SQLite, wherein the consultation request comprises a wireless communication interface identifier and a recording format supported by the consultation request;
the wireless communication interface sends the negotiation request to the external equipment, the external equipment receives the negotiation request, an intersection of a recording format supported by the external equipment and a recording format supported by the SQLite C language is obtained, a recording format is selected from the intersection and carried in the negotiation request response, and the recording format is fed back to the SQLite C language interface through the wireless communication interface.
A23. The apparatus of a21, the apparatus further comprising:
and the recording data editing module is used for calling the Framework of the Media layer of the iOSSDK, and performing format conversion and/or editing on the recording data read by the recording data reading module.
A24. The device of A21 or A22 or A23, the device further comprising:
and the encryption module is used for carrying out encryption processing on the recording data or format conversion and/or the edited recording data according to a preset encryption algorithm.
A25. The apparatus of a21, the apparatus further comprising:
and the recording data deleting module is used for deleting the recording data in the iOS equipment after the recording data backup module is determined to be successful in recording data backup.
A26. An iOS operating system-based recording data importing apparatus, the apparatus comprising: a recording data import module, a configuration file acquisition module, a configuration file write-in module and a recording data storage module, wherein,
the recording data import module is used for calling an SQLite C language interface provided by the iOS through an application program and receiving recording data to be imported;
the configuration file acquisition module is used for extracting the file name of the sound recording data contained in the received sound recording data, calling the Framework or iOS operating system API of the CoreServices layer of the iOSSDK, and reading a configuration file corresponding to the file name of the sound recording data;
a configuration file writing module, configured to write the configuration file of the read sound recording data into the iOS device through the Framework or the iOS operating system API of the coresevices layer of the called iOSSDK;
and the recording data storage module is used for writing the received recording data into the iOS equipment for storage according to a preset format through the C language interface of the SQLite provided by the called iOS operating system.
A27. The apparatus of a26, the apparatus further comprising:
and the decryption module is used for decrypting the received recording data.
A28. The apparatus of a26, the apparatus further comprising:
and the recording data modification module is used for calling the Framework of the Media layer of the iOSSDK, and performing format conversion and/or editing on the received recording data.